From ffddb0055ddd190b4a21c857bf5cd76d07e1b68d Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Fri, 24 Feb 2017 10:18:47 +0530 Subject: [PATCH] postgresql: fix fetching of postgresql-password from the secrets --- incubator/postgresql/templates/NOTES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/incubator/postgresql/templates/NOTES.txt b/incubator/postgresql/templates/NOTES.txt index 26ba0a070..4a5782c20 100644 --- a/incubator/postgresql/templates/NOTES.txt +++ b/incubator/postgresql/templates/NOTES.txt @@ -5,4 +5,4 @@ PostgreSQL can be accessed on port 5432 on the following DNS name from within yo To connect to your database run the following command: -kubectl run {{ template "fullname" . }}-client -it --rm --image {{ .Values.image }} --env PGPASSWORD=$(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.postgresql-password[*]}"`)) --command -- psql -h {{ template "fullname" . }} -U {{ .Values.postgresqlUsername }}{{- if .Values.postgresqlDatabase }} -d {{ .Values.postgresqlDatabase }}{{- end -}} +kubectl run {{ template "fullname" . }}-client -it --rm --image {{ .Values.image }} --env PGPASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.postgresql-password}" | base64 --decode) --command -- psql -h {{ template "fullname" . }} -U {{ .Values.postgresqlUsername }}{{- if .Values.postgresqlDatabase }} -d {{ .Values.postgresqlDatabase }}{{- end -}}