apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "common.robustName" .Release.Name }} namespace: {{ .Release.Namespace }} labels: {{- include "helm-chart.labels" . | nindent 4 }} app: "{{ template 'common.robustName' .Release.Name }}-app" spec: replicas: 1 # revisionHistoryLimit: 3 selector: matchLabels: app: "{{ template 'common.robustName' .Release.Name }}-app" template: metadata: labels: app: "{{ template 'common.robustName' .Release.Name }}-app" spec: imagePullSecrets: - name: github-container-registry containers: - name: "{{ template 'common.robustName' .Release.Name }}-app" image: {{ .Values.image }} imagePullPolicy: Always command: - {{ .Values.command | default "web" | quote }} resources: requests: memory: 128M cpu: 100m limits: memory: 512M ports: - containerPort: 5000 envFrom: - configMapRef: name: dev-env - secretRef: name: dev-secret-env - secretRef: name: dev-db-connection livenessProbe: failureThreshold: 3 httpGet: httpHeaders: - name: Host value: {{ .Values.host }} - name: X-Forwarded-Proto value: https path: /wp/wp-cron.php?nocache port: 5000 initialDelaySeconds: 10 periodSeconds: 60 successThreshold: 1 timeoutSeconds: 30 readinessProbe: failureThreshold: 3 httpGet: httpHeaders: - name: Host value: {{ .Values.host }} - name: X-Forwarded-Proto value: https path: /?nocache port: 5000 initialDelaySeconds: 10 periodSeconds: 5 successThreshold: 1 timeoutSeconds: 30 --- apiVersion: v1 kind: Service metadata: name: {{ template "common.robustName" .Release.Name }} namespace: {{ .Release.Namespace }} labels: {{- include "helm-chart.labels" . | nindent 4 }} spec: selector: app: "{{ template 'common.robustName' .Release.Name }}-app" ports: - name: wp protocol: TCP port: 5000 targetPort: 5000