Fix issue with applying postgresql.conf to PostgreSQL

This commit is contained in:
wbsong111
2025-01-06 11:01:31 +09:00
parent 4b898f8634
commit 6108c65b0c
2 changed files with 27 additions and 2 deletions
@@ -122,6 +122,9 @@ spec:
chown {{ .Values.postgresql.containerSecurityContext.runAsUser }}:{{ .Values.postgresql.podSecurityContext.fsGroup }} {{ .Values.persistence.mountPath }}
find {{ .Values.persistence.mountPath }} -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | \
xargs -r chown -R {{ .Values.postgresql.containerSecurityContext.runAsUser }}:{{ .Values.postgresql.podSecurityContext.fsGroup }}
{{- if ( include "postgresql-ha.configuration.postgresql.enabled" . ) }}
chmod -R 777 /dev/shm
{{- end }}
securityContext: {{- .Values.volumePermissions.podSecurityContext | toYaml | nindent 12 }}
{{- if .Values.volumePermissions.resources }}
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
@@ -129,6 +132,10 @@ spec:
volumeMounts:
- name: data
mountPath: {{ .Values.persistence.mountPath }}
{{- if ( include "postgresql-ha.configuration.postgresql.enabled" . ) }}
- name: dshm
mountPath: /dev/shm
{{- end }}
{{- end }}
{{- if or .Values.postgresql.initContainers .Values.postgresql.extraInitContainers }}
{{- include "common.tplvalues.render" ( dict "value" (coalesce .Values.postgresql.initContainers .Values.postgresql.extraInitContainers) "context" $ ) | nindent 8 }}
@@ -458,7 +465,9 @@ spec:
{{- if .Values.postgresql.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.postgresql.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if ( include "postgresql-ha.configuration.postgresql.sharedMemory" . ) }}
{{- if ( include "postgresql-ha.configuration.postgresql.enabled" . ) }}
- name: postgresql-config
mountPath: /bitnami/repmgr/conf
- name: dshm
mountPath: /dev/shm
{{- end }}
@@ -602,7 +611,10 @@ spec:
- name: postgresql-certificates
emptyDir: {}
{{- end }}
{{- if ( include "postgresql-ha.configuration.postgresql.sharedMemory" . ) }}
{{- if ( include "postgresql-ha.configuration.postgresql.enabled" . ) }}
- name: postgresql-config
configMap:
name: {{ include "postgresql-ha.postgresqlConfigurationCM" . }}
- name: dshm
emptyDir:
medium: Memory