mirror of
https://github.com/mastodon/chart
synced 2025-05-18 13:03:21 +00:00
fix helm templating issue
This commit is contained in:
parent
cf492363d6
commit
fd2bde68f3
|
@ -95,7 +95,7 @@ mastodon:
|
||||||
# -- you can also specify the name of an existing Secret
|
# -- you can also specify the name of an existing Secret
|
||||||
# with keys SECRET_KEY_BASE and OTP_SECRET and
|
# with keys SECRET_KEY_BASE and OTP_SECRET and
|
||||||
# VAPID_PRIVATE_KEY and VAPID_PUBLIC_KEY
|
# VAPID_PRIVATE_KEY and VAPID_PUBLIC_KEY
|
||||||
# existingSecret: ""
|
existingSecret: ""
|
||||||
|
|
||||||
sidekiq:
|
sidekiq:
|
||||||
# -- Pod security context for all Sidekiq Pods, overwrites .Values.podSecurityContext
|
# -- Pod security context for all Sidekiq Pods, overwrites .Values.podSecurityContext
|
||||||
|
|
|
@ -89,9 +89,16 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||||
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Get the mastodon secret.
|
||||||
|
*/}}
|
||||||
{{- define "mastodon.secretName" -}}
|
{{- define "mastodon.secretName" -}}
|
||||||
{{- default "secret" .Values.mastodon.secrets.existingSecret }}
|
{{- if .Values.mastodon.secrets.existingSecret }}
|
||||||
{{- end }}
|
{{- printf "%s" (tpl .Values.mastodon.secrets.existingSecret $) -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" (include "common.names.fullname" .) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Get the smtp secret.
|
Get the smtp secret.
|
||||||
|
@ -130,6 +137,19 @@ Get the redis secret.
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return true if a mastodon secret object should be created
|
||||||
|
*/}}
|
||||||
|
{{- define "mastodon.createSecret" -}}
|
||||||
|
{{- if (or
|
||||||
|
(and .Values.mastodon.s3.enabled (not .Values.mastodon.s3.existingSecret))
|
||||||
|
(not .Values.mastodon.secrets.existingSecret )
|
||||||
|
(and (not .Values.postgresql.enabled) (not .Values.postgresql.auth.existingSecret))
|
||||||
|
) -}}
|
||||||
|
{{- true -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Find highest number of needed database connections to set DB_POOL variable
|
Find highest number of needed database connections to set DB_POOL variable
|
||||||
*/}}
|
*/}}
|
||||||
|
|
|
@ -83,7 +83,7 @@ spec:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: {{ include "mastodon.fullname" $context }}-env
|
name: {{ include "mastodon.fullname" $context }}-env
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ template "mastodon.secretName" . }}
|
name: {{ template "mastodon.secretName" $context }}
|
||||||
env:
|
env:
|
||||||
- name: "DB_PASS"
|
- name: "DB_PASS"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user