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