From 54e4d7b4d97da36f4a67206f40f316ffd28bf4c7 Mon Sep 17 00:00:00 2001 From: cmontemuino <1761056+cmontemuino@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:06:56 +0100 Subject: [PATCH] chore(chart): check CRDs available before installing ServiceMonitor close #1633 Signed-off-by: cmontemuino <1761056+cmontemuino@users.noreply.github.com> --- charts/logging-operator/templates/service_monitor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/logging-operator/templates/service_monitor.yaml b/charts/logging-operator/templates/service_monitor.yaml index f453520b9..fcd86b07a 100644 --- a/charts/logging-operator/templates/service_monitor.yaml +++ b/charts/logging-operator/templates/service_monitor.yaml @@ -1,4 +1,4 @@ -{{ if .Values.monitoring.serviceMonitor.enabled }} +{{ if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.monitoring.serviceMonitor.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: