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
This commit is contained in:
Sirius Devops 2026-05-21 04:08:58 +00:00
commit b0748538c0
29 changed files with 929 additions and 1 deletions

View file

@ -0,0 +1,79 @@
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: 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: 8002
initialDelaySeconds: 15
periodSeconds: 5
failureThreshold: 6
livenessProbe:
httpGet:
path: /health
port: 8002
initialDelaySeconds: 30
periodSeconds: 30
readinessProbe:
httpGet:
path: /health
port: 8002
initialDelaySeconds: 5
periodSeconds: 10

View file

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml

View file

@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: trading-execute-service
namespace: customer1
annotations:
tailscale.com/expose: "true"
tailscale.com/hostname: "trading-execute-service"
tailscale.com/tags: "tag:k8s-operator"
tailscale.com/ports: "http:80"
spec:
selector:
app: trading-execute-service
ports:
- port: 80
targetPort: 8002
name: http
type: ClusterIP