gcloud-lab/trading-platform/deploy/k8s/base/execute-service-deployment.yaml
Hermes Agent cbb0a20280 fix: add JWT_SECRET_KEY to execute-service deployment via SOPS-encrypted secret
- Create execute-service-secret (SOPS encrypted) with JWT_SECRET_KEY
- Wire JWT_SECRET_KEY env var in execute-service deployment
- Fixes CrashLoopBack caused by missing JWT_SECRET_KEY validation error
2026-05-25 01:24:17 +00:00

87 lines
2.3 KiB
YAML

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