Skip to content

Commit

Permalink
Correct case on the sharedConfigMap helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
benbz committed Jun 27, 2023
1 parent 317f58b commit 285d451
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ app.kubernetes.io/component: jitsi-ingress
{{/*
Define a helper function to output the data of the shared ConfigMap
*/}}
{{- define "jitsi.sharedconfigmap.data" -}}
{{- define "jitsi.sharedConfigMap.data" -}}
JVB_STUN_SERVERS: {{ $.Values.JVB_STUN_SERVERS }}
PUBLIC_URL: {{ ((gt (len $.Values.ingress.hosts) 0) | ternary (print "https://" ($.Values.ingress.hosts | first)) $.Values.PUBLIC_URL) | required "One of PUBLIC_URL or ingress.hosts must be provided" }}
TZ: {{ $.Values.TZ }}
Expand All @@ -200,8 +200,8 @@ TZ: {{ $.Values.TZ }}
{{/*
Define a helper function to create a hash of the output of the previous function
*/}}
{{- define "jitsi.sharedconfigmap.hash" -}}
{{- $cm := include "jitsi.sharedconfigmap.data" . | sha256sum }}
{{- define "jitsi.sharedConfigMap.hash" -}}
{{- $cm := include "jitsi.sharedConfigMap.data" . | sha256sum }}
{{- printf "%s" (trunc 63 $cm) -}}
{{- end }}

Expand Down
4 changes: 2 additions & 2 deletions templates/jicofo-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Deployment
metadata:
labels: {{ include "jitsi.jicofoShard.labels" (merge (dict "RelativeScope" .) $) | nindent 4 }}
annotations:
configmap-hash: {{ include "jitsi.sharedconfigmap.hash" $ }}
configmap-hash: {{ include "jitsi.sharedConfigMap.hash" $ }}
{{- with $.Values.jicofo.extraAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand All @@ -24,7 +24,7 @@ spec:
metadata:
labels: {{ include "jitsi.jicofoShard.labels" (merge (dict "RelativeScope" .) $) | nindent 8 }}
annotations:
configmap-hash: {{ include "jitsi.sharedconfigmap.hash" $ }}
configmap-hash: {{ include "jitsi.sharedConfigMap.hash" $ }}
{{- with $.Values.jicofo.extraAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions templates/jvb-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ kind: StatefulSet
metadata:
labels: {{ include "jitsi.jvbShard.labels" (merge (dict "RelativeScope" (dict "shard" $shard)) $) | nindent 4 }}
annotations:
configmap-hash: {{ include "jitsi.sharedconfigmap.hash" $ }}
configmap-hash: {{ include "jitsi.sharedConfigMap.hash" $ }}
{{- with $.Values.jvb.extraAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand All @@ -22,7 +22,7 @@ spec:
metadata:
labels: {{ include "jitsi.jvbShard.labels" (merge (dict "RelativeScope" (dict "shard" $shard)) $) | nindent 8 }}
annotations:
configmap-hash: {{ include "jitsi.sharedconfigmap.hash" $ }}
configmap-hash: {{ include "jitsi.sharedConfigMap.hash" $ }}
kubectl.kubernetes.io/default-container: jvb
{{ if $.Values.jvb.monitoringEnable }}
prometheus.io/scrape: "true"
Expand Down
4 changes: 2 additions & 2 deletions templates/prosody-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Deployment
metadata:
labels: {{ include "jitsi.prosodyShard.labels" (merge (dict "RelativeScope" .) $) | nindent 4 }}
annotations:
configmap-hash: {{ include "jitsi.sharedconfigmap.hash" $ }}
configmap-hash: {{ include "jitsi.sharedConfigMap.hash" $ }}
{{- with $.Values.prosody.extraAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand All @@ -24,7 +24,7 @@ spec:
metadata:
labels: {{ include "jitsi.prosodyShard.labels" (merge (dict "RelativeScope" .) $) | nindent 8 }}
annotations:
configmap-hash: {{ include "jitsi.sharedconfigmap.hash" $ }}
configmap-hash: {{ include "jitsi.sharedConfigMap.hash" $ }}
{{ if $.Values.prosody.monitoringEnable }}
prometheus.io/scrape: "true"
prometheus.io/port: "5280"
Expand Down
2 changes: 1 addition & 1 deletion templates/shared-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
data:
{{ include "jitsi.sharedconfigmap.data" $ | nindent 2 }}
{{ include "jitsi.sharedConfigMap.data" $ | nindent 2 }}
kind: ConfigMap
metadata:
labels: {{ include "jitsi.config.labels" $ | nindent 4 }}
Expand Down
5 changes: 3 additions & 2 deletions templates/sysctl-jvb-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kind: DaemonSet
metadata:
labels: {{ include "jitsi.sysctlJvb.labels" $ | nindent 4 }}
annotations:
configmap-hash: {{ include "jitsi.sharedconfigmap.hash" $ }}
configmap-hash: {{ include "jitsi.sharedConfigMap.hash" $ }}
{{- with $.Values.sysctljvb.extraAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand All @@ -22,8 +22,9 @@ spec:
{{- with $.Values.sysctljvb.extraLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.sysctljvb.extraAnnotations }}
annotations:
configmap-hash: {{ include "jitsi.sharedConfigMap.hash" $ }}
{{- with $.Values.sysctljvb.extraAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
Expand Down
4 changes: 2 additions & 2 deletions templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Deployment
metadata:
labels: {{ include "jitsi.webShard.labels" (merge (dict "RelativeScope" .) $) | nindent 4 }}
annotations:
configmap-hash: {{ include "jitsi.sharedconfigmap.hash" $ }}
configmap-hash: {{ include "jitsi.sharedConfigMap.hash" $ }}
{{- with $.Values.web.extraAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand All @@ -24,7 +24,7 @@ spec:
metadata:
labels: {{ include "jitsi.webShard.labels" (merge (dict "RelativeScope" .) $) | nindent 8 }}
annotations:
configmap-hash: {{ include "jitsi.sharedconfigmap.hash" $ }}
configmap-hash: {{ include "jitsi.sharedConfigMap.hash" $ }}
{{- with $.Values.web.extraAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down

0 comments on commit 285d451

Please sign in to comment.