From d642d02ffbae742704df93143a57f42f93056f19 Mon Sep 17 00:00:00 2001 From: Om Mishra <32200996+mishraomp@users.noreply.github.com> Date: Fri, 3 Nov 2023 13:46:16 -0700 Subject: [PATCH] fix: reuse API KEY if it is already available. (#280) fix the key for reusing the secret. Signed-off-by: OMPRAKASH MISHRA --- charts/pubcode/templates/secret.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/pubcode/templates/secret.yaml b/charts/pubcode/templates/secret.yaml index c5d8f21..6da9275 100644 --- a/charts/pubcode/templates/secret.yaml +++ b/charts/pubcode/templates/secret.yaml @@ -3,7 +3,7 @@ {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace .Release.Name ) | default dict }} {{- $secretData := (get $secretObj "data") | default dict }} # set below to existing secret data or generate a random one when not exists -{{- $apiKey := (get $secretData "apiKey") | default (randAlphaNum 32 | b64enc) }} +{{- $apiKey := (get $secretData "API_KEY") | default (randAlphaNum 32 | b64enc) }} --- apiVersion: v1 kind: Secret