rancher-charts/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/etcd.yaml.patch

21 lines
1.0 KiB
Diff

--- charts-original/templates/prometheus/rules-1.14/etcd.yaml
+++ charts/templates/prometheus/rules-1.14/etcd.yaml
@@ -4,7 +4,8 @@
https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeEtcd.enabled .Values.defaultRules.rules.etcd }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.etcd }}
+{{- if (include "exporter.kubeEtcd.enabled" .)}}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
@@ -176,4 +177,5 @@
{{- if .Values.defaultRules.additionalRuleLabels }}
{{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }}
{{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
+{{- end }}