mirror of
https://github.com/mastodon/chart
synced 2025-05-17 20:43:21 +00:00
Fix redis secret from values not being used in db-prepare
This commit is contained in:
parent
86cd73a766
commit
0c6f2594d5
|
@ -102,7 +102,15 @@ spec:
|
||||||
- name: "REDIS_PASSWORD"
|
- name: "REDIS_PASSWORD"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
{{- if .prepare }}
|
||||||
|
{{- if and (not .Values.redis.enabled) (and (not .Values.redis.auth.existingSecret) (not .Values.redis.existingSecret)) (.Values.redis.auth.password) }}
|
||||||
|
name: {{ template "mastodon.redis.secretName" . }}-pre-install
|
||||||
|
{{- else }}
|
||||||
name: {{ template "mastodon.redis.secretName" . }}
|
name: {{ template "mastodon.redis.secretName" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
name: {{ template "mastodon.redis.secretName" . }}
|
||||||
|
{{- end }}
|
||||||
key: redis-password
|
key: redis-password
|
||||||
{{- if .preDeploy }}
|
{{- if .preDeploy }}
|
||||||
- name: "SKIP_POST_DEPLOYMENT_MIGRATIONS"
|
- name: "SKIP_POST_DEPLOYMENT_MIGRATIONS"
|
||||||
|
|
19
templates/secret-redis-preinstall.yaml
Normal file
19
templates/secret-redis-preinstall.yaml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{{- if not .Values.redis.enabled }}
|
||||||
|
{{- if and (not .Values.redis.auth.existingSecret) (not .Values.redis.existingSecret) }}
|
||||||
|
{{- if .Values.redis.auth.password }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ include "mastodon.redis.secretName" . }}-pre-install
|
||||||
|
labels:
|
||||||
|
{{- include "mastodon.labels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
helm.sh/hook: pre-install
|
||||||
|
helm.sh/hook-weight: "-5"
|
||||||
|
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
redis-password: "{{ .Values.redis.auth.password | b64enc }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
Loading…
Reference in New Issue
Block a user