apiVersion: apps/v1 kind: Deployment metadata: name: ha-sync-ui namespace: infrastructure spec: replicas: 2 selector: matchLabels: app: ha-sync-ui template: metadata: labels: app: ha-sync-ui spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchLabels: app: ha-sync-ui topologyKey: kubernetes.io/hostname serviceAccountName: ha-sync containers: - name: ha-sync-ui image: ha-sync-ui:latest imagePullPolicy: Never command: ["/usr/local/bin/ha-sync-ui"] ports: - containerPort: 8080 env: - name: HA_SYNC_DB_DSN valueFrom: secretKeyRef: name: ha-sync-db-secret key: HA_SYNC_DB_DSN - name: HA_SYNC_UI_PORT value: "8080" resources: requests: { cpu: 50m, memory: 64Mi } limits: { cpu: 200m, memory: 128Mi } livenessProbe: httpGet: { path: /health, port: 8080 } initialDelaySeconds: 5 periodSeconds: 10 readinessProbe: httpGet: { path: /health, port: 8080 } initialDelaySeconds: 3 periodSeconds: 5