botkube icon indicating copy to clipboard operation
botkube copied to clipboard

Include or explude namespaces based on labels

Open mumrau opened this issue 3 years ago • 3 comments

Hello,

I think that botkube should be able to adapt its selective filter according to labels on the namespace, i.e I would like to be able to either include or exclude namespaces depending on some labels that the user would choose (production for example). I know that a wildcard filter exists for excluding but I would rather my logic not to be dictated by the namespace name but rather by the labels attached to it.

As far as I understood, annotating the namespace with botkube.io/disable: true would only disable changes of the namespace itself and not its content and thus it doesn't fill the gap (and it would be too opinionated of a label in my sense anyway).

I hope I haven't missed any already existing feature, and would like to hear what you think. Thanks!

mumrau avatar May 28 '21 14:05 mumrau

This sounds like a good feature to have

PrasadG193 avatar Jul 21 '21 06:07 PrasadG193

Sounds like a good feature, @mumrau you are thinking about a customizable label, attached to a namespace that excludes all the resources in the namespace?

Like for example, configure the custom label in the yaml file or something like that?

CDimonaco avatar Aug 07 '21 09:08 CDimonaco

I don't think about exclusion but configuration and customization. I want botkube to react in harmony with other applications based on a common (and thus customizable) label.

Let's say I have ns-a and ns-b:

  • ns-a has criticality: major
  • ns-b has criticality: minor

This way, all my monitoring and observability tools know whether they should act or no based on that label, I don't have to have a mapping of major whith is botkube.io=yes and prometheus.io=activated or such.

I hope I make sense.

mumrau avatar Aug 09 '21 12:08 mumrau