Skip to content

Commit

Permalink
Merge pull request #481 from nobbs/fix/monitoring-capabilities
Browse files Browse the repository at this point in the history
[velero] create prometheusRule only if capabilities are present
  • Loading branch information
qiuming-best authored Aug 3, 2023
2 parents c15d13a + 20e4dc0 commit 7857b47
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/velero/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: 1.11.1
kubeVersion: ">=1.16.0-0"
description: A Helm chart for velero
name: velero
version: 4.1.4
version: 4.1.5
home: https://github.com/vmware-tanzu/velero
icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png
sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/velero/templates/prometheusrule.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
{{- if and (and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled) (or (not .Values.metrics.prometheusRule.autodetect) (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1")) (.Values.metrics.prometheusRule.spec) }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
Expand Down
1 change: 1 addition & 0 deletions charts/velero/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ metrics:
# tlsConfig: {}

prometheusRule:
autodetect: true
enabled: false
# Additional labels to add to deployed PrometheusRule
additionalLabels: {}
Expand Down

0 comments on commit 7857b47

Please sign in to comment.