apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "sogo.fullname" . }} labels: {{- include "sogo.labels" . | nindent 4 }} spec: replicas: 1 strategy: type: Recreate selector: matchLabels: {{- include "sogo.selectorLabels" . | nindent 6 }} template: metadata: annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} labels: {{- include "sogo.selectorLabels" . | nindent 8 }} spec: containers: - name: sogo image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http containerPort: 80 protocol: TCP env: - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: name: {{ include "sogo.fullname" . }}-postgres-credentials key: password volumeMounts: - name: config mountPath: /etc/sogo/sogo.conf.d - name: data mountPath: /var/spool/sogo livenessProbe: httpGet: path: /SOGo port: http initialDelaySeconds: 60 periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 3 readinessProbe: httpGet: path: /SOGo port: http initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 resources: {{- toYaml .Values.resources | nindent 10 }} volumes: - name: config configMap: name: {{ include "sogo.fullname" . }}-config - name: data persistentVolumeClaim: claimName: {{ include "sogo.fullname" . }}-data