diff --git a/helm/charts/hydra/templates/service-admin.yaml b/helm/charts/hydra/templates/service-admin.yaml index 0f54ec121a..100d9581d2 100644 --- a/helm/charts/hydra/templates/service-admin.yaml +++ b/helm/charts/hydra/templates/service-admin.yaml @@ -32,7 +32,7 @@ spec: selector: app.kubernetes.io/name: {{ include "hydra.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} -{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") (.Values.serviceMonitor.enabled) }} +{{- if .Values.serviceMonitor.enabled }} --- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor diff --git a/helm/charts/hydra/values.yaml b/helm/charts/hydra/values.yaml index 6e8bb4c21e..960e5446b4 100644 --- a/helm/charts/hydra/values.yaml +++ b/helm/charts/hydra/values.yaml @@ -606,8 +606,8 @@ pdb: # -- Parameters for the Prometheus ServiceMonitor objects. # Reference: https://docs.openshift.com/container-platform/4.6/rest_api/monitoring_apis/servicemonitor-monitoring-coreos-com-v1.html serviceMonitor: - # -- switch to false to prevent creating the ServiceMonitor - enabled: true + # -- switch to true to enable creating the ServiceMonitor + enabled: false # -- HTTP scheme to use for scraping. scheme: http # -- Interval at which metrics should be scraped diff --git a/helm/charts/kratos/templates/service-admin.yaml b/helm/charts/kratos/templates/service-admin.yaml index 5016e5ef30..b2f605bd25 100644 --- a/helm/charts/kratos/templates/service-admin.yaml +++ b/helm/charts/kratos/templates/service-admin.yaml @@ -32,7 +32,7 @@ spec: selector: app.kubernetes.io/name: {{ include "kratos.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} -{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") (.Values.serviceMonitor.enabled) }} +{{- if .Values.serviceMonitor.enabled }} --- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor diff --git a/helm/charts/kratos/values.yaml b/helm/charts/kratos/values.yaml index 617543498e..48fdb3ce96 100644 --- a/helm/charts/kratos/values.yaml +++ b/helm/charts/kratos/values.yaml @@ -688,8 +688,8 @@ pdb: # -- Parameters for the Prometheus ServiceMonitor objects. # Reference: https://docs.openshift.com/container-platform/4.6/rest_api/monitoring_apis/servicemonitor-monitoring-coreos-com-v1.html serviceMonitor: - # -- switch to false to prevent creating the ServiceMonitor - enabled: true + # -- switch to true to enable creating the ServiceMonitor + enabled: false # -- HTTP scheme to use for scraping. scheme: http # -- Interval at which metrics should be scraped