Notifications, Alerts and Webhooks

notification-controller runs in both directions: outbound Providers and Alerts push reconciliation events to Slack, PagerDuty and Git commit status, while inbound Receivers accept webhooks that cut git-to-cluster lag from minutes to seconds.

Overview

The part of Flux that talks to humans

Everything else in Flux is a closed loop between a Git repository and a cluster. notification-controller lets that loop talk to humans and lets humans poke it. It is installed by default in every bootstrap and owns three CRDs (custom resource definitions, which add new object types to the Kubernetes API) that split cleanly into two directions.

  • Provider (outbound, notification.toolkit.fluxcd.io/v1beta3): the destination events are dispatched to.
  • Alert (outbound, notification.toolkit.fluxcd.io/v1beta3): the routing rule that says which events to care about.
  • Receiver (inbound, notification.toolkit.fluxcd.io/v1): an authenticated endpoint that requests reconciliation.

The rest of this chapter follows the outbound direction first, then the inbound one.

Key concepts

  • Provider
  • Alert
  • Receiver
  • Commit status Provider
  • generic-hmac
  • Webhook path
  • Event rate limiting
  • resourceFilter

Interview questions

  • Walk through the outbound path: a Kustomization fails and the on-call engineer gets paged. What happens at each step?
  • How do you make Flux report deploy status back onto the Git commit, and why does that matter?
  • Explain how webhook receivers work and set one up end to end. Why is this worth doing when Flux already polls?
  • Your Slack channel is full of Flux noise and the team has muted it. How do you fix the alerting design?
  • What is generic-hmac, where does it appear, and when would you choose it?

Sign up free to read the full topic

More DevOps topics

Start free on Cariara · Coding problems · System design studio