Skip to content

Commit

Permalink
replace common.names.fullname with mastodon.name
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrbrbik committed Nov 29, 2024
1 parent 6a72e91 commit 5d08eb9
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions charts/mastodon/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ Expand the name of the chart.
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

+{{/*
+Create common names fullname.
+*/}}
+{{- define "common.names.fullname" -}}
+{{- default .Chart.Name | trunc 63 | trimSuffix "-" }}
+{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
Expand Down Expand Up @@ -86,7 +79,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.name" .) -}}
{{- end -}}
{{- end -}}

Expand All @@ -97,7 +90,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.name" .) -}}
{{- end -}}
{{- end -}}

Expand All @@ -124,7 +117,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.name" .) -}}
{{- end -}}
{{- end -}}

Expand All @@ -135,7 +128,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.name" .) -}}
{{- end -}}
{{- end -}}

Expand All @@ -150,7 +143,7 @@ Get the postgresql secret.
{{- 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.name" .) -}}
{{- end -}}
{{- end -}}

Expand Down

0 comments on commit 5d08eb9

Please sign in to comment.