gcloud-lab/trading-platform/deploy/k8s/base/dashboard-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
1.9 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dashboard
namespace: customer1
labels:
app: dashboard
app.kubernetes.io/name: dashboard
app.kubernetes.io/component: microservice
spec:
replicas: 2
selector:
matchLabels:
app: dashboard
template:
metadata:
labels:
app: dashboard
app.kubernetes.io/name: dashboard
app.kubernetes.io/component: microservice
spec:
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 1000
containers:
- name: dashboard
image: "trading-platform/dashboard:v${VERSION}"
ports:
- containerPort: 3000
protocol: TCP
envFrom:
- configMapRef:
name: trading-platform-config
resources:
limits:
cpu: "500m"
memory: 512Mi
requests:
cpu: "250m"
memory: 256Mi
startupProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 30
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 15
periodSeconds: 15
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: 3000
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: {}