Change readiness probe from /health (always ok) to /health/ready (checks executor initialization state). Applied to both: - apps/base K8s deployment - Helm chart template Pairs with app fix making executor init non-blocking.
84 lines
2.2 KiB
YAML
84 lines
2.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: trading-execute-service
|
|
namespace: customer1
|
|
labels:
|
|
app: trading-execute-service
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: trading-execute-service
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: trading-execute-service
|
|
annotations:
|
|
checksum/config: trading-execute-service-config
|
|
spec:
|
|
terminationGracePeriodSeconds: 30
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
fsGroup: 1000
|
|
containers:
|
|
- name: execute-service
|
|
image: ghcr.io/sirius0xdev/trading-execute-service:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8002
|
|
name: http
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
envFrom:
|
|
- configMapRef:
|
|
name: trading-execute-service-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-jwt-secret
|
|
key: JWT_SECRET_KEY
|
|
startupProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8002
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 5
|
|
failureThreshold: 6
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8002
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health/ready
|
|
port: 8002
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|