mirror of
https://github.com/mastodon/chart
synced 2025-03-14 21:11:50 +00:00
Add global labels
This commit is contained in:
parent
bc19788acc
commit
4e742ac8e1
|
@ -31,12 +31,22 @@ Create chart name and version as used by the chart label.
|
|||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Labels added on every Mastodon resource
|
||||
*/}}
|
||||
{{- define "mastodon.globalLabels" -}}
|
||||
{{- range $k, $v := .Values.mastodon.labels }}
|
||||
{{ $k }}: {{ quote $v }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "mastodon.labels" -}}
|
||||
helm.sh/chart: {{ include "mastodon.chart" . }}
|
||||
{{ include "mastodon.selectorLabels" . }}
|
||||
{{ include "mastodon.globalLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
|
|
|
@ -37,6 +37,7 @@ spec:
|
|||
{{- include "mastodon.rollingPodAnnotations" $context | nindent 8 }}
|
||||
checksum/config-secrets: {{ include ( print $.Template.BasePath "/secret-smtp.yaml" ) $context | sha256sum | quote }}
|
||||
labels:
|
||||
{{- include "mastodon.globalLabels" $context | nindent 8 }}
|
||||
{{- include "mastodon.selectorLabels" $context | nindent 8 }}
|
||||
{{- include "mastodon.statsdExporterLabels" $context | nindent 8 }}
|
||||
app.kubernetes.io/component: sidekiq-{{ .name }}
|
||||
|
|
|
@ -23,6 +23,7 @@ spec:
|
|||
# roll the pods to pick up any db migrations or other changes
|
||||
{{- include "mastodon.rollingPodAnnotations" . | nindent 8 }}
|
||||
labels:
|
||||
{{- include "mastodon.globalLabels" . | nindent 8 }}
|
||||
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: streaming
|
||||
spec:
|
||||
|
|
|
@ -24,6 +24,7 @@ spec:
|
|||
# roll the pods to pick up any db migrations or other changes
|
||||
{{- include "mastodon.rollingPodAnnotations" . | nindent 8 }}
|
||||
labels:
|
||||
{{- include "mastodon.globalLabels" . | nindent 8 }}
|
||||
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
||||
{{- include "mastodon.statsdExporterLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: web
|
||||
|
|
Loading…
Reference in New Issue
Block a user