Skip to content

Commit

Permalink
[SERVICE-MONITOR] Disable monitoring.coreos.com/v1 api check
Browse files Browse the repository at this point in the history
  • Loading branch information
fleblay committed Nov 27, 2023
1 parent 7fb19cd commit b18f79f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion helm/charts/hydra/templates/service-admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions helm/charts/hydra/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/kratos/templates/service-admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions helm/charts/kratos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b18f79f

Please sign in to comment.