From 537927be41ab1aae7d41bb2de26642d1080f8993 Mon Sep 17 00:00:00 2001 From: dlouzado Date: Tue, 5 Apr 2022 15:01:38 -0300 Subject: [PATCH 1/5] add subdirectory scanning as an option in Helm --- chart/elastalert2/Chart.yaml | 4 ++-- chart/elastalert2/templates/config.yaml | 4 +++- chart/elastalert2/values.yaml | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/chart/elastalert2/Chart.yaml b/chart/elastalert2/Chart.yaml index eaf0c713..1736b740 100644 --- a/chart/elastalert2/Chart.yaml +++ b/chart/elastalert2/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 description: Automated rule-based alerting for Elasticsearch name: elastalert2 -version: 2.4.0 -appVersion: 2.4.0 +version: 2.4.1 +appVersion: 2.4.1 home: https://github.com/jertel/elastalert2 sources: - https://github.com/jertel/elastalert2 diff --git a/chart/elastalert2/templates/config.yaml b/chart/elastalert2/templates/config.yaml index bf844aa8..f0415eb3 100644 --- a/chart/elastalert2/templates/config.yaml +++ b/chart/elastalert2/templates/config.yaml @@ -12,7 +12,9 @@ data: elastalert_config: |- --- rules_folder: /opt/elastalert/rules - scan_subdirectories: false +{{- if .Values.scanSubdirectories }} + scan_subdirectories: {{ .Values.scanSubdirectories }} +{{- end }} run_every: minutes: {{ .Values.runIntervalMins }} {{- if .Values.realertIntervalMins }} diff --git a/chart/elastalert2/values.yaml b/chart/elastalert2/values.yaml index 9187b84b..437c76ed 100644 --- a/chart/elastalert2/values.yaml +++ b/chart/elastalert2/values.yaml @@ -7,6 +7,9 @@ revisionHistoryLimit: 5 # Default internal between alert checks against the elasticsearch datasource, in minutes runIntervalMins: 1 +# Enable/disabe subdirectory scanning for rules +scanSubdirectories: false + # Default rule buffer duration, in minutes bufferTimeMins: 15 From 16b31e8f7df06765e3903d5d4c6e2bf596295a2b Mon Sep 17 00:00:00 2001 From: dlouzado Date: Tue, 5 Apr 2022 16:31:17 -0300 Subject: [PATCH 2/5] missing readme documentation --- chart/elastalert2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/chart/elastalert2/README.md b/chart/elastalert2/README.md index dd8a5bda..1d21493c 100644 --- a/chart/elastalert2/README.md +++ b/chart/elastalert2/README.md @@ -86,6 +86,7 @@ The command removes all the Kubernetes components associated with the chart and | `rules` | Rule and alert configuration for ElastAlert 2 | {} example shown in values.yaml | | `runIntervalMins` | Default interval between alert checks, in minutes | 1 | | `realertIntervalMins` | Time between alarms for same rule, in minutes | `NULL` | +| `scanSubdirectories` | Enable/disable subdirectory scanning for rules | `false` | | `alertRetryLimitMins` | Time to retry failed alert deliveries, in minutes | 2880 (2 days) | | `bufferTimeMins` | Default rule buffer time, in minutes | 15 | | `writebackIndex` | Name or prefix of elastalert index(es) | elastalert | From e71ee194df9ce1ab65ffca6ffb5c942bce174b5a Mon Sep 17 00:00:00 2001 From: dlouzado Date: Tue, 5 Apr 2022 16:38:11 -0300 Subject: [PATCH 3/5] changelog for version 2.4.1 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 712764b6..9f71b539 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,10 @@ - Upgrade pylint 2.13.2 to 2.13.3 - [#792](https://github.com/jertel/elastalert2/pull/792) - @nsano-rururu - Upgrade pylint 2.13.3 to 2.13.4 - [#801](https://github.com/jertel/elastalert2/pull/801) - @nsano-rururu +# 2.4.1 +## Other changes +- Add "scanSubdirectories" (true/false) as an option in Helm Chart + # 2.4.0 ## Breaking changes From cc62791cd3541e6dbc9526f8fb8c24d73d8d0b4b Mon Sep 17 00:00:00 2001 From: dlouzado Date: Wed, 6 Apr 2022 08:49:25 -0300 Subject: [PATCH 4/5] update PR according to feeback from Jertel --- CHANGELOG.md | 3 --- chart/elastalert2/Chart.yaml | 4 ++-- chart/elastalert2/README.md | 2 +- chart/elastalert2/values.yaml | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f71b539..271de5eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,9 +30,6 @@ - Update schema.yaml(Alertmanager, Spike, Flatline, New Term, Metric Aggregation, Percentage Match) - [#789](https://github.com/jertel/elastalert2/pull/789) - @nsano-rururu - Upgrade pylint 2.13.2 to 2.13.3 - [#792](https://github.com/jertel/elastalert2/pull/792) - @nsano-rururu - Upgrade pylint 2.13.3 to 2.13.4 - [#801](https://github.com/jertel/elastalert2/pull/801) - @nsano-rururu - -# 2.4.1 -## Other changes - Add "scanSubdirectories" (true/false) as an option in Helm Chart # 2.4.0 diff --git a/chart/elastalert2/Chart.yaml b/chart/elastalert2/Chart.yaml index 1736b740..eaf0c713 100644 --- a/chart/elastalert2/Chart.yaml +++ b/chart/elastalert2/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 description: Automated rule-based alerting for Elasticsearch name: elastalert2 -version: 2.4.1 -appVersion: 2.4.1 +version: 2.4.0 +appVersion: 2.4.0 home: https://github.com/jertel/elastalert2 sources: - https://github.com/jertel/elastalert2 diff --git a/chart/elastalert2/README.md b/chart/elastalert2/README.md index 1d21493c..1375793a 100644 --- a/chart/elastalert2/README.md +++ b/chart/elastalert2/README.md @@ -86,7 +86,7 @@ The command removes all the Kubernetes components associated with the chart and | `rules` | Rule and alert configuration for ElastAlert 2 | {} example shown in values.yaml | | `runIntervalMins` | Default interval between alert checks, in minutes | 1 | | `realertIntervalMins` | Time between alarms for same rule, in minutes | `NULL` | -| `scanSubdirectories` | Enable/disable subdirectory scanning for rules | `false` | +| `scanSubdirectories` | Enable/disable subdirectory scanning for rules | `true` | | `alertRetryLimitMins` | Time to retry failed alert deliveries, in minutes | 2880 (2 days) | | `bufferTimeMins` | Default rule buffer time, in minutes | 15 | | `writebackIndex` | Name or prefix of elastalert index(es) | elastalert | diff --git a/chart/elastalert2/values.yaml b/chart/elastalert2/values.yaml index 437c76ed..775480f7 100644 --- a/chart/elastalert2/values.yaml +++ b/chart/elastalert2/values.yaml @@ -8,7 +8,7 @@ revisionHistoryLimit: 5 runIntervalMins: 1 # Enable/disabe subdirectory scanning for rules -scanSubdirectories: false +scanSubdirectories: true # Default rule buffer duration, in minutes bufferTimeMins: 15 From 5c2c137b09ada985e5136ec395b60f97ff0fae44 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Wed, 6 Apr 2022 10:19:05 -0400 Subject: [PATCH 5/5] Fix pattern of changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36637f0f..fb6fbcaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,8 +30,8 @@ - Update schema.yaml(Alertmanager, Spike, Flatline, New Term, Metric Aggregation, Percentage Match) - [#789](https://github.com/jertel/elastalert2/pull/789) - @nsano-rururu - Upgrade pylint 2.13.2 to 2.13.3 - [#792](https://github.com/jertel/elastalert2/pull/792) - @nsano-rururu - Upgrade pylint 2.13.3 to 2.13.4 - [#801](https://github.com/jertel/elastalert2/pull/801) - @nsano-rururu -- Add "scanSubdirectories" (true/false) as an option in Helm Chart - Fix SpikeRule - [#804](https://github.com/jertel/elastalert2/pull/804) - @nsano-rururu +- [Kubernetes] Add scanSubdirectories (defaults to true) as an option in Helm Chart - [#805](https://github.com/jertel/elastalert2/pull/805) - @louzadod # 2.4.0