Skip to content

Commit 94c7421

Browse files
authored
Merge pull request #14 from jianxiaoguo/main
fixup(postgres): user name converted to lowercase letters
2 parents 155b819 + 33ed5ed commit 94c7421

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ ENV PGDATA /data/${PG_MAJOR}
1010

1111
RUN install-packages gcc \
1212
&& install-stack python $PYTHON_VERSION \
13-
&& install-stack postgresql $POSTGRESQL_VERSION && . init-stack \
13+
&& install-stack postgresql $POSTGRESQL_VERSION \
14+
&& . init-stack \
1415
&& set -eux; pip3 install --disable-pip-version-check --no-cache-dir psycopg[binary] patroni[kubernetes] 2>/dev/null; set +eux \
1516
&& apt-get purge -y --auto-remove gcc \
1617
&& apt-get autoremove -y \

charts/database/templates/database-secret-creds.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ metadata:
99
annotations:
1010
"helm.sh/hook": pre-install
1111
data:
12-
superuser: {{ if .Values.superuser | default "" | ne "" }}{{ .Values.superuser | b64enc }}{{ else }}{{ randAlpha 32 | b64enc }}{{ end }}
12+
superuser: {{ if .Values.superuser | default "" | ne "" }}{{ .Values.superuser | lower | b64enc }}{{ else }}{{ randAlpha 32 | lower | b64enc }}{{ end }}
1313
superuser-password: {{ if .Values.superuserPassword | default "" | ne "" }}{{ .Values.superuserPassword | b64enc }}{{ else }}{{ randAlphaNum 32 | b64enc }}{{ end }}
14-
replicator: {{ if .Values.replicator | default "" | ne "" }}{{ .Values.replicator | b64enc }}{{ else }}{{ randAlpha 32 | b64enc }}{{ end }}
14+
replicator: {{ if .Values.replicator | default "" | ne "" }}{{ .Values.replicator | lower | b64enc }}{{ else }}{{ randAlpha 32 | lower | b64enc }}{{ end }}
1515
replicator-password: {{ if .Values.replicatorPassword | default "" | ne "" }}{{ .Values.replicatorPassword | b64enc }}{{ else }}{{ randAlphaNum 32 | b64enc }}{{ end }}
16-
user: {{ if .Values.user | default "" | ne "" }}{{ .Values.user | b64enc }}{{ else }}{{ randAlpha 32 | b64enc }}{{ end }}
16+
user: {{ if .Values.user | default "" | ne "" }}{{ .Values.user | lower | b64enc }}{{ else }}{{ randAlpha 32 | lower | b64enc }}{{ end }}
1717
password: {{ if .Values.password | default "" | ne "" }}{{ .Values.password | b64enc }}{{ else }}{{ randAlphaNum 32 | b64enc }}{{ end }}
1818
{{- end }}

charts/database/templates/database-service.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ metadata:
1212
spec:
1313
type: ClusterIP
1414
ports:
15-
- name: postgres
16-
port: 5432
15+
- port: 5432
1716
targetPort: 5432
1817
{{- end }}

charts/database/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ persistence:
4848
## If the PV uses a different storage class, specify that here.
4949
storageClass: ""
5050
# The username and password to be used by the on-cluster database.
51-
# If left empty they will be generated using randAlphaNum
51+
# If left empty they will be generated
52+
# The user name should be set to lowercase letters
5253
superuser: "postgres"
5354
superuserPassword: ""
5455
replicator: "standby"

0 commit comments

Comments
 (0)