Skip to content

Commit

Permalink
helm/hive: Do not use hooks for secret (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr authored Nov 5, 2019
1 parent a8c5f73 commit 78f702b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions helm/charts/hive/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "hive.labels" . | indent 4 }}
annotations:
# Create the secret before installation, and only then. This saves the secret from regenerating during an upgrade
"helm.sh/hook": "pre-install"
"helm.sh/hook-delete-policy": "before-hook-creation"
type: Opaque
data:
dsn: {{ .Values.hive.config.dsn | b64enc | quote }}
# Generate a random secret if the user doesn't give one. User given password has priority
secretsSession: {{ ( include "hive.secrets.session" . | default ( randAlphaNum 32 )) | required "Value secrets.session can not be empty!" | b64enc | quote }}
secretsSession: {{ ( include "hive.secrets.session" . | required "Value hive.config.secrets.session can not be empty!" | b64enc | quote }}

0 comments on commit 78f702b

Please sign in to comment.