Skip to content

Commit

Permalink
Merge pull request #816 from SBe/master
Browse files Browse the repository at this point in the history
Added ability to specify rules directory
  • Loading branch information
jertel authored Apr 19, 2022
2 parents 1b3b13b + b871a4e commit ec53a91
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- Upgrade pylint 2.13.4 to 2.13.5 - [#808](https://github.com/jertel/elastalert2/pull/808) - @nsano-rururu
- Update documentation on Cloud ID support - [#810](https://github.com/jertel/elastalert2/pull/810) - @ferozsalam
- Upgrade tox 3.24.5 to 3.25.0 - [#813](https://github.com/jertel/elastalert2/pull/813) - @nsano-rururu
- [Kubernetes] Add support to specify rules directory - [#816](https://github.com/jertel/elastalert2/pull/816) @SBe

# 2.4.0

Expand Down
1 change: 1 addition & 0 deletions chart/elastalert2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ The command removes all the Kubernetes components associated with the chart and
| `command` | command override for container | `NULL` |
| `args` | args override for container | `NULL` |
| `replicaCount` | number of replicas to run | 1 |
| `rulesFolder` | Locaton of rules directory. Usefull when you have one docker image and different set on rules per environemnt. For example development can reside in `/opt/elastalert/develop` and production in `/opt/elastalert/production`. | /opt/elastalert/rules |
| `elasticsearch.host` | elasticsearch endpoint to use | elasticsearch |
| `elasticsearch.port` | elasticsearch port to use | 9200 |
| `elasticsearch.useSsl` | whether or not to connect to es_host using SSL | False |
Expand Down
2 changes: 1 addition & 1 deletion chart/elastalert2/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
data:
elastalert_config: |-
---
rules_folder: /opt/elastalert/rules
rules_folder: {{ .Values.rulesFolder }}
{{- if .Values.scanSubdirectories }}
scan_subdirectories: {{ .Values.scanSubdirectories }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion chart/elastalert2/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
mountPath: '/opt/elastalert/config.yaml'
subPath: config.yaml
- name: {{ .Values.rulesVolumeName }}
mountPath: '/opt/elastalert/rules'
mountPath: {{ .Values.rulesFolder }}
{{- if .Values.elasticsearch.certsVolumeMounts }}
{{ toYaml .Values.elasticsearch.certsVolumeMounts | indent 10 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions chart/elastalert2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ revisionHistoryLimit: 5
# Default internal between alert checks against the elasticsearch datasource, in minutes
runIntervalMins: 1

# Location of directory where rules reside
rulesFolder: "/opt/elastalert/rules"

# Enable/disabe subdirectory scanning for rules
scanSubdirectories: true

Expand Down

0 comments on commit ec53a91

Please sign in to comment.