Merge pull request #720 from bitnami/postgresql-password

Use env var instead of showing the password for the cli
This commit is contained in:
Beltran
2018-07-24 11:17:53 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
name: postgresql
version: 1.0.4
version: 1.0.5
appVersion: 10.4.0-debian-9
description: Chart for PostgreSQL
keywords:

View File

@@ -27,7 +27,7 @@ To get the password for "{{ .Values.postgresqlUsername }}" run:
To connect to your database run the following command:
kubectl run {{ template "postgresql.fullname" . }}-client --rm --tty -i --image bitnami/postgresql {{- if .Values.postgresqlPassword }}--env="PGPASSWORD={{ .Values.postgresqlPassword}}"{{- end }} --command -- psql --host {{ template "postgresql.fullname" . }} -U {{ .Values.postgresqlUsername }}
kubectl run {{ template "postgresql.fullname" . }}-client --rm --tty -i --image bitnami/postgresql --env="PGPASSWORD=$POSTGRESQL_PASSWORD" --command -- psql --host {{ template "postgresql.fullname" . }} -U {{ .Values.postgresqlUsername }}
To connect to your database from outside the cluster execute the following commands:
@@ -51,4 +51,4 @@ To connect to your database from outside the cluster execute the following comma
kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 5432:5432 &
{{ if .Values.postgresqlPassword }}PGPASSWORD={{ .Values.postgresqlPassword}} "{{- end }}psql --host 127.0.0.1 -U {{ .Values.postgresqlUsername }}
{{- end }}
{{- end }}