diff --git a/helm/templates/servicemonitor.yaml b/helm/templates/servicemonitor.yaml index 2c82cb4..d20ecc9 100644 --- a/helm/templates/servicemonitor.yaml +++ b/helm/templates/servicemonitor.yaml @@ -1,4 +1,5 @@ -{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.servicemonitor.enabled ) ( .Values.prometheus.jmx.enabled ) }} +{{- if .Values.servicemonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.prometheus.jmx.enabled ) }} --- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor @@ -33,3 +34,4 @@ spec: matchNames: - {{ .Release.Namespace }} {{- end }} +{{- end }}