gcloud-lab/trading-platform/deploy/k8s/base/data-service-deployment.yaml
Sirius Devops c9e5e5b651 fix(trading-platform): add startupProbe to data-service, execute-service, and dashboard in customer1
- Grace period (failureThreshold: 30) for init (model load, DB, Redis).
- Resolves 0/1 Ready pods after rollout.
- Matches hermes-projects updates.
- Related to Kanban t_b6693eac
2026-05-25 04:57:59 +00:00

78 lines
2 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: data-service
namespace: customer1
labels:
app: data-service
app.kubernetes.io/name: data-service
app.kubernetes.io/component: microservice
spec:
replicas: 2
selector:
matchLabels:
app: data-service
template:
metadata:
labels:
app: data-service
app.kubernetes.io/name: data-service
app.kubernetes.io/component: microservice
spec:
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 1000
containers:
- name: data-service
image: "trading-platform/data-service:v${VERSION}"
ports:
- containerPort: 8001
protocol: TCP
envFrom:
- configMapRef:
name: trading-platform-config
resources:
limits:
cpu: "1000m"
memory: 1Gi
requests:
cpu: "500m"
memory: 512Mi
startupProbe:
httpGet:
path: /health
port: 8001
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 30
livenessProbe:
httpGet:
path: /health
port: 8001
initialDelaySeconds: 15
periodSeconds: 15
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: 8001
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- name: tmp
mountPath: /tmp
volumes:
- name: tmp
emptyDir: {}