2.13.1
#1238
Replies: 2 comments 3 replies
-
This seems to be broken for me. diff --git a/chart/elastalert2/templates/rules.yaml b/chart/elastalert2/templates/rules.yaml
index b0b52ffd..e2498d7c 100644
--- a/chart/elastalert2/templates/rules.yaml
+++ b/chart/elastalert2/templates/rules.yaml
@@ -8,16 +8,19 @@ metadata:
{{- end }}
data:
{{- if .Values.rootRulesFolder }}
- {{- $rulesDirectory := printf "%v/**.yaml" .Values.rootRulesFolder -}}
- {{- range $rule, $_ := .Files.Glob $rulesDirectory }}
- {{ base $rule }}: |-
-{{ $.Files.Get $rule | indent 6 }}
- {{ end }}
+{{- $rulesDirectory := printf "%v/**.{yaml,yml}" .Values.rootRulesFolder -}}
+{{- $enabledRules := .Values.enabledRules -}}
+{{- range $rule, $_ := .Files.Glob $rulesDirectory -}}
+ {{- $ruleBase := base $rule -}}
+ {{- $ruleName := regexReplaceAll "\\.(yaml|yml)$" $ruleBase "" -}}
+ {{- if has $ruleName $enabledRules }}
+ {{ $ruleBase }}: |-
+{{ $.Files.Get $rule | indent 4 }}
+ {{- end }}
+{{- end }}
{{- else }}
{{- range $key, $value := .Values.rules }}
- {{ $key | indent 2}}: |-
- {{ $value | indent 4}}
+ {{ $key }}: |-
+{{ $value | indent 2 }}
{{- end }}
{{- end }} Specifically the last part probably shouldn't have happened? - {{ $key | indent 2}}: |-
- {{ $value | indent 4}}
+ {{ $key }}: |-
+{{ $value | indent 2 }} The Helm deployment is showing the indentation changes like so: So the content of the rules is no longer indented properly. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Or rather the leading white-space changes are fine, but the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Breaking changes
New features
Other changes
This discussion was created from the release 2.13.1.
Beta Was this translation helpful? Give feedback.
All reactions