RoadieHQ / kubewise

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

Get Google Chat integration working #19

Closed dtuite closed 4 years ago

dtuite commented 4 years ago

Setup instructions will be something like this:

  1. Open Hangouts Chat in your browser.
  2. Go to the room to which you want to add a bot. The name of the room could indicate the cluster that the notifications are coming from, such as "staging-cluster".
  3. From the menu at the top of the page, select Configure webhooks.
  4. Under Incoming Webhooks, click ADD WEBHOOK.
  5. Name the new webhook 'KubeWise' and the Avatar URL: https://raw.githubusercontent.com/larderdev/kubewise/master/assets/kubewise-mark-blue-512x512.png
  6. click SAVE.
  7. Copy the URL listed next to your new webhook in the Webhook Url column.
  8. Click outside the dialog box to close.

The install will be something like this:

kubectl create namespace kubewise
helm repo add larder https://charts.larder.dev
helm install kubewise larder/kubewise --namespace kubewise --set handler=googlechat --set googlechat.webhookUrl="<webhookUrl>"

The output in Google Chat will look something like this:

google-chat-preview

Todo

TJM commented 4 years ago

Looks like a great start, and very usable looking as is. One improvement I would like, is to use the threadKey (https://developers.google.com/hangouts/chat/how-tos/bots-develop#thread_key) to keep the "related" messages together. I think we could fabricate a threadKey from clustername-namespace-release maybe? Awesome, once there are two handlers and examples of how to switch, I am betting adding more will be easier.