wongnai / kube-slack

Kubernetes Slack Monitoring
MIT License
323 stars 59 forks source link

Optionally include Kubernetes cluster name in Slack notifications #31

Closed phillipj closed 6 years ago

phillipj commented 6 years ago

These changes allows for cluster name to be configured with the $CLUSTER_NAME environment variable when starting the docker container.

This is valuable when running several Kubernetes clusters with the same containers / pods deployed, to immediately see which Kubernetes cluster the Slack notifications relates to.

Any thoughts?

whs commented 6 years ago

First of all, I took a look at the code change and they looked good to me.

We at @wongnai also run multiple clusters as well. What we currently do is that we have two separate Slack webhook URLs and they use different name/avatar. I think that would be more noticeable than a simple message.

Preview

phillipj commented 6 years ago

Ahh haven't thought of that approach 🤔 That for sure could also be beneficial for us. I imagine that would be quicker to notice which cluster it relates to if part of the integration name.

We currently have 6 different clusters; three for testing and three for production spread across different AWS regions. Needless to say that quickly became painful when we haven't seen which cluster these notifications relates to.

The only limitation I see with requiring this to be solved with multiple integrations, would be for those using Slack for free. Looking at their pricing matrix free users have 10 integration limit.

That's not an issue for us, so I'm fine with testing more integrations for a while.

Feel free to close the PR if you don't see any value in making this part of the project.

whs commented 6 years ago

We're running in a free team right now, and I found that while you can add up to 10 apps, each apps can have multiple keys (like 10 incoming webhooks count as 1).