Files
ServerStatistics/script/k8s/deployment.yaml
cialloo d488511238
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 16s
Add KUBERNETES_DEPLOYMENT_REPLICAS environment variable and update deployment configuration
2025-10-06 14:59:25 +08:00

65 lines
1.5 KiB
YAML

# Kubernetes Deployment Configuration
apiVersion: apps/v1
kind: Deployment
metadata:
name: ${CONTAINER_IMAGE_NAME}
namespace: ${KUBERNETES_NAMESPACE}
labels:
app: ${CONTAINER_IMAGE_NAME}
spec:
replicas: ${KUBERNETES_DEPLOYMENT_REPLICAS}
selector:
matchLabels:
app: ${CONTAINER_IMAGE_NAME}
template:
metadata:
labels:
app: ${CONTAINER_IMAGE_NAME}
spec:
imagePullSecrets:
- name: regcred
containers:
- name: ${CONTAINER_IMAGE_NAME}
image: ${FULL_IMAGE_NAME}
imagePullPolicy: Always
ports:
- name: http
containerPort: 8888
protocol: TCP
readinessProbe:
httpGet:
path: /api/server/statistics/ping
port: http
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: /api/server/statistics/ping
port: http
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 5
failureThreshold: 3
resources:
requests:
memory: "128Mi"
cpu: "200m"
limits:
memory: "256Mi"
cpu: "500m"
env:
- name: TZ
value: "UTC"
- name: DATABASE_DSN
value: "${DATABASE_DSN}"