Skip to content

Commit

Permalink
chore: static secret for webserver
Browse files Browse the repository at this point in the history
  • Loading branch information
pbastia committed Feb 22, 2024
1 parent 235fa41 commit 13bbfe5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions helm/cas-airflow/templates/secrets/webserver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- $webserverSecret := (randAlphaNum 32) | b64enc | quote }}

{{- $secretName := printf "%s-%s" .Release.Name "webserver-secret" }}
{{- $secret := (lookup "v1" "Secret" .Release.Namespace $secretName ) }}
{{- if $secret }}
{{- $webserverSecret = index $secret.data "webserver-secret-key" }}
{{- end -}}


apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
labels: {{ include "cas-airflow.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": "pre-install,pre-upgrade"
type: Opaque
data:
webserver-secret-key: {{ $webserverSecret }}
2 changes: 2 additions & 0 deletions helm/cas-airflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ airflow:
protocol: postgresql

# Airflow webserver settings
webserverSecretKeySecretName: cas-airflow-webserver-secret

webserver:
replicas: 2
resources:
Expand Down

0 comments on commit 13bbfe5

Please sign in to comment.