Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Slack Channels #250

Closed
akath19 opened this issue Apr 4, 2020 · 8 comments
Closed

Multiple Slack Channels #250

akath19 opened this issue Apr 4, 2020 · 8 comments
Labels
enhancement New feature or request
Milestone

Comments

@akath19
Copy link

akath19 commented Apr 4, 2020

Is your feature request related to a problem? Please describe.
I'm running botkube as a PoC for my company, we have one cluster per team for non-prod environments & one cluster per team for prod environments, each team wants to be able to manage only their clusters.

This poses a problem because @BotKube doesn't have awareness of the channel and allows running kubectl commands for all clusters it knows about and running ping will give the user the list of all clusters configured.

Describe the solution you'd like
I'd love for botkube to be able to work on multiple slack channels while keeping context of each of them, specifically, I would like to have separate botkubes that have access to only one cluster in a single Slack workspace

Describe alternatives you've considered
I tried to find a way to add multiple botkube instances to slack but adding to a Slack workspace will always render the same token.

I have added botkube to a few channels but all channels have access to all clusters

Additional context
Having this would allow me to manage all my clusters and allow my teams to manage their clusters separately without them needing either kubectl or having access to clusters not their own

I found this ticket that seemed to describe something similar, however, it's not the same request

@akath19 akath19 added the enhancement New feature or request label Apr 4, 2020
@PrasadG193 PrasadG193 self-assigned this Jun 13, 2020
@McOffsky
Copy link

McOffsky commented Jun 22, 2020

The token for botkube slack app will always be the same, its not related to the channel value. Both of those are stored in botkube-communication-secret. For now the workaround would be to create another deployment for botkube, which for communication uses diffrent secret, with the same token, and diffrent channel.

@mleklund
Copy link

I'd like to send errors to a specific channel, and the chaff to another, so I am in the same boat.

@PrasadG193 PrasadG193 removed their assignment Sep 26, 2020
@ghost
Copy link

ghost commented Feb 25, 2021

Well, I would like to have a similar feature.

We use BotKube in our Slack to notify about Deployment tool status directly to responsible person "@name.surname" instead of channel.

It would be great, if BotKube could mention status to more persons and also public channel.

For example like this:

slack:
    enabled: true
    channels: ["@joe.barbado", "@frankie.sucks", "devel-status"]

@dmthomson
Copy link

dmthomson commented Mar 24, 2021

Well, I would like to have a similar feature.

We use BotKube in our Slack to notify about Deployment tool status directly to responsible person "@name.surname" instead of channel.

It would be great, if BotKube could mention status to more persons and also public channel.

For example like this:

slack:
    enabled: true
    channels: ["@joe.barbado", "@frankie.sucks", "devel-status"]

Since you already have it going to a dedicate person did you try using @slack_group?

@dmthomson
Copy link

I would love to be able to route functionality to different channels instead of all in one without needing to run multiple deployments.

Events could go to a certain channel, k8s commands another. etc

@devopsmash
Copy link

related #508 ?

@mszostok
Copy link
Contributor

mszostok commented Jun 14, 2022

This issue is not related strictly to the multichannel support as defined in #596.

Here is the main difference:

I'd love for botkube to be able to work on multiple slack channels while keeping context of each of them, specifically, I would like to have separate botkubes that have access to only one cluster in a single Slack workspace

Currently, you are able to do that:

  • to limit the kubectl executor access, add --set config.settings.kubectl.restrictAccess=true during Helm chart installation (or put this in values.yaml).
  • to send the notification, just specify a proper communication.slack.channel per deployment.

Findings

However, this solution has a few problems:

  1. It works only if you will deploy one BotKube per cluster/channel. But it's what you asked for.

  2. The @BotKube ping command returns information about all registered cluster, even if a given channel is not authorized with a given channel. IMO, it's a bug.

  3. If you send the @BotKube get po --cluster-name prod from a channel that is not authorized, you will not get any response. IMO, it makes pure UX experience. It should print sth like:

    Cluster "prod" is not registered or channel is not authorized to access it.
    

    Related issue: Feedback instead of No Response while executing commands #402

  4. If you use the botkube.io/channel: <channel_name>, notifications are sent to a given channel even if not authorized. IMO, it's a bug.

    However, fixing this is problematic as we will need to do that base on config.settings.kubectl.restrictAccess and if it is set to true, allow only communications.<name>.channel. It will be better to postpone that until BotKube will support multiple channels per single configuration. For example:

    slack:
      enabled: true
      channels: ["@foo", "@bar", "devel-status"]

Action Items

  1. Fix bugs:

  2. Improve UX:

    • If cluster is not authorized, instead of ignoring, send info:
      Cluster "prod" is not registered or channel is not authorized to access it.
      

/cc @PrasadG193 @pkosiec

@pkosiec
Copy link
Member

pkosiec commented Aug 25, 2022

Hi all,

Closing as the requested features along with the UX improvements were implemented in #596.
When it comes to resource annotations, I put the requirements in an aggregated task for reworking the feature: #690

Feel free to reopen the issue or create another ones with a description of what's missing in the new configuration features, after trying out BotKube 0.13. It's just around the corner, so stay tuned!

@pkosiec pkosiec closed this as completed Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants