Skip to content

Commit

Permalink
update prometheusrule and servicemonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisingal committed Sep 26, 2024
1 parent 7785b3a commit 601c3b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion helm/templates/prometheusrules.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.prometheusrule.enabled ) }}
{{- if .Values.prometheusrule.enabled }}
{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
Expand Down Expand Up @@ -115,3 +116,4 @@ spec:
summary: "All zookeeper containers in the Zookeeper pods down or in CrashLookBackOff status"
message: "All zookeeper containers in the Zookeeper pods have been down or in CrashLookBackOff status for 3 minutes"
{{- end }}
{{- end }}
6 changes: 5 additions & 1 deletion helm/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.servicemonitor.enabled ) ( .Values.prometheus.jmx.enabled ) }}
{{- if .Values.servicemonitor.enabled }}
{{- if .Values.prometheus.jmx.enabled }}
{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
Expand Down Expand Up @@ -33,3 +35,5 @@ spec:
matchNames:
- {{ .Release.Namespace }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 601c3b4

Please sign in to comment.