mirror of
https://github.com/mastodon/chart
synced 2025-03-15 13:31:51 +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 "-" }}
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Labels added on every Mastodon resource
|
||||||
|
*/}}
|
||||||
|
{{- define "mastodon.globalLabels" -}}
|
||||||
|
{{- range $k, $v := .Values.mastodon.labels }}
|
||||||
|
{{ $k }}: {{ quote $v }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Common labels
|
Common labels
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "mastodon.labels" -}}
|
{{- define "mastodon.labels" -}}
|
||||||
helm.sh/chart: {{ include "mastodon.chart" . }}
|
helm.sh/chart: {{ include "mastodon.chart" . }}
|
||||||
{{ include "mastodon.selectorLabels" . }}
|
{{ include "mastodon.selectorLabels" . }}
|
||||||
|
{{ include "mastodon.globalLabels" . }}
|
||||||
{{- if .Chart.AppVersion }}
|
{{- if .Chart.AppVersion }}
|
||||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -37,6 +37,7 @@ spec:
|
||||||
{{- include "mastodon.rollingPodAnnotations" $context | nindent 8 }}
|
{{- include "mastodon.rollingPodAnnotations" $context | nindent 8 }}
|
||||||
checksum/config-secrets: {{ include ( print $.Template.BasePath "/secret-smtp.yaml" ) $context | sha256sum | quote }}
|
checksum/config-secrets: {{ include ( print $.Template.BasePath "/secret-smtp.yaml" ) $context | sha256sum | quote }}
|
||||||
labels:
|
labels:
|
||||||
|
{{- include "mastodon.globalLabels" $context | nindent 8 }}
|
||||||
{{- include "mastodon.selectorLabels" $context | nindent 8 }}
|
{{- include "mastodon.selectorLabels" $context | nindent 8 }}
|
||||||
{{- include "mastodon.statsdExporterLabels" $context | nindent 8 }}
|
{{- include "mastodon.statsdExporterLabels" $context | nindent 8 }}
|
||||||
app.kubernetes.io/component: sidekiq-{{ .name }}
|
app.kubernetes.io/component: sidekiq-{{ .name }}
|
||||||
|
|
|
@ -23,6 +23,7 @@ spec:
|
||||||
# roll the pods to pick up any db migrations or other changes
|
# roll the pods to pick up any db migrations or other changes
|
||||||
{{- include "mastodon.rollingPodAnnotations" . | nindent 8 }}
|
{{- include "mastodon.rollingPodAnnotations" . | nindent 8 }}
|
||||||
labels:
|
labels:
|
||||||
|
{{- include "mastodon.globalLabels" . | nindent 8 }}
|
||||||
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
||||||
app.kubernetes.io/component: streaming
|
app.kubernetes.io/component: streaming
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -24,6 +24,7 @@ spec:
|
||||||
# roll the pods to pick up any db migrations or other changes
|
# roll the pods to pick up any db migrations or other changes
|
||||||
{{- include "mastodon.rollingPodAnnotations" . | nindent 8 }}
|
{{- include "mastodon.rollingPodAnnotations" . | nindent 8 }}
|
||||||
labels:
|
labels:
|
||||||
|
{{- include "mastodon.globalLabels" . | nindent 8 }}
|
||||||
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
||||||
{{- include "mastodon.statsdExporterLabels" . | nindent 8 }}
|
{{- include "mastodon.statsdExporterLabels" . | nindent 8 }}
|
||||||
app.kubernetes.io/component: web
|
app.kubernetes.io/component: web
|
||||||
|
|
Loading…
Reference in New Issue
Block a user