Skip to content

Commit

Permalink
Fix missing labels from most components
Browse files Browse the repository at this point in the history
  • Loading branch information
benbz committed Jun 29, 2023
1 parent 599a1c9 commit a7ec15e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.6.3
version: 0.6.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
30 changes: 27 additions & 3 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ app.kubernetes.io/managed-by: {{ .Values.managedBy | default .Release.Service }}
{{- end -}}

{{/*
Selector labels
Selector labels. These should be constant across deploys for resources of the same name.
If resources rename (i.e. nameOverride is set/changes), it is fine for these labels to
change value.
*/}}
{{- define "jitsi.selectorLabels" -}}
app.kubernetes.io/part-of: jitsi-stack
Expand Down Expand Up @@ -89,9 +91,21 @@ app.kubernetes.io/component: jitsi-web-server
shard: {{ toYaml .RelativeScope | quote }}
{{- end -}}


{{/*
General labels. These should include all the corresponding selector labels
and also include any labels that may change between standard deploys of the
chart (e.g. upgrading so version number changes). They should also
contain any user provided labels for the same reason.
If there's (e.g.) global and shard label variants for the same component
the shard label definition doesn't include the global one. This is because
both will include the selctor labels and we don't want duplicates. So there
is some unavoidable repetition here
*/}}
{{- define "jitsi.config.labels" -}}
{{ include "jitsi.selectorLabels" . }}
{{ include "jitsi.labels" . }}
{{ include "jitsi.selectorLabels" . }}
app.kubernetes.io/instance: {{ include "jitsi.name" . }}-config
app.kubernetes.io/name: jitsi-config
app.kubernetes.io/component: jitsi-shared-config
Expand All @@ -101,15 +115,16 @@ app.kubernetes.io/component: jitsi-shared-config
{{- end -}}
{{- define "jitsi.haproxy.labels" -}}
{{ include "jitsi.labels" . }}
{{ include "jitsi.haproxy.selectorLabels" . }}
{{- with $.Values.haproxy.extraLabels }}
{{ toYaml .}}
{{- end }}
{{- end -}}
{{- define "jitsi.ingress.labels" -}}
{{ include "jitsi.selectorLabels" . }}
{{ include "jitsi.labels" . }}
{{ include "jitsi.selectorLabels" . }}
app.kubernetes.io/instance: {{ include "jitsi.name" . }}-ingress
app.kubernetes.io/name: jitsi-ingress
app.kubernetes.io/component: jitsi-ingress
Expand All @@ -119,62 +134,71 @@ app.kubernetes.io/component: jitsi-ingress
{{- end -}}
{{- define "jitsi.jicofoShard.labels" -}}
{{ include "jitsi.labels" . }}
{{ include "jitsi.jicofoShard.selectorLabels" . }}
{{- with $.Values.jicofo.extraLabels }}
{{ toYaml . }}
{{- end }}
{{- end -}}
{{- define "jitsi.jvbGlobal.labels" -}}
{{ include "jitsi.labels" . }}
{{ include "jitsi.jvbGlobal.selectorLabels" . }}
{{- with $.Values.jvb.extraLabels }}
{{ toYaml . }}
{{- end }}
{{- end -}}
{{- define "jitsi.jvbShard.labels" -}}
{{ include "jitsi.labels" . }}
{{ include "jitsi.jvbShard.selectorLabels" . }}
{{- with $.Values.jvb.extraLabels }}
{{ toYaml . }}
{{- end }}
{{- end -}}
{{- define "jitsi.jvbReplica.labels" -}}
{{ include "jitsi.labels" . }}
{{ include "jitsi.jvbReplica.selectorLabels" . }}
{{- with $.Values.jvb.extraLabels }}
{{ toYaml . }}
{{- end }}
{{- end -}}
{{- define "jitsi.jvbReplicaMonitoring.labels" -}}
{{ include "jitsi.labels" . }}
{{ include "jitsi.jvbReplica.selectorLabels" . }}
{{- with $.Values.jvb.monitoring.service.extraLabels }}
{{ toYaml . }}
{{- end }}
{{- end -}}
{{- define "jitsi.prosodyGlobal.labels" -}}
{{ include "jitsi.labels" . }}
{{ include "jitsi.prosodyGlobal.selectorLabels" . }}
{{- with $.Values.prosody.extraLabels }}
{{ toYaml . }}
{{- end }}
{{- end -}}
{{- define "jitsi.prosodyShard.labels" -}}
{{ include "jitsi.labels" . }}
{{ include "jitsi.prosodyShard.selectorLabels" . }}
{{- with $.Values.prosody.extraLabels }}
{{ toYaml . }}
{{- end }}
{{- end -}}
{{- define "jitsi.sysctlJvb.labels" -}}
{{ include "jitsi.labels" . }}
{{ include "jitsi.sysctlJvb.selectorLabels" . }}
{{- with $.Values.sysctljvb.extraLabels }}
{{ toYaml .}}
{{- end }}
{{- end -}}
{{- define "jitsi.webShard.labels" -}}
{{ include "jitsi.labels" . }}
{{ include "jitsi.webShard.selectorLabels" . }}
{{- with $.Values.web.extraLabels }}
{{ toYaml . }}
Expand Down

0 comments on commit a7ec15e

Please sign in to comment.