From eab5ff180f2635457c8bac892de814a5ee7096c3 Mon Sep 17 00:00:00 2001 From: Ben Banfield-Zanin Date: Thu, 3 Oct 2024 14:27:07 +0100 Subject: [PATCH 1/3] HAProxy: this service is used in a StatefulSet, so it should be headless --- templates/haproxy-services.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/haproxy-services.yaml b/templates/haproxy-services.yaml index caedad2..c33fd2f 100644 --- a/templates/haproxy-services.yaml +++ b/templates/haproxy-services.yaml @@ -6,6 +6,7 @@ metadata: namespace: {{ $.Release.Namespace }} labels: {{ include "jitsi.haproxy.labels" $ | nindent 4 }} spec: + clusterIP: None ports: - name: http port: 8080 From 33f3558e20a2b8732dcded230ce0dad21eefc7f2 Mon Sep 17 00:00:00 2001 From: Ben Banfield-Zanin Date: Thu, 3 Oct 2024 14:27:37 +0100 Subject: [PATCH 2/3] JVB: use a single metrics (headless) service for each JVB shard --- templates/jvb-services.yaml | 37 +++++++++++++++------------------- templates/jvb-statefulset.yaml | 2 +- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/templates/jvb-services.yaml b/templates/jvb-services.yaml index 0828133..04f22ea 100644 --- a/templates/jvb-services.yaml +++ b/templates/jvb-services.yaml @@ -1,4 +1,20 @@ {{- range $shard, $e := until (int $.Values.shardCount) }} +--- +apiVersion: v1 +kind: Service +metadata: + labels: {{ include "jitsi.jvbShard.labels" (merge (dict "RelativeScope" (dict "shard" $shard)) $) | nindent 4 }} + name: {{ include "jitsi.name" $ }}-shard-{{ $shard }}-jvb + namespace: {{ $.Release.Namespace }} +spec: + clusterIP: None + type: ClusterIP + ports: + - name: "metrics" + protocol: "TCP" + port: 9888 + targetPort: metrics + selector: {{ include "jitsi.jvbShard.selectorLabels" (merge (dict "RelativeScope" (dict "shard" $shard)) $) | nindent 4 }} {{- range $replica, $f := until (int $.Values.jvb.replicas) }} {{ if empty $.Values.jvb.hostPort }} --- @@ -21,26 +37,5 @@ spec: statefulset.kubernetes.io/pod-name: {{ include "jitsi.name" $ }}-shard-{{ $shard }}-jvb-{{ $replica }} {{ include "jitsi.jvbShard.labels" (merge (dict "RelativeScope" (dict "shard" $shard)) $) | nindent 4 }} {{ end -}} ---- -apiVersion: v1 -kind: Service -metadata: -{{ with $.Values.jvb.monitoring.service.extraAnnotations }} - annotations: - {{ toYaml . | nindent 4 }} -{{ end }} - labels: {{ include "jitsi.jvbReplicaMonitoring.labels" (merge (dict "RelativeScope" (dict "shard" $shard "replica" $replica)) $) | nindent 4 }} - name: {{ include "jitsi.name" $ }}-shard-{{ $shard }}-jvb-{{ $replica }}-metrics - namespace: {{ $.Release.Namespace }} -spec: - type: ClusterIP - ports: - - name: "metrics" - protocol: "TCP" - port: 9888 - targetPort: metrics - selector: - statefulset.kubernetes.io/pod-name: {{ include "jitsi.name" $ }}-shard-{{ $shard }}-jvb-{{ $replica }} - {{ include "jitsi.jvbShard.labels" (merge (dict "RelativeScope" (dict "shard" $shard)) $) | nindent 4 }} {{ end -}} {{ end -}} diff --git a/templates/jvb-statefulset.yaml b/templates/jvb-statefulset.yaml index cbef647..b12fa0a 100644 --- a/templates/jvb-statefulset.yaml +++ b/templates/jvb-statefulset.yaml @@ -17,7 +17,7 @@ spec: replicas: {{ $.Values.jvb.replicas }} selector: matchLabels: {{ include "jitsi.jvbShard.selectorLabels" (merge (dict "RelativeScope" (dict "shard" $shard)) $) | nindent 6 }} - serviceName: jvb + serviceName: {{ include "jitsi.name" $ }}-shard-{{ $shard }}-jvb template: metadata: labels: {{ include "jitsi.jvbShard.labels" (merge (dict "RelativeScope" (dict "shard" $shard)) $) | nindent 8 }} From 3a18328e73cc8e938bacb039e978a63cdcc1e752 Mon Sep 17 00:00:00 2001 From: Ben Banfield-Zanin Date: Thu, 3 Oct 2024 14:28:00 +0100 Subject: [PATCH 3/3] Bump to 0.8.0 given the Service structure changes --- Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index 6697a56..daa58dc 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -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.7.6 +version: 0.8.0 # 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