-
Hello, I think it would be useful to allow reading the Elastalert rules from a secret. This will allow us to keep things like Slack tokens private. Thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Seems like a good idea for those that need it. Are you able to add the secret_rules.yaml, and make the volume mount in deployment.yaml so that it mounts the secret file into the container? And document it in the README.md? If so, create the PR and I'll review it/merge it. |
Beta Was this translation helpful? Give feedback.
-
I was originally thinking it would be possible to mount the secret as a volume, and configure Elastalert to use it as one of its rule directories. In order to do this, we would need to mount the volume under However, it appears there's a bug with
Which causes Elastalert to fail with the following exception, as it tries to load the same rules from both places
Not sure of the best way to proceed. |
Beta Was this translation helpful? Give feedback.
-
You could make it an either/or choice: Either the admin can choose to install rules from the secret, or install rules from the config map, but not both. In the deployment.yaml you would do this with code similar to:
And do the simlar if/end wrapper around the config map volume/mount. There are likely other solutions that might be better, but this would eliminate the need of turning on the |
Beta Was this translation helpful? Give feedback.
-
#33 is available for review. Thanks! |
Beta Was this translation helpful? Give feedback.
#33 is available for review. Thanks!