{{- if .Values.kubeStateMetrics.enabled }}
{{- if not (kindIs "invalid" .Values.kubeStateMetrics.serviceMonitor) }}
{{- if .Values.kubeStateMetrics.serviceMonitor.namespaceOverride }}
{{- fail "kubeStateMetrics.serviceMonitor.namespaceOverride was removed. Please use kube-state-metrics.namespaceOverride instead." }}
{{- end }}
{{- end }}
{{- end }}
