From 7c34046e546e6ac0a43c96d1e4f20158a2ea50a4 Mon Sep 17 00:00:00 2001 From: Sebastian Florek Date: Fri, 17 Jan 2025 17:55:30 +0100 Subject: [PATCH] update osartifact helm chart --- charts/osartifact/Chart.yaml | 2 +- charts/osartifact/templates/secret.yaml | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/charts/osartifact/Chart.yaml b/charts/osartifact/Chart.yaml index 8245d18..681fbec 100644 --- a/charts/osartifact/Chart.yaml +++ b/charts/osartifact/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v2 name: osartifact description: A Helm chart for OSArtifact CRD deployment type: application -version: 0.2.0 \ No newline at end of file +version: 0.3.0 \ No newline at end of file diff --git a/charts/osartifact/templates/secret.yaml b/charts/osartifact/templates/secret.yaml index 10ca0f5..1dfee54 100644 --- a/charts/osartifact/templates/secret.yaml +++ b/charts/osartifact/templates/secret.yaml @@ -1,6 +1,11 @@ {{ $tokenSecret := (lookup "v1" "Secret" .Release.Namespace .Values.tokenSecret.name) }} {{ $passwordSecret := (lookup "v1" "Secret" .Release.Namespace .Values.passwordSecret.name) }} +{{- if and $tokenSecret $passwordSecret }} + +{{ $token := index $tokenSecret.data .Values.tokenSecret.key | b64dec }} +{{ $password := index $passwordSecret.data .Values.passwordSecret.key | b64dec }} + kind: Secret apiVersion: v1 metadata: @@ -12,7 +17,7 @@ stringData: users: - name: {{ .Values.username }} - passwd: {{ index $passwordSecret .Values.passwordSecret.key }} + passwd: {{ $password }} {{- with .Values.defaultUser }} groups: [ {{- range .groups -}} @@ -68,10 +73,11 @@ stringData: {{- end }} plural: - token: {{ index $tokenSecret .Values.tokenSecret.key }} + token: {{ $token }} url: {{ .Values.url }} {{- if .Values.extraUserCloudConfig }} {{ .Values.extraCloudConfig | toYaml | nindent 4 }} {{- end }} +{{- end}} \ No newline at end of file