2022-08-12 10:20:19 +02:00
{{- if and .Values.hubble.enabled .Values.hubble.relay.enabled .Values.hubble.relay.prometheus.enabled .Values.hubble.relay.prometheus.serviceMonitor.enabled }}
apiVersion : monitoring.coreos.com/v1
kind : ServiceMonitor
metadata :
name : hubble-relay
namespace : {{ .Values.hubble.relay.prometheus.serviceMonitor.namespace | default .Release.Namespace }}
labels :
{{- with .Values.hubble.relay.prometheus.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
2023-10-16 19:14:53 +02:00
{{- if or .Values.hubble.relay.prometheus.serviceMonitor.annotations .Values.hubble.relay.annotations }}
2022-08-12 10:20:19 +02:00
annotations :
2023-10-16 19:14:53 +02:00
{{- with .Values.hubble.relay.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
2022-08-12 10:20:19 +02:00
{{- with .Values.hubble.relay.prometheus.serviceMonitor.annotations }}
2023-10-16 19:14:53 +02:00
{{- toYaml . | nindent 4 }}
2022-08-12 10:20:19 +02:00
{{- end }}
2023-10-16 19:14:53 +02:00
{{- end }}
2022-08-12 10:20:19 +02:00
spec :
selector :
matchLabels :
k8s-app : hubble-relay
namespaceSelector :
matchNames :
- {{ .Release.Namespace }}
endpoints :
- port : metrics
interval : {{ .Values.hubble.relay.prometheus.serviceMonitor.interval | quote }}
path : /metrics
2023-10-16 19:14:53 +02:00
{{- with .Values.hubble.relay.prometheus.serviceMonitor.relabelings }}
relabelings :
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.hubble.relay.prometheus.serviceMonitor.metricRelabelings }}
metricRelabelings :
{{- toYaml . | nindent 4 }}
{{- end }}
2022-08-12 10:20:19 +02:00
{{- end }}