This repository was archived by the owner on May 19, 2023. It is now read-only.
allow multiple cluster to stream in the events, allow customise slack channel name and username #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
First thing first, I really like your code which is very clean and lean compare to many other frameworks i saw.
Here is the customisation i did for myself to stream in the events from multiple clusters. For each cluster deployment, user shall define K8S_CLUSTER_NAME, so in slack, we know which cluster it comes from.
Since I don't create slack webhook per app (if you too, have too much slack apps), and simple cheap hack to allow overwrite K8S_SLACK_CHANNEL and K8S_SLACK_USERNAME.
I put the variable on top of the program, so it is a global var for all new param, this will save few lines of the code from needing to pass it as function param. This is very opinionated. Feel free to comment, i can change it.
cheers,
Cheng Lim