{{ $values := . }} {{ $_ := set $values "nameSuffix" "postgres" }} apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} kind: Deployment metadata: name: {{ template "common.names.fullname" $values }} labels: {{ include "common.labels.selectorLabels" $values | nindent 4 }} spec: replicas: 1 strategy: type: {{ .Values.nextcloud.strategy }} selector: matchLabels: {{- include "common.labels.selectorLabels" $values | nindent 6 }} template: metadata: labels: {{- include "common.labels.selectorLabels" $values | nindent 8 }} annotations: {{- include "common.annotations" $values | nindent 8 }} spec: containers: - name: {{ .Chart.Name }}-postgres image: {{ template "postgres.imageName" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} env: {{ include "postgres.envVariableConfiguration" $values | nindent 10 }} volumeMounts: - name: postgres-data mountPath: /var/lib/postgresql/data - name: postgres-backup mountPath: /postgres_backups ports: - name: postgres-tcp containerPort: 5432 protocol: TCP volumes: {{ include "postgres.volumeConfiguration" $values | nindent 8 }}