diff --git a/charts/kyverno/Chart.yaml b/charts/kyverno/Chart.yaml index 86b570d1415d..e278ce49b272 100644 --- a/charts/kyverno/Chart.yaml +++ b/charts/kyverno/Chart.yaml @@ -37,8 +37,6 @@ annotations: description: allow overriding revisionHistoryLimit - kind: added description: support for GrafanaDashboard custom resource - - kind: changed - description: only create ServiceMonitor if cluster supports it - kind: fixed description: rbac templating issues - kind: added diff --git a/charts/kyverno/templates/admission-controller/servicemonitor.yaml b/charts/kyverno/templates/admission-controller/servicemonitor.yaml index 25a203ab7cd5..d97ab2f3855c 100644 --- a/charts/kyverno/templates/admission-controller/servicemonitor.yaml +++ b/charts/kyverno/templates/admission-controller/servicemonitor.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.admissionController.serviceMonitor.enabled (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") }} +{{- if .Values.admissionController.serviceMonitor.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/kyverno/templates/background-controller/servicemonitor.yaml b/charts/kyverno/templates/background-controller/servicemonitor.yaml index 5745ac307a21..67c38a22d69f 100644 --- a/charts/kyverno/templates/background-controller/servicemonitor.yaml +++ b/charts/kyverno/templates/background-controller/servicemonitor.yaml @@ -1,5 +1,5 @@ {{- if .Values.backgroundController.enabled -}} -{{- if and .Values.backgroundController.serviceMonitor.enabled (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") -}} +{{- if .Values.backgroundController.serviceMonitor.enabled -}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/kyverno/templates/cleanup-controller/servicemonitor.yaml b/charts/kyverno/templates/cleanup-controller/servicemonitor.yaml index a26eb643b991..e9f50e634748 100644 --- a/charts/kyverno/templates/cleanup-controller/servicemonitor.yaml +++ b/charts/kyverno/templates/cleanup-controller/servicemonitor.yaml @@ -1,5 +1,5 @@ {{- if .Values.cleanupController.enabled -}} -{{- if and .Values.cleanupController.serviceMonitor.enabled (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") -}} +{{- if .Values.cleanupController.serviceMonitor.enabled -}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/kyverno/templates/reports-controller/servicemonitor.yaml b/charts/kyverno/templates/reports-controller/servicemonitor.yaml index 1f97b1ecb061..681e3d99311b 100644 --- a/charts/kyverno/templates/reports-controller/servicemonitor.yaml +++ b/charts/kyverno/templates/reports-controller/servicemonitor.yaml @@ -1,5 +1,5 @@ {{- if .Values.reportsController.enabled -}} -{{- if and .Values.reportsController.serviceMonitor.enabled (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") -}} +{{- if .Values.reportsController.serviceMonitor.enabled -}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: