File tree Expand file tree Collapse file tree 8 files changed +92
-2
lines changed
Expand file tree Collapse file tree 8 files changed +92
-2
lines changed Original file line number Diff line number Diff line change @@ -60,3 +60,14 @@ Create the name of the service account to use
6060{{- default " default" .Values.serviceAccount.name }}
6161{{- end }}
6262{{- end }}
63+
64+ {{/*
65+ Create the name of the pod monitor to use
66+ */ }}
67+ {{- define " egress.podMonitorName" -}}
68+ {{- if .Values.podMonitor.create }}
69+ {{- default (include " egress.fullname" . ) .Values.podMonitor.name }}
70+ {{- else }}
71+ {{- default " default" .Values.podMonitor.name }}
72+ {{- end }}
73+ {{- end }}
Original file line number Diff line number Diff line change 1+ {{- if and .Values.podMonitor.create .Values.egress.prometheus_port -}}
2+ apiVersion : monitoring.coreos.com/v1
3+ kind : PodMonitor
4+ metadata :
5+ name : {{ include "egress.podMonitorName" . }}
6+ labels :
7+ {{- include "egress.labels" . | nindent 4 }}
8+ {{- with .Values.podMonitor.annotations }}
9+ annotations :
10+ {{- toYaml . | nindent 4 }}
11+ {{- end }}
12+ spec :
13+ endpoints :
14+ - port : metrics
15+ path : /
16+ interval : {{ .Values.podMonitor.interval }}
17+ selector :
18+ matchLabels :
19+ {{- include "egress.selectorLabels" . | nindent 6 }}
20+ {{- end }}
Original file line number Diff line number Diff line change @@ -41,3 +41,14 @@ securityContext: {}
4141tolerations : []
4242
4343affinity : {}
44+
45+ podMonitor :
46+ # Specifies whether a service monitor should be created
47+ create : false
48+ # Annotations to add to the service monitor
49+ annotations : {}
50+ # The name of the service monitor to use.
51+ # If not set and create is true, a name is generated using the fullname template
52+ name : " "
53+ # The scrape interval
54+ interval : 30s
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v2
22name : ingress
33description : Ingress is used by LiveKit to ingest streams produced by external workflows
44type : application
5- version : 1.4.4
5+ version : 1.4.3
66appVersion : " v1.4.3"
77
88sources :
Original file line number Diff line number Diff line change @@ -60,3 +60,14 @@ Create the name of the service account to use
6060{{- default " default" .Values.serviceAccount.name }}
6161{{- end }}
6262{{- end }}
63+
64+ {{/*
65+ Create the name of the service monitor to use
66+ */ }}
67+ {{- define " ingress.serviceMonitorName" -}}
68+ {{- if .Values.serviceMonitor.create }}
69+ {{- default (include " ingress.fullname" . ) .Values.serviceMonitor.name }}
70+ {{- else }}
71+ {{- default " default" .Values.serviceMonitor.name }}
72+ {{- end }}
73+ {{- end }}
Original file line number Diff line number Diff line change 2222 - port : {{ .Values.ingress.whipPort }}
2323 protocol : TCP
2424 name : whip
25-
25+ {{- end }}
26+ {{- if .Values.ingress.prometheus_port }}
27+ - port : {{ .Values.ingress.prometheus_port }}
28+ targetPort : metrics
29+ protocol : TCP
30+ name : metrics
31+ {{- end }}
2632 selector :
2733 {{- include "ingress.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change 1+ {{- if and .Values.serviceMonitor.create .Values.ingress.prometheus_port -}}
2+ apiVersion : monitoring.coreos.com/v1
3+ kind : ServiceMonitor
4+ metadata :
5+ name : {{ include "ingress.serviceMonitorName" . }}
6+ labels :
7+ {{- include "ingress.labels" . | nindent 4 }}
8+ {{- with .Values.serviceMonitor.annotations }}
9+ annotations :
10+ {{- toYaml . | nindent 4 }}
11+ {{- end }}
12+ spec :
13+ endpoints :
14+ - port : metrics
15+ path : /
16+ interval : {{ .Values.serviceMonitor.interval }}
17+ selector :
18+ matchLabels :
19+ {{- include "ingress.selectorLabels" . | nindent 6 }}
20+ {{- end }}
Original file line number Diff line number Diff line change @@ -61,3 +61,14 @@ securityContext: {}
6161tolerations : []
6262
6363affinity : {}
64+
65+ serviceMonitor :
66+ # Specifies whether a service monitor should be created
67+ create : false
68+ # Annotations to add to the service monitor
69+ annotations : {}
70+ # The name of the service monitor to use.
71+ # If not set and create is true, a name is generated using the fullname template
72+ name : " "
73+ # The scrape interval
74+ interval : 30s
You can’t perform that action at this time.
0 commit comments