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 6a16093 commit 3423d45
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 @@ -92,3 +93,4 @@ spec:
summary: "One or more Kafka containers restarted too often"
message: "One or more Kafka containers were restarted too often within the last 5 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 @@ -32,3 +34,5 @@ spec:
matchNames:
- {{ .Release.Namespace }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 3423d45

Please sign in to comment.