mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-14 11:58:02 +00:00
feat(charts): Update helm chart to support password from secret (#799)
* feat(server): Enable overriding --requirepass form env var Signed-off-by: ashotland <ari@dragonflydb.io> * Change precednce order Elaborate test Signed-off-by: ashotland <ari@dragonflydb.io> * Update helm chart to support passowrd from secret Using recently added capability of setting dragonfly passowrd with the DFLY_PASSWORD environment variable Signed-off-by: ashotland <ari@dragonflydb.io> * rename to existingSecret* + CI file Signed-off-by: ashotland <ari@dragonflydb.io> * fix typo in comment Signed-off-by: ashotland <ari@dragonflydb.io> --------- Signed-off-by: ashotland <ari@dragonflydb.io>
This commit is contained in:
parent
2b40a7f324
commit
d6043c7d6d
3 changed files with 30 additions and 0 deletions
13
contrib/charts/dragonfly/ci/passwordsecret-values.yaml
Normal file
13
contrib/charts/dragonfly/ci/passwordsecret-values.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
extraObjects:
|
||||
- apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: dfly-password
|
||||
stringData:
|
||||
password: foobar
|
||||
|
||||
passwordFromSecret:
|
||||
enable: true
|
||||
existingSecret:
|
||||
name: dfly-password
|
||||
key: password
|
|
@ -67,6 +67,14 @@ containers:
|
|||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- include "dragonfly.volumemounts" . | nindent 4 }}
|
||||
env:
|
||||
{{- if .Values.passwordFromSecret.enable }}
|
||||
- name: DFLY_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.passwordFromSecret.existingSecret.name }}
|
||||
key: {{ .Values.passwordFromSecret.existingSecret.key }}
|
||||
{{- end }}
|
||||
{{- with .Values.extraContainers }}
|
||||
{{- if eq (typeOf .) "string" }}
|
||||
{{- tpl . $ | nindent 2 }}
|
||||
|
|
|
@ -123,6 +123,15 @@ tls:
|
|||
# HLunol88AeTOcKfD6hBYGvcRfu5NV29jJxZCOBfbFQXjnNlnrhRCag==
|
||||
# -----END RSA PRIVATE KEY-----
|
||||
|
||||
# If enabled will set DFLY_PASSOWRD environment variable with the specified existing secret value
|
||||
# Note that if enabled and the secret does not exist pods will not start
|
||||
passwordFromSecret:
|
||||
enable: false
|
||||
existingSecret:
|
||||
name: ""
|
||||
key: ""
|
||||
|
||||
|
||||
probes:
|
||||
livenessProbe:
|
||||
exec:
|
||||
|
|
Loading…
Reference in a new issue