Skip to content

Commit

Permalink
Add render condition for servicemonitor and podmonitor (#141)
Browse files Browse the repository at this point in the history
* Update podmonitor.yaml

* Update podmonitor.yaml
  • Loading branch information
hibohra1398 authored Oct 9, 2024
1 parent ac09307 commit d6e6668
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion helm/templates/hypertrace-collector/podmonitor.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.podmonitor.enabled ) }}
{{- if .Values.podmonitor.enabled }}
{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" }}
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
Expand Down Expand Up @@ -39,3 +40,4 @@ spec:
matchNames:
- {{ .Release.Namespace }}
{{- end }}
{{- end }}
4 changes: 3 additions & 1 deletion helm/templates/hypertrace-metrics-collector/podmonitor.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.metrics.enabled ) ( .Values.metrics.podmonitor.enabled ) }}
{{- if and ( .Values.metrics.enabled ) ( .Values.metrics.podmonitor.enabled ) }}
{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" }}
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
Expand Down Expand Up @@ -39,3 +40,4 @@ spec:
matchNames:
- {{ .Release.Namespace }}
{{- end }}
{{- end }}

0 comments on commit d6e6668

Please sign in to comment.