constellation/internal/helm/charts/cilium/templates/hubble/servicemonitor.yaml

45 lines
1.4 KiB
YAML
Raw Normal View History

2022-08-12 04:20:19 -04:00
{{- if and .Values.hubble.enabled .Values.hubble.metrics.enabled .Values.hubble.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: hubble
namespace: {{ .Values.prometheus.serviceMonitor.namespace | default .Release.Namespace }}
labels:
app.kubernetes.io/part-of: cilium
2022-08-12 04:20:19 -04:00
{{- with .Values.hubble.metrics.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if or .Values.hubble.metrics.serviceMonitor.annotations .Values.hubble.annotations }}
2022-08-12 04:20:19 -04:00
annotations:
{{- with .Values.hubble.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
2022-08-12 04:20:19 -04:00
{{- with .Values.hubble.metrics.serviceMonitor.annotations }}
{{- toYaml . | nindent 4 }}
2022-08-12 04:20:19 -04:00
{{- end }}
{{- end }}
2022-08-12 04:20:19 -04:00
spec:
selector:
matchLabels:
k8s-app: hubble
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
endpoints:
- port: hubble-metrics
interval: {{ .Values.hubble.metrics.serviceMonitor.interval | quote }}
2022-08-12 04:20:19 -04:00
honorLabels: true
path: /metrics
{{- with .Values.hubble.metrics.serviceMonitor.relabelings }}
2022-08-12 04:20:19 -04:00
relabelings:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.hubble.metrics.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.hubble.metrics.serviceMonitor.jobLabel }}
jobLabel: {{ .Values.hubble.metrics.serviceMonitor.jobLabel | quote }}
{{- end }}
2022-08-12 04:20:19 -04:00
{{- end }}