mirror of
https://github.com/truenas/charts.git
synced 2026-05-11 11:06:11 +08:00
34 lines
1.3 KiB
YAML
34 lines
1.3 KiB
YAML
{{ $values := (. | mustDeepCopy) }}
|
|
{{ $_ := set $values "common" (dict "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 }}
|