apiVersion: apps/v1 kind: Deployment metadata: name: pipeline-translator namespace: site11-pipeline labels: app: pipeline-translator spec: replicas: 3 selector: matchLabels: app: pipeline-translator template: metadata: labels: app: pipeline-translator spec: containers: - name: translator image: yakenator/site11-pipeline-translator:latest imagePullPolicy: Always # Always pull from Docker Hub envFrom: - configMapRef: name: pipeline-config - secretRef: name: pipeline-secrets resources: requests: memory: "256Mi" cpu: "100m" limits: memory: "512Mi" cpu: "500m" readinessProbe: exec: command: - python - -c - "import sys; sys.exit(0)" initialDelaySeconds: 10 periodSeconds: 5 livenessProbe: exec: command: - python - -c - "import sys; sys.exit(0)" initialDelaySeconds: 30 periodSeconds: 10 --- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: pipeline-translator-hpa namespace: site11-pipeline spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: pipeline-translator minReplicas: 3 maxReplicas: 10 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 70 - type: Resource resource: name: memory target: type: Utilization averageUtilization: 80