fluxcd / notification-controller

The GitOps Toolkit event forwarded and notification dispatcher

Home Page:https://fluxcd.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add namespace filter '*'

gecube opened this issue · comments

Good day colleagues,

I am trying to make a global alert for the whole cluster. Right now I see that I can do something like this:

apiVersion: notification.toolkit.fluxcd.io/v1beta2
kind: Alert
metadata:
  name: slack-p0
  namespace: flux-system
spec:
  summary: "UAT cluster"
  providerRef:
    name: slack-p0
  eventSeverity: error
  eventSources:
    - kind: GitRepository
      name: '*'
    - kind: Kustomization
      name: '*'
    - kind: HelmRelease
      name: '*'

but in fact it creates alert only for ns flux-system according to doc here https://fluxcd.io/flux/components/notification/alerts/#event-sources and to my observations.

I'd like to do something like:

apiVersion: notification.toolkit.fluxcd.io/v1beta2
kind: Alert
metadata:
  name: slack-p0
  namespace: flux-system
spec:
  summary: "UAT cluster"
  providerRef:
    name: slack-p0
  eventSeverity: error
  eventSources:
    - kind: GitRepository
      name: '*'
      namespace: '*'
    - kind: Kustomization
      name: '*'
      namespace: '*'
    - kind: HelmRelease
      name: '*'
      namespace: '*'

right once and not creating a specific alert for every namespace I have in cluster (I have dynamic namespaces)

Any suggestions?

duplicate of #71