RoadieHQ / kubewise

Get Helm notifications in your team chat
Apache License 2.0
59 stars 6 forks source link

KubeWise chat message can have optional extra text (like the k8s cluster) #5

Closed cep21 closed 4 years ago

cep21 commented 4 years ago

I want to install KubeWise for multiple k8s clusters (staging and production). I would like to have the message it sends clearly show which cluster the helm command is running in. Maybe optional text I can append to the text it runs, so I can say "staging: " or "production: " at the start.

dtuite commented 4 years ago

I like this idea a lot.

My personal preference is to create separate slack channels for staging and production and use --set slack.channel="#staging" to direct the messages to each channel. That way you can have different settings for each channel. You might want notifications silenced in the #staging channel for example.

However, I can see how there will be situations where you want them both going to the same channel. Maybe you have low install volume and don't want to bother with separate channels.

The current implementation looks like this in the Slack message playground.

current slack message design

Perhaps if the user passed

 --set slack.messagePrefix="`production`\n"

then they could get a message which looks like this:

new slack message design

What do you think?

cep21 commented 4 years ago

That's fine with me, I'm not picky :) My alternative would be to make multiple kubewise apps: call one of them "KubeWise-Staging" and another "KubeWise-Production".

dtuite commented 4 years ago

@cep21 this feature is added and released in version 0.5.0.

helm install kubewise -n kubewise larder/kubewise --set messagePrefix="\`production\` " --set handler=slack --set slack.token="<api-token>" --version 0.5.0