diff --git a/scripts/helmcharts/openreplay/charts/alerts/templates/serviceMonitor.yaml b/scripts/helmcharts/openreplay/charts/alerts/templates/serviceMonitor.yaml index 14ed00461..1df24e619 100644 --- a/scripts/helmcharts/openreplay/charts/alerts/templates/serviceMonitor.yaml +++ b/scripts/helmcharts/openreplay/charts/alerts/templates/serviceMonitor.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceMonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/scripts/helmcharts/openreplay/charts/assets/templates/serviceMonitor.yaml b/scripts/helmcharts/openreplay/charts/assets/templates/serviceMonitor.yaml index 2df5a4085..b07137cc5 100644 --- a/scripts/helmcharts/openreplay/charts/assets/templates/serviceMonitor.yaml +++ b/scripts/helmcharts/openreplay/charts/assets/templates/serviceMonitor.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceMonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/scripts/helmcharts/openreplay/charts/assist/templates/serviceMonitor.yaml b/scripts/helmcharts/openreplay/charts/assist/templates/serviceMonitor.yaml index 598a8fa43..d271bf7c4 100644 --- a/scripts/helmcharts/openreplay/charts/assist/templates/serviceMonitor.yaml +++ b/scripts/helmcharts/openreplay/charts/assist/templates/serviceMonitor.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceMonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/scripts/helmcharts/openreplay/charts/chalice/templates/serviceMonitor.yaml b/scripts/helmcharts/openreplay/charts/chalice/templates/serviceMonitor.yaml index 1c0f1baa2..d494ce1dc 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/templates/serviceMonitor.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/templates/serviceMonitor.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceMonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/scripts/helmcharts/openreplay/charts/db/templates/serviceMonitor.yaml b/scripts/helmcharts/openreplay/charts/db/templates/serviceMonitor.yaml index 103c833f7..373689550 100644 --- a/scripts/helmcharts/openreplay/charts/db/templates/serviceMonitor.yaml +++ b/scripts/helmcharts/openreplay/charts/db/templates/serviceMonitor.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceMonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/scripts/helmcharts/openreplay/charts/ender/templates/serviceMonitor.yaml b/scripts/helmcharts/openreplay/charts/ender/templates/serviceMonitor.yaml index dfaf830ec..d17879603 100644 --- a/scripts/helmcharts/openreplay/charts/ender/templates/serviceMonitor.yaml +++ b/scripts/helmcharts/openreplay/charts/ender/templates/serviceMonitor.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceMonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/scripts/helmcharts/openreplay/charts/heuristics/templates/serviceMonitor.yaml b/scripts/helmcharts/openreplay/charts/heuristics/templates/serviceMonitor.yaml index f17a9c230..6249bf8b3 100644 --- a/scripts/helmcharts/openreplay/charts/heuristics/templates/serviceMonitor.yaml +++ b/scripts/helmcharts/openreplay/charts/heuristics/templates/serviceMonitor.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceMonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/scripts/helmcharts/openreplay/charts/http/templates/serviceMonitor.yaml b/scripts/helmcharts/openreplay/charts/http/templates/serviceMonitor.yaml index 069a83640..302aa1aae 100644 --- a/scripts/helmcharts/openreplay/charts/http/templates/serviceMonitor.yaml +++ b/scripts/helmcharts/openreplay/charts/http/templates/serviceMonitor.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceMonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/scripts/helmcharts/openreplay/charts/integrations/templates/serviceMonitor.yaml b/scripts/helmcharts/openreplay/charts/integrations/templates/serviceMonitor.yaml index ade44eec2..cb237ea3b 100644 --- a/scripts/helmcharts/openreplay/charts/integrations/templates/serviceMonitor.yaml +++ b/scripts/helmcharts/openreplay/charts/integrations/templates/serviceMonitor.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceMonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/scripts/helmcharts/openreplay/charts/peers/templates/serviceMonitor.yaml b/scripts/helmcharts/openreplay/charts/peers/templates/serviceMonitor.yaml index a84610638..8fc3f32cc 100644 --- a/scripts/helmcharts/openreplay/charts/peers/templates/serviceMonitor.yaml +++ b/scripts/helmcharts/openreplay/charts/peers/templates/serviceMonitor.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceMonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/scripts/helmcharts/openreplay/charts/sink/templates/serviceMonitor.yaml b/scripts/helmcharts/openreplay/charts/sink/templates/serviceMonitor.yaml index 1cb154bda..f41450b22 100644 --- a/scripts/helmcharts/openreplay/charts/sink/templates/serviceMonitor.yaml +++ b/scripts/helmcharts/openreplay/charts/sink/templates/serviceMonitor.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceMonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/scripts/helmcharts/openreplay/charts/storage/templates/serviceMonitor.yaml b/scripts/helmcharts/openreplay/charts/storage/templates/serviceMonitor.yaml index 0591c0a23..3042b64a8 100644 --- a/scripts/helmcharts/openreplay/charts/storage/templates/serviceMonitor.yaml +++ b/scripts/helmcharts/openreplay/charts/storage/templates/serviceMonitor.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceMonitor.enabled }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: