Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve StatefulSets + Services #88

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.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
Expand Down
1 change: 1 addition & 0 deletions templates/haproxy-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
namespace: {{ $.Release.Namespace }}
labels: {{ include "jitsi.haproxy.labels" $ | nindent 4 }}
spec:
clusterIP: None
ports:
- name: http
port: 8080
Expand Down
37 changes: 16 additions & 21 deletions templates/jvb-services.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
---
Expand All @@ -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 -}}
2 changes: 1 addition & 1 deletion templates/jvb-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
Loading