Skip to content

Commit

Permalink
fix: reuse API KEY if it is already available. (#280)
Browse files Browse the repository at this point in the history
fix the key for reusing the secret.

Signed-off-by: OMPRAKASH MISHRA <[email protected]>
  • Loading branch information
mishraomp authored Nov 3, 2023
1 parent 87f82b4 commit d642d02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion charts/pubcode/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d642d02

Please sign in to comment.