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

Specifying notification Provider's namespace in an alert #125

Open
ambis opened this issue Jan 19, 2021 · 5 comments
Open

Specifying notification Provider's namespace in an alert #125

ambis opened this issue Jan 19, 2021 · 5 comments

Comments

@ambis
Copy link

ambis commented Jan 19, 2021

Running 0.6.1

Regarding this section:
https://github.com/fluxcd/notification-controller/blob/main/config/crd/bases/notification.toolkit.fluxcd.io_alerts.yaml#L92

It only allows you to specify the name of the alert Provider, in my case discord. But it does not allow to reference it form another namespace (monitoring in this case).

The intent I believe, in a single tenant cluster, is to have only one Provider, which sits nicely in the flux-system namespace.

But it is impossible now to create an alert in a namespace where there are eg. HelmReleases you want to watch (like monitoring).

This is what I must do right now:

apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Alert
metadata:
  name: discord-alert-monitoring
  namespace: flux-system
spec:
  providerRef:
    name: discord
  eventSeverity: info
  eventSources:
    - kind: HelmRelease
      name: '*'
      namespace: monitoring

This is what I would like to do:

apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Alert
metadata:
  name: discord-alert-monitoring
  namespace: monitoring  # <<--- not flux-system
spec:
  providerRef:
    name: discord
    namespace: flux-system   #  <<---- THIS IS NOT SUPPORTED
  eventSeverity: info
  eventSources:
    - kind: HelmRelease
      name: '*'

For me, the best solution would be:

Have issue #71 implemented, since I could subscribe to all (single tenant) cluster events at once, without having to worry about setting up separate alerts per namespace.

@stefanprodan stefanprodan changed the title Spesifying notification Provider's namespace in an alert Specifying notification Provider's namespace in an alert Jan 20, 2021
@phillebaba
Copy link
Member

Is this something that we should consider implementing? It will break existing multi tenant setups if we switch over to allowing cross namespace references.

@hrvatskibogmars
Copy link

👍

@benfairless
Copy link

I personally would like the suggested behaviour. It would allow tenants to set up their own alerts using an existing integration.

@sambonbonne
Copy link

sambonbonne commented Apr 11, 2023

Something like this would be useful for one of my clients: we have one provider for a lot of alerts and we want alerts to be created in same namespaces as Helm releases (and not as the provider) so each namespace would be more "self-contained".

@rsafonseca
Copy link

I've opened a PR that solves this issue and a couple others :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants