| apiVersion: apps/v1 |
| kind: Deployment |
| metadata: |
| name: gold-{{.INSTANCE_ID}}-healthy-server |
| spec: |
| replicas: 3 |
| selector: |
| matchLabels: |
| app: gold-{{.INSTANCE_ID}}-healthy-server |
| strategy: |
| type: RollingUpdate |
| template: |
| metadata: |
| labels: |
| app: gold-{{.INSTANCE_ID}}-healthy-server |
| appgroup: gold-{{.INSTANCE_ID}} |
| spec: |
| automountServiceAccountToken: false |
| securityContext: |
| runAsUser: 2000 # aka skia |
| fsGroup: 2000 # aka skia |
| containers: |
| - name: gold-{{.INSTANCE_ID}}-healthy-server |
| image: {{.HEALTHY_SERVER_IMAGE}} |
| args: |
| - "--instance={{.INSTANCE_ID}}" |
| - "--port=8000" |
| - "--config_filename=/etc/gold-healthy-server-config/gold-{{.INSTANCE_ID}}-healthy-server-config.json5" |
| - "--min_delay=60s" |
| - "--max_delay=120s" |
| - "--logtostderr" |
| ports: |
| - containerPort: 8000 |
| name: http |
| volumeMounts: |
| - name: gold-{{.INSTANCE_ID}}-healthy-server-config-volume |
| mountPath: /etc/gold-healthy-server-config |
| resources: |
| requests: |
| memory: "{{.MAIN_MEMORY}}" |
| cpu: "{{.MAIN_CPU}}" |
| readinessProbe: |
| httpGet: |
| path: /healthz |
| port: 8000 |
| initialDelaySeconds: 30 |
| periodSeconds: 10 |
| failureThreshold: 6 |
| volumes: |
| - name: gold-{{.INSTANCE_ID}}-healthy-server-config-volume |
| configMap: |
| defaultMode: 444 |
| name: gold-{{.INSTANCE_ID}}-healthy-server-config |