--- apiVersion: apps/v1 kind: Deployment metadata: name: supply-intelligence labels: app: supply-intelligence spec: replicas: 2 selector: matchLabels: app: supply-intelligence template: metadata: labels: app: supply-intelligence spec: containers: - name: supply-intelligence image: supply-intelligence:latest ports: - containerPort: 8080 name: http env: - name: DATABASE_URL valueFrom: secretKeyRef: name: supply-intelligence-secrets key: database-url - name: OPENAI_API_KEY valueFrom: secretKeyRef: name: supply-intelligence-secrets key: openai-api-key - name: ANTHROPIC_API_KEY valueFrom: secretKeyRef: name: supply-intelligence-secrets key: anthropic-api-key livenessProbe: httpGet: path: /healthz port: http initialDelaySeconds: 10 periodSeconds: 30 readinessProbe: httpGet: path: /healthz port: http initialDelaySeconds: 5 periodSeconds: 10 resources: requests: memory: "128Mi" cpu: "100m" limits: memory: "512Mi" cpu: "500m" --- apiVersion: v1 kind: Service metadata: name: supply-intelligence-svc spec: type: ClusterIP ports: - port: 80 targetPort: 8080 name: http selector: app: supply-intelligence --- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: supply-intelligence-hpa spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: supply-intelligence minReplicas: 2 maxReplicas: 10 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 70