Skip to content

Commit

Permalink
Django secret key existing secret (#135)
Browse files Browse the repository at this point in the history
* Fixes #134: Allow setting DJANGO_SECRET_KEY from existing secret

* bump version to 0.18.1
  • Loading branch information
voldemortensen authored May 30, 2023
1 parent 00b0a63 commit 89d9c9b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/flagsmith/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: flagsmith
description: Flagsmith
type: application
version: 0.18.0
version: 0.18.1
appVersion: 2.42.1
dependencies:
- name: postgresql
Expand Down
5 changes: 5 additions & 0 deletions charts/flagsmith/templates/_api_environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@
- name: DJANGO_SECRET_KEY
valueFrom:
secretKeyRef:
{{- if .Values.api.secretKeyFromExistingSecret.enabled }}
name: {{ .Values.api.secretKeyFromExistingSecret.name }}
key: {{ .Values.api.secretKeyFromExistingSecret.key }}
{{- else }}
name: {{ template "flagsmith.fullname" . }}
key: DJANGO_SECRET_KEY
{{- end }}
{{- if .Values.influxdb2.enabled }}
- name: INFLUXDB_URL
value: http://{{- template "flagsmith.influxdb.hostname" . -}}:80
Expand Down
4 changes: 4 additions & 0 deletions charts/flagsmith/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ api:
extraEnvFromSecret: {}
# See https://docs.flagsmith.com/deployment/locally-api#creating-a-secret-key
secretKey: null
secretKeyFromExistingSecret:
enabled: false
name: null
key: null
nodeSelector: {}
tolerations: []
affinity: {}
Expand Down

0 comments on commit 89d9c9b

Please sign in to comment.