helm: ServiceMonitor: validate tlsConfig and relabeling config before injecting it

This commit is contained in:
maximilien
2026-08-28 02:00:13 +02:00
parent 05e294307e
commit 13d313134d
@@ -28,11 +28,11 @@ spec:
scheme: {{ .Values.monitoring.metrics.serviceMonitor.scheme }}
{{- with .Values.monitoring.metrics.serviceMonitor.tlsConfig }}
tlsConfig:
{{- toYaml . | nindent 6 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.monitoring.metrics.serviceMonitor.relabelings }}
relabelings:
{{- toYaml . | nindent 6 }}
{{- toYaml . | nindent 8 }}
{{- end }}
jobLabel: "{{ .Release.Name }}"
selector:
@@ -41,4 +41,4 @@ spec:
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
{{- end }}
{{- end }}