File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11apiVersion : v1
22name : pgdog
3- version : v0.71
4- appVersion : " 0.1.47 "
3+ version : v0.72
4+ appVersion : " 0.1.50 "
Original file line number Diff line number Diff line change @@ -129,9 +129,10 @@ statefulSet:
129129` ` `
130130
131131The StatefulSet creates one `ReadWriteOnce` persistent volume claim per replica
132- and mounts it at `/var/lib/pgdog`. The generated PgDog configuration sets
133- ` two_phase_commit_wal_dir` to that mount point automatically. An explicit
134- ` twoPhaseCommitWalDir` value takes precedence.
132+ and mounts it at `/var/lib/pgdog`. Before PgDog starts, an init container creates
133+ ` /var/lib/pgdog/wal` on the volume. The generated PgDog configuration sets
134+ ` two_phase_commit_wal_dir` to that directory automatically. An explicit
135+ ` twoPhaseCommitWalDir` value still takes precedence.
135136
136137The claims use the cluster's default `StorageClass`. Ensure one is configured
137138for dynamic provisioning before enabling `walPvc`. This option has no effect
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ data:
152152 {{- if hasKey .Values "twoPhaseCommitWalDir" }}
153153 two_phase_commit_wal_dir = {{ .Values.twoPhaseCommitWalDir | quote }}
154154 {{- else if and .Values.statefulSet.enabled .Values.statefulSet.walPvc.enabled }}
155- two_phase_commit_wal_dir = "/var/lib/pgdog"
155+ two_phase_commit_wal_dir = "/var/lib/pgdog/wal "
156156 {{- end }}
157157 {{- if hasKey .Values "twoPhaseCommitWalSegmentSize" }}
158158 two_phase_commit_wal_segment_size = {{ include "pgdog.intval" .Values.twoPhaseCommitWalSegmentSize }}
Original file line number Diff line number Diff line change 5252 {{- else }}
5353 terminationGracePeriodSeconds : {{ add (div (default 60000 .Values.shutdownTimeout | int64) 1000) 5 }}
5454 {{- end }}
55- {{- with .Values.extraInitContainers }}
55+ {{- if or (and .Values.statefulSet.enabled .Values.statefulSet.walPvc.enabled) .Values.extraInitContainers }}
5656 initContainers :
57+ {{- if and .Values.statefulSet.enabled .Values.statefulSet.walPvc.enabled }}
58+ - name : create-wal-directory
59+ {{- if .Values.image.name }}
60+ image : {{ .Values.image.name }}
61+ {{- else if .Values.image.digest }}
62+ image : " {{ .Values.image.repository }}@{{ .Values.image.digest }}"
63+ {{- else }}
64+ image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
65+ {{- end }}
66+ imagePullPolicy : {{ .Values.image.pullPolicy }}
67+ command : ["mkdir", "-p", "/var/lib/pgdog/wal"]
68+ volumeMounts :
69+ - name : wal
70+ mountPath : /var/lib/pgdog
71+ {{- end }}
72+ {{- with .Values.extraInitContainers }}
5773 {{- toYaml . | nindent 8 }}
74+ {{- end }}
5875 {{- end }}
5976 {{- with .Values.imagePullSecrets }}
6077 imagePullSecrets :
Original file line number Diff line number Diff line change @@ -90,8 +90,8 @@ statefulSet:
9090 # enabled switches from Deployment to StatefulSet
9191 enabled : false
9292 # walPvc creates one persistent volume claim per StatefulSet pod.
93- # The volume is mounted at /var/lib/pgdog. When enabled,
94- # twoPhaseCommitWalDir defaults to this mount point .
93+ # The volume is mounted at /var/lib/pgdog. An init container creates the
94+ # /var/lib/pgdog/wal directory, which is used by twoPhaseCommitWalDir .
9595 walPvc :
9696 enabled : false
9797 size : 1Gi
You can’t perform that action at this time.
0 commit comments