Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/mastodon/templates/_db-migrate.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ spec:
{{- else }}
name: {{ template "mastodon.redis.secretName" . }}
{{- end }}
key: redis-password
key: {{ .Values.redis.auth.existingSecretPasswordKey | default "redis-password" }}
{{- if .preDeploy }}
- name: "SKIP_POST_DEPLOYMENT_MIGRATIONS"
value: "true"
Expand Down
24 changes: 12 additions & 12 deletions charts/mastodon/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Create the name of the assets persistent volume to use
{{- if .Values.mastodon.persistence.assets.existingClaim }}
{{- printf "%s" (tpl .Values.mastodon.persistence.assets.existingClaim $) -}}
{{- else -}}
{{- printf "%s-assets" (include "common.names.fullname" .) -}}
{{- printf "%s-assets" (include "mastodon.fullname" .) -}}
{{- end -}}
{{- end -}}

Expand All @@ -100,7 +100,7 @@ Create the name of the system persistent volume to use
{{- if .Values.mastodon.persistence.system.existingClaim }}
{{- printf "%s" (tpl .Values.mastodon.persistence.system.existingClaim $) -}}
{{- else -}}
{{- printf "%s-system" (include "common.names.fullname" .) -}}
{{- printf "%s-system" (include "mastodon.fullname" .) -}}
{{- end -}}
{{- end -}}

Expand All @@ -109,15 +109,15 @@ Create a default fully qualified name for dependent services.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "mastodon.elasticsearch.fullname" -}}
{{- printf "%s-%s" .Release.Name "elasticsearch" | trunc 63 | trimSuffix "-" -}}
{{- printf "%s-elasticsearch" (include "mastodon.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "mastodon.redis.fullname" -}}
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
{{- printf "%s-redis" (include "mastodon.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "mastodon.postgresql.fullname" -}}
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
{{- printf "%s-postgresql" (include "mastodon.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Expand Down Expand Up @@ -181,7 +181,7 @@ Get the mastodon secret.
{{- if .Values.mastodon.secrets.existingSecret }}
{{- printf "%s" (tpl .Values.mastodon.secrets.existingSecret $) -}}
{{- else -}}
{{- printf "%s" (include "common.names.fullname" .) -}}
{{- printf "%s" (include "mastodon.fullname" .) -}}
{{- end -}}
{{- end -}}

Expand All @@ -192,7 +192,7 @@ Get the smtp secret.
{{- if .Values.mastodon.smtp.existingSecret }}
{{- printf "%s" (tpl .Values.mastodon.smtp.existingSecret $) -}}
{{- else -}}
{{- printf "%s-smtp" (include "common.names.fullname" .) -}}
{{- printf "%s-smtp" (include "mastodon.fullname" .) -}}
{{- end -}}
{{- end -}}

Expand All @@ -212,11 +212,11 @@ Get the postgresql secret.
{{- if (and (or .Values.postgresql.enabled .Values.postgresql.postgresqlHostname) .Values.postgresql.auth.existingSecret) }}
{{- printf "%s" (tpl .Values.postgresql.auth.existingSecret $) -}}
{{- else if and .Values.postgresql.enabled (not .Values.postgresql.auth.existingSecret) -}}
{{- printf "%s-postgresql" (tpl .Release.Name $) -}}
{{- printf "%s-postgresql" (include "mastodon.fullname" $) -}}
{{- else if and .Values.externalDatabase.enabled .Values.externalDatabase.existingSecret -}}
{{- printf "%s" (tpl .Values.externalDatabase.existingSecret $) -}}
{{- else -}}
{{- printf "%s" (include "common.names.fullname" .) -}}
{{- printf "%s" (include "mastodon.fullname" .) -}}
{{- end -}}
{{- end -}}

Expand All @@ -229,7 +229,7 @@ Get the redis secret name
{{- else if .Values.redis.existingSecret }}
{{- printf "%s" (tpl .Values.redis.existingSecret $) -}}
{{- else -}}
{{- printf "%s-redis" (tpl .Release.Name $) -}}
{{- printf "%s-redis" (include "mastodon.fullname" $) -}}
{{- end -}}
{{- end -}}

Expand All @@ -244,7 +244,7 @@ Get the redis secret (sidekiq).
{{- else if .Values.redis.existingSecret }}
{{- printf "%s" (tpl .Values.redis.existingSecret $) -}}
{{- else -}}
{{- printf "%s-redis" (tpl .Release.Name $) -}}
{{- printf "%s-redis" (include "mastodon.fullname" $) -}}
{{- end -}}
{{- end -}}

Expand All @@ -259,7 +259,7 @@ Get the redis secret (cache).
{{- else if .Values.redis.existingSecret }}
{{- printf "%s" (tpl .Values.redis.existingSecret $) -}}
{{- else -}}
{{- printf "%s-redis" (tpl .Release.Name $) -}}
{{- printf "%s-redis" (include "mastodon.fullname" $) -}}
{{- end -}}
{{- end -}}

Expand Down
4 changes: 2 additions & 2 deletions charts/mastodon/templates/_secrets.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ metadata:
{{- include "mastodon.labels" . | nindent 4 }}
annotations:
{{- if .prepare }}
"helm.sh/hook": pre-install
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
"helm.sh/hook-weight": "-3"
"helm.sh/hook-weight": "-10"
{{- end }}
type: Opaque
data:
Expand Down
4 changes: 2 additions & 2 deletions charts/mastodon/templates/configmap-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ metadata:
labels:
{{- include "mastodon.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-weight": "-3"
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "-10"
"helm.sh/resource-policy": keep
data:
{{- if .Values.postgresql.enabled }}
Expand Down
2 changes: 1 addition & 1 deletion charts/mastodon/templates/job-deploy-search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ spec:
valueFrom:
secretKeyRef:
name: {{ template "mastodon.redis.secretName" . }}
key: redis-password
key: {{ .Values.redis.auth.existingSecretPasswordKey | default "redis-password" }}
- name: "PORT"
value: {{ .Values.mastodon.web.port | quote }}
{{- if (not .Values.mastodon.s3.enabled) }}
Expand Down