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

Enable alerting for FluxInstance events #131

Merged
merged 3 commits into from
Jan 1, 2025
Merged

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Dec 21, 2024

This PR integrates Flux Operator with notification-controller. Users can define Flux Alerts and get notified when the operator emits events during the FluxInstance reconciliation.

Setup alerting

Define an Alert for FluxInstance events:

apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
  name: slack-bot
  namespace: flux-system
spec:
  type: slack
  channel: general
  address: https://slack.com/api/chat.postMessage
  secretRef:
    name: slack-bot-token
---
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
  name: slack-alert
  namespace: flux-system
spec:
  providerRef:
    name: slack-bot
  eventSeverity: info
  eventSources:
    - kind: FluxInstance
      name: flux

Notifications examples

The operator will forward events to notification-controller after the install operation succeed, after a successful update (version bump, config change, CVE patch, etc) or when the reconciliation fails.

Screenshot 2024-12-21 at 13 06 53 Screenshot 2024-12-21 at 13 09 14 Screenshot 2024-12-21 at 13 24 17

@stefanprodan stefanprodan added the area/observability Reporting, metrics, logs and events related issues and pull requests label Dec 21, 2024
@stefanprodan stefanprodan force-pushed the notification-integration branch 3 times, most recently from ca04f7e to e6ec7d0 Compare December 21, 2024 13:17
@stefanprodan stefanprodan force-pushed the notification-integration branch 2 times, most recently from bd5c791 to 79d2bd7 Compare December 22, 2024 15:32
@stefanprodan stefanprodan force-pushed the notification-integration branch from 79d2bd7 to 9e3e6da Compare December 23, 2024 10:54
@stefanprodan stefanprodan force-pushed the notification-integration branch from 9e3e6da to ba55947 Compare December 23, 2024 11:01
Copy link
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👌

@stefanprodan stefanprodan merged commit 9634321 into main Jan 1, 2025
1 check passed
@stefanprodan stefanprodan deleted the notification-integration branch January 1, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/observability Reporting, metrics, logs and events related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants