feat: 初始化零工后端代码

This commit is contained in:
Daniel
2026-04-01 14:19:25 +08:00
parent c6fabe262c
commit 84f8be7c0e
41 changed files with 2813 additions and 147 deletions

View File

@@ -0,0 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gig-poc-web
namespace: gig-poc
spec:
replicas: 2
selector:
matchLabels:
app: gig-poc-web
template:
metadata:
labels:
app: gig-poc-web
spec:
containers:
- name: web
image: gig-poc-web:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
resources:
requests:
cpu: "200m"
memory: "256Mi"
limits:
cpu: "1"
memory: "1Gi"
---
apiVersion: v1
kind: Service
metadata:
name: gig-poc-web
namespace: gig-poc
spec:
selector:
app: gig-poc-web
ports:
- name: http
port: 80
targetPort: 80
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: gig-poc-web-hpa
namespace: gig-poc
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: gig-poc-web
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70