gcloud-lab/apps/base/customer1/trading-platform/data-service/deployment.yaml
Sirius Devops b0748538c0 feat: add trading-platform K8s manifests for customer1
- Scaffold trading-platform under apps/base/customer1/trading-platform/
- Add 4 microservice deployments: data-service, execute-service, news-service, dashboard
- Add ConfigMaps with DB/Kafka/Redis connection configs
- Add HTTPRoutes via Gateway API (external-http-gateway)
- Add NetworkPolicies for inter-service and DB/Kafka/Redis egress
- Add SOPS-encrypted secrets (age key)
- Add Kafka (KRaft) and Redis infrastructure to hermes-db/
- Update root and staging kustomizations

All containers: non-root, readOnlyRootFilesystem, resource limits, health probes
Images: ghcr.io/sirius0xdev/trading-{service}:latest
2026-05-21 04:17:05 +00:00

79 lines
2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: trading-data-service
namespace: customer1
labels:
app: trading-data-service
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: trading-data-service
template:
metadata:
labels:
app: trading-data-service
annotations:
checksum/config: trading-data-service-config
spec:
terminationGracePeriodSeconds: 30
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 1000
containers:
- name: data-service
image: ghcr.io/sirius0xdev/trading-data-service:latest
imagePullPolicy: Always
ports:
- containerPort: 8001
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-data-service-config
env:
- name: DB_USER
valueFrom:
secretKeyRef:
name: trading-db-credentials
key: username
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: trading-db-credentials
key: password
startupProbe:
httpGet:
path: /health
port: 8001
initialDelaySeconds: 15
periodSeconds: 5
failureThreshold: 6
livenessProbe:
httpGet:
path: /health
port: 8001
initialDelaySeconds: 30
periodSeconds: 30
readinessProbe:
httpGet:
path: /health
port: 8001
initialDelaySeconds: 5
periodSeconds: 10