Files
argo-poc/helm-repo/dragonfly-operator/dragonfly-operator-v1.1.10-bagl/templates/servicemonitor.yaml
Dušan Jakub bc4fcfb6bb First apps
2025-04-08 15:43:45 +02:00

41 lines
1.4 KiB
YAML

{{- if .Values.serviceMonitor.enabled }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
{{- include "dragonfly-operator.labels" . | nindent 4 }}
app.kubernetes.io/component: controller-manager-metrics
{{- if .Values.serviceMonitor.labels }}
{{- toYaml .Values.serviceMonitor.labels | nindent 4}}
{{- end }}
name: {{ include "dragonfly-operator.fullname" . }}-controller-manager-metrics
spec:
endpoints:
- targetPort: {{ .Values.service.metricsPort }}
{{- if .Values.serviceMonitor.interval }}
interval: {{ .Values.serviceMonitor.interval }}
{{- end }}
{{- if .Values.serviceMonitor.telemetryPath }}
path: {{ .Values.serviceMonitor.path }}
{{- end }}
{{- if .Values.serviceMonitor.timeout }}
scrapeTimeout: {{ .Values.serviceMonitor.timeout }}
{{- end }}
{{- if .Values.serviceMonitor.relabelings }}
relabelings:
{{- toYaml .Values.serviceMonitor.relabelings | nindent 4 }}
{{- end }}
{{- if .Values.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{- toYaml .Values.serviceMonitor.metricRelabelings | nindent 4 }}
{{- end }}
jobLabel: {{ template "dragonfly-operator.fullname" . }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "dragonfly-operator.selectorLabels" . | nindent 6 }}
{{- end }}