deploy-templates/charts/postgresql/templates/admin-statefulset.yaml [41:182]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        heritage: {{ .Release.Service | quote }}
        role: master
        collect.logs: "plain-text"
      {{- with .Values.master.podLabels }}
      {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.master.podAnnotations }}
      annotations: {{- toYaml . | nindent 8 }}
      {{- end }}
    spec:
  {{- if .Values.persistence.enabled }}
      initContainers:
        - name: init-chown-data
          image: {{ template "imageRegistry" . -}} busybox
          command: [ 'sh', '-c', 'chmod 0700 /bitnami/postgresql/data || true' ]
          volumeMounts:
            - name: data
              mountPath: /bitnami/postgresql
  {{ end }}
      {{- if .Values.schedulerName }}
      schedulerName: "{{ .Values.schedulerName }}"
      {{- end }}
{{- include "postgresql.imagePullSecrets" . | indent 6 }}
      {{- if .Values.master.nodeSelector }}
      nodeSelector: {{- toYaml .Values.master.nodeSelector | nindent 8 }}
      {{- end }}
      {{- if .Values.master.affinity }}
      affinity: {{- toYaml .Values.master.affinity | nindent 8 }}
      {{- end }}
      {{- if .Values.master.tolerations }}
      tolerations: {{- toYaml .Values.master.tolerations | nindent 8 }}
      {{- end }}
      {{- if .Values.terminationGracePeriodSeconds }}
      terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
      {{- end }}
      {{- if .Values.securityContext.enabled }}
      securityContext:
        fsGroup: {{ .Values.securityContext.fsGroup }}
      {{- end }}
      {{- if .Values.serviceAccount.enabled }}
      serviceAccountName: {{ default (include "postgresql.fullname" . ) .Values.serviceAccount.name }}
      {{- end }}
      {{- if or .Values.master.extraInitContainers (and .Values.volumePermissions.enabled (or .Values.persistence.enabled (and .Values.shmVolume.enabled .Values.shmVolume.chmod.enabled))) }}
      initContainers:
      {{- if and .Values.volumePermissions.enabled (or .Values.persistence.enabled (and .Values.shmVolume.enabled .Values.shmVolume.chmod.enabled)) }}
        - name: init-chmod-data
          image: {{ template "postgresql.volumePermissions.image" . }}
          imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
          {{- if .Values.resources }}
          resources: {{- toYaml .Values.resources | nindent 12 }}
          {{- end }}
          command:
            - /bin/sh
            - -cx
            - |
              {{- if .Values.persistence.enabled }}
              mkdir -p {{ .Values.persistence.mountPath }}/data {{- if (include "postgresql.mountConfigurationCM" .) }} {{ .Values.persistence.mountPath }}/conf {{- end }}
              chmod 700 {{ .Values.persistence.mountPath }}/data {{- if (include "postgresql.mountConfigurationCM" .) }} {{ .Values.persistence.mountPath }}/conf {{- end }}
              find {{ .Values.persistence.mountPath }} -mindepth 1 -maxdepth 1 {{- if not (include "postgresql.mountConfigurationCM" .) }} -not -name "conf" {{- end }} -not -name ".snapshot" -not -name "lost+found" | \
              {{- if eq ( toString ( .Values.volumePermissions.securityContext.runAsUser )) "auto" }}
                xargs chown -R `id -u`:`id -G | cut -d " " -f2`
              {{- else }}
                xargs chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}
              {{- end }}
              {{- end }}
              {{- if and .Values.shmVolume.enabled .Values.shmVolume.chmod.enabled }}
              chmod -R 777 /dev/shm
              {{- end }}
          {{- if eq ( toString ( .Values.volumePermissions.securityContext.runAsUser )) "auto" }}
          securityContext:
          {{- else }}
          securityContext:
            runAsUser: {{ .Values.volumePermissions.securityContext.runAsUser }}
          {{- end }}
          volumeMounts:
            {{- if .Values.persistence.enabled }}
            - name: data
              mountPath: {{ .Values.persistence.mountPath }}
              subPath: {{ .Values.persistence.subPath }}
            {{- end }}
            {{- if .Values.shmVolume.enabled }}
            - name: dshm
              mountPath: /dev/shm
            {{- end }}
      {{- end }}
      {{- if .Values.master.extraInitContainers }}
      {{- include "postgresql.tplValue" ( dict "value" .Values.master.extraInitContainers "context" $ ) | nindent 8 }}
      {{- end }}
      {{- end }}
      {{- if .Values.master.priorityClassName }}
      priorityClassName: {{ .Values.master.priorityClassName }}
      {{- end }}
      containers:
        - name: {{ template "postgresql.fullname" . }}
          image: {{ template "postgresql.image" . }}
          imagePullPolicy: "{{ .Values.image.pullPolicy }}"
          {{- if .Values.resources }}
          resources: {{- toYaml .Values.resources | nindent 12 }}
          {{- end }}
          {{- if .Values.securityContext.enabled }}
          securityContext:
            runAsUser: {{ .Values.securityContext.runAsUser }}
          {{- end }}
          env:
            - name: BITNAMI_DEBUG
              value: {{ ternary "true" "false" .Values.image.debug | quote }}
            - name: POSTGRESQL_PORT_NUMBER
              value: "{{ template "postgresql.port" . }}"
            - name: POSTGRESQL_VOLUME_DIR
              value: "{{ .Values.persistence.mountPath }}"
            {{- if .Values.postgresqlInitdbArgs }}
            - name: POSTGRES_INITDB_ARGS
              value: {{ .Values.postgresqlInitdbArgs | quote }}
            {{- end }}
            {{- if .Values.postgresqlInitdbWalDir }}
            - name: POSTGRES_INITDB_WALDIR
              value: {{ .Values.postgresqlInitdbWalDir | quote }}
            {{- end }}
            {{- if .Values.initdbUser }}
            - name: POSTGRESQL_INITSCRIPTS_USERNAME
              value: {{ .Values.initdbUser }}
            {{- end }}
            {{- if .Values.initdbPassword }}
            - name: POSTGRESQL_INITSCRIPTS_PASSWORD
              value: {{ .Values.initdbPassword }}
            {{- end }}
            {{- if .Values.persistence.mountPath }}
            - name: PGDATA
              value: {{ .Values.postgresqlDataDir | quote }}
            {{- end }}
            {{- if .Values.replication.enabled }}
            - name: POSTGRES_REPLICATION_MODE
              value: "master"
            - name: POSTGRES_REPLICATION_USER
              value: {{ include "postgresql.replication.username" . | quote }}
            {{- if .Values.usePasswordFile }}
            - name: POSTGRES_REPLICATION_PASSWORD_FILE
              value: "/opt/bitnami/postgresql/secrets/postgresql-replication-password"
            {{- else }}
            - name: POSTGRES_REPLICATION_PASSWORD
              valueFrom:
                secretKeyRef:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



deploy-templates/charts/postgresql/templates/viewer-statefulset.yaml [40:181]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        heritage: {{ .Release.Service | quote }}
        role: master
        collect.logs: "plain-text"
      {{- with .Values.master.podLabels }}
      {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.master.podAnnotations }}
      annotations: {{- toYaml . | nindent 8 }}
      {{- end }}
    spec:
  {{- if .Values.persistence.enabled }}
      initContainers:
        - name: init-chown-data
          image: {{ template "imageRegistry" . -}} busybox
          command: [ 'sh', '-c', 'chmod 0700 /bitnami/postgresql/data || true' ]
          volumeMounts:
            - name: data
              mountPath: /bitnami/postgresql
  {{ end }}
      {{- if .Values.schedulerName }}
      schedulerName: "{{ .Values.schedulerName }}"
      {{- end }}
{{- include "postgresql.imagePullSecrets" . | indent 6 }}
      {{- if .Values.master.nodeSelector }}
      nodeSelector: {{- toYaml .Values.master.nodeSelector | nindent 8 }}
      {{- end }}
      {{- if .Values.master.affinity }}
      affinity: {{- toYaml .Values.master.affinity | nindent 8 }}
      {{- end }}
      {{- if .Values.master.tolerations }}
      tolerations: {{- toYaml .Values.master.tolerations | nindent 8 }}
      {{- end }}
      {{- if .Values.terminationGracePeriodSeconds }}
      terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
      {{- end }}
      {{- if .Values.securityContext.enabled }}
      securityContext:
        fsGroup: {{ .Values.securityContext.fsGroup }}
      {{- end }}
      {{- if .Values.serviceAccount.enabled }}
      serviceAccountName: {{ default (include "postgresql.fullname" . ) .Values.serviceAccount.name }}
      {{- end }}
      {{- if or .Values.master.extraInitContainers (and .Values.volumePermissions.enabled (or .Values.persistence.enabled (and .Values.shmVolume.enabled .Values.shmVolume.chmod.enabled))) }}
      initContainers:
      {{- if and .Values.volumePermissions.enabled (or .Values.persistence.enabled (and .Values.shmVolume.enabled .Values.shmVolume.chmod.enabled)) }}
        - name: init-chmod-data
          image: {{ template "postgresql.volumePermissions.image" . }}
          imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
          {{- if .Values.resources }}
          resources: {{- toYaml .Values.resources | nindent 12 }}
          {{- end }}
          command:
            - /bin/sh
            - -cx
            - |
              {{- if .Values.persistence.enabled }}
              mkdir -p {{ .Values.persistence.mountPath }}/data {{- if (include "postgresql.mountConfigurationCM" .) }} {{ .Values.persistence.mountPath }}/conf {{- end }}
              chmod 700 {{ .Values.persistence.mountPath }}/data {{- if (include "postgresql.mountConfigurationCM" .) }} {{ .Values.persistence.mountPath }}/conf {{- end }}
              find {{ .Values.persistence.mountPath }} -mindepth 1 -maxdepth 1 {{- if not (include "postgresql.mountConfigurationCM" .) }} -not -name "conf" {{- end }} -not -name ".snapshot" -not -name "lost+found" | \
              {{- if eq ( toString ( .Values.volumePermissions.securityContext.runAsUser )) "auto" }}
                xargs chown -R `id -u`:`id -G | cut -d " " -f2`
              {{- else }}
                xargs chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}
              {{- end }}
              {{- end }}
              {{- if and .Values.shmVolume.enabled .Values.shmVolume.chmod.enabled }}
              chmod -R 777 /dev/shm
              {{- end }}
          {{- if eq ( toString ( .Values.volumePermissions.securityContext.runAsUser )) "auto" }}
          securityContext:
          {{- else }}
          securityContext:
            runAsUser: {{ .Values.volumePermissions.securityContext.runAsUser }}
          {{- end }}
          volumeMounts:
            {{- if .Values.persistence.enabled }}
            - name: data
              mountPath: {{ .Values.persistence.mountPath }}
              subPath: {{ .Values.persistence.subPath }}
            {{- end }}
            {{- if .Values.shmVolume.enabled }}
            - name: dshm
              mountPath: /dev/shm
            {{- end }}
      {{- end }}
      {{- if .Values.master.extraInitContainers }}
      {{- include "postgresql.tplValue" ( dict "value" .Values.master.extraInitContainers "context" $ ) | nindent 8 }}
      {{- end }}
      {{- end }}
      {{- if .Values.master.priorityClassName }}
      priorityClassName: {{ .Values.master.priorityClassName }}
      {{- end }}
      containers:
        - name: {{ template "postgresql.fullname" . }}
          image: {{ template "postgresql.image" . }}
          imagePullPolicy: "{{ .Values.image.pullPolicy }}"
          {{- if .Values.resources }}
          resources: {{- toYaml .Values.resources | nindent 12 }}
          {{- end }}
          {{- if .Values.securityContext.enabled }}
          securityContext:
            runAsUser: {{ .Values.securityContext.runAsUser }}
          {{- end }}
          env:
            - name: BITNAMI_DEBUG
              value: {{ ternary "true" "false" .Values.image.debug | quote }}
            - name: POSTGRESQL_PORT_NUMBER
              value: "{{ template "postgresql.port" . }}"
            - name: POSTGRESQL_VOLUME_DIR
              value: "{{ .Values.persistence.mountPath }}"
            {{- if .Values.postgresqlInitdbArgs }}
            - name: POSTGRES_INITDB_ARGS
              value: {{ .Values.postgresqlInitdbArgs | quote }}
            {{- end }}
            {{- if .Values.postgresqlInitdbWalDir }}
            - name: POSTGRES_INITDB_WALDIR
              value: {{ .Values.postgresqlInitdbWalDir | quote }}
            {{- end }}
            {{- if .Values.initdbUser }}
            - name: POSTGRESQL_INITSCRIPTS_USERNAME
              value: {{ .Values.initdbUser }}
            {{- end }}
            {{- if .Values.initdbPassword }}
            - name: POSTGRESQL_INITSCRIPTS_PASSWORD
              value: {{ .Values.initdbPassword }}
            {{- end }}
            {{- if .Values.persistence.mountPath }}
            - name: PGDATA
              value: {{ .Values.postgresqlDataDir | quote }}
            {{- end }}
            {{- if .Values.replication.enabled }}
            - name: POSTGRES_REPLICATION_MODE
              value: "master"
            - name: POSTGRES_REPLICATION_USER
              value: {{ include "postgresql.replication.username" . | quote }}
            {{- if .Values.usePasswordFile }}
            - name: POSTGRES_REPLICATION_PASSWORD_FILE
              value: "/opt/bitnami/postgresql/secrets/postgresql-replication-password"
            {{- else }}
            - name: POSTGRES_REPLICATION_PASSWORD
              valueFrom:
                secretKeyRef:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



