mirror of
https://github.com/bitnami/charts.git
synced 2026-03-06 15:10:15 +08:00
* Don't put postgresql-postgres-password in secret when not needed
When only using the "postgres" user, the secret gets updated every helm upgrade with a
random string. When using with argocd (and maybe other gitops tools) there are always
changes until you put a dummy value into postgresqlPostgresPassword.
Use the same conditional as in statefulset.yaml:
~~~
{{- if not (eq (include "postgresql.username" .) "postgres") }}
# (..)
- name: POSTGRES_POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "postgresql.secretName" . }}
key: postgresql-postgres-password
{{- end }}
{{- end }}
~~~
* Use same conditional for readreplicas
In PR #4380 we forgot to also change the 2nd statefulset for the readreplicas
25 lines
1009 B
YAML
25 lines
1009 B
YAML
{{- if (include "postgresql.createSecret" .) }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ template "common.names.fullname" . }}
|
|
labels:
|
|
{{- include "common.labels.standard" . | nindent 4 }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
namespace: {{ .Release.Namespace }}
|
|
type: Opaque
|
|
data:
|
|
{{- if not (eq (include "postgresql.username" .) "postgres") }}
|
|
postgresql-postgres-password: {{ include "postgresql.postgres.password" . | b64enc | quote }}
|
|
{{- end }}
|
|
postgresql-password: {{ include "postgresql.password" . | b64enc | quote }}
|
|
{{- if .Values.replication.enabled }}
|
|
postgresql-replication-password: {{ include "postgresql.replication.password" . | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if (and .Values.ldap.enabled .Values.ldap.bind_password)}}
|
|
postgresql-ldap-password: {{ .Values.ldap.bind_password | b64enc | quote }}
|
|
{{- end }}
|
|
{{- end -}}
|