[bitnami/common] use -d flag for base64 (#10491)

* fix #10486

Signed-off-by: Andrew Horvath <ah@ak3.io>

* Update Chart.yaml

Signed-off-by: Carlos Rodriguez Hernandez <carlosrh@vmware.com>

Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
This commit is contained in:
Andrew Horvath
2022-05-30 19:20:18 +02:00
committed by GitHub
parent d5f42554a7
commit ca8d5886a1
3 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ annotations:
category: Infrastructure
apiVersion: v2
# Please make sure that version and appVersion are always the same.
appVersion: 1.13.1
appVersion: 1.14.2
description: A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself.
home: https://github.com/bitnami/charts/tree/master/bitnami/common
icon: https://bitnami.com/downloads/logos/bitnami-mark.png
@@ -20,4 +20,4 @@ sources:
- https://github.com/bitnami/charts
- https://www.bitnami.com/
type: library
version: 1.14.1
version: 1.14.2

View File

@@ -300,11 +300,11 @@ If we force those values to be empty we will see some alerts
$ helm install test mychart --set path.to.value00="",path.to.value01=""
'path.to.value00' must not be empty, please add '--set path.to.value00=$PASSWORD_00' to the command. To get the current value:
export PASSWORD_00=$(kubectl get secret --namespace default secretName -o jsonpath="{.data.password-00}" | base64 --decode)
export PASSWORD_00=$(kubectl get secret --namespace default secretName -o jsonpath="{.data.password-00}" | base64 -d)
'path.to.value01' must not be empty, please add '--set path.to.value01=$PASSWORD_01' to the command. To get the current value:
export PASSWORD_01=$(kubectl get secret --namespace default secretName -o jsonpath="{.data.password-01}" | base64 --decode)
export PASSWORD_01=$(kubectl get secret --namespace default secretName -o jsonpath="{.data.password-01}" | base64 -d)
```
## Upgrading

View File

@@ -6,7 +6,7 @@ Usage:
*/}}
{{- define "common.utils.secret.getvalue" -}}
{{- $varname := include "common.utils.fieldToEnvVar" . -}}
export {{ $varname }}=$(kubectl get secret --namespace {{ .context.Release.Namespace | quote }} {{ .secret }} -o jsonpath="{.data.{{ .field }}}" | base64 --decode)
export {{ $varname }}=$(kubectl get secret --namespace {{ .context.Release.Namespace | quote }} {{ .secret }} -o jsonpath="{.data.{{ .field }}}" | base64 -d)
{{- end -}}
{{/*