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

Allow 'all namespaces' in eventSources #784

Open
jpflouret opened this issue Apr 1, 2024 · 1 comment
Open

Allow 'all namespaces' in eventSources #784

jpflouret opened this issue Apr 1, 2024 · 1 comment

Comments

@jpflouret
Copy link

Currently CrossNamespaceObjectReference can match 'all resources' in a given namespace using the resource name *. However, it is not seem possible to match 'all resources' on 'all namespaces'.

I have an Alert that I'd like to handle all event sources of type HelmRelease on any namespace. Currently I have to enumerate all namespaces that have HelmReleases on them:

---
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
  name: slack-helm
  namespace: flux-system
spec:
  providerRef:
    name: slack-bot
  eventSeverity: info
  eventSources:
    - kind: HelmRelease
      name: '*'
      namespace: namespace-a
    - kind: HelmRelease
      name: '*'
      namespace: namespace-b
    - kind: HelmRelease
      name: '*'
      namespace: namespace-c
      # ...

Ideally I could specify 'all namespaces' with *:

---
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
  name: slack-helm
  namespace: flux-system
spec:
  providerRef:
    name: slack-bot
  eventSeverity: info
  eventSources:
    - kind: HelmRelease
      name: '*'
      namespace: '*'

Seems like it would be a relatively small change in eventMatchesAlertSource

@MerzDaniel
Copy link

We also are looking for this feature

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

2 participants