Git, CI/CD & GitOpsCXI · Kubernetes Delivery PipelineObservabilityFeedback
The CD loop closing — observability and feedback
What you'll learn
- Identify the runtime signals that close the Kubernetes delivery loop
- Wire Argo CD or Flux notifications to issues, pages, and revert PRs
- Define SLOs for rollout health and time-to-detect bad rollouts
- Recognise why a pipeline without runtime feedback is a one-way street that gets slower the longer it runs
Prerequisites
Verified against Git 2.55.x teaching target; 2.40+ minimum · GitHub Actions continuous service; Aug 2026 documentation baseline · Argo CD v3.5.x teaching target; v3.0+ minimum · Flux v2.9.x · Sigstore Cosign v3.1.x · SLSA v1.2 · OCI Distribution Specification v1.1 · Git LFS v3.7.1 · Kubernetes (cross-course target) 1.36.x
A Kubernetes delivery pipeline that ends at “merge to GitOps branch” ships changes but cannot learn from production. The loop only closes when runtime signals - sync status, application health, rollout events, alert noise - drive the next commit, issue, or page. Without that arrow back to the source, the pipeline gets slower the longer it runs because every bad rollout lingers undetected until a user notices.
The runtime signals
Four signals tell the team whether the last change was right:
flowchart LR
A["OCI manifest bundle"] --> B["Controller sync"]
B --> C["Live cluster state"]
C --> D["Sync status and OutOfSync"]
C --> E["Application health: Progressing, Healthy, Degraded"]
C --> F["Rollout events: replicas, ready, updated"]
C --> G["SLO telemetry: latency, errors, saturation"]
D --> H["Notification controller"]
E --> H
F --> H
G --> H
H -->|"on violation"| I["Open issue or page on-call"]
H -->|"on SLO breach"| J["Trigger revert PR or auto-rollback"]
I --> K["Next commit to Git"]
J --> K
K --> A
Each signal answers a different question:
- Sync status answers: is the cluster’s live state equal to the declared state? OutOfSync means drift; the controller’s reconcile tick will resolve it unless self-heal is off.
- Application health answers: are the workloads progressing, healthy, or degraded? Progressing is the normal rollout state; Degraded means the rollout failed.
- Rollout events answers: how many replicas are ready, how many are updated, how many are unavailable? A stalled rollout blocks all of them.
- SLO telemetry answers: are users experiencing this rollout as intended? Error rate, latency, and saturation metrics tell the team whether the change is right.
Notifications and the issue path
The notification controller subscribes to controller events and posts to Slack, opens issues in GitHub, pages on-call in PagerDuty, or fires webhooks. The events are typed:
triggers:
- on-degraded: true
- on-health-degraded: true
- on-sync-failed: true
templates:
- template: slack-rollout-failed
slack:
channel: "#deploys"
message: "App {.app.metadata.name} degraded after sync. Rollout stalled."
subscribers:
- slack:deploys
- github-issues:deploys
The wiring is the difference between an event that a human notices and an event that drives an action. A Slack message nobody reads is noise. A Slack message that opens an issue, assigns an owner, and triggers a follow-up is feedback.
SLOs for rollout health
An SLO is a measurable target the team commits to. The SLOs that close the loop on Kubernetes delivery are:
- Time-to-detect bad rollouts. From rollout complete to SLO breach detected. Target: minutes, not hours.
- Rollout success rate. Percentage of rollouts that complete without an SLO breach. Target: high enough that the team trusts auto-promotion.
- Mean time to recovery. From SLO breach to revert merged and synced. Target: shorter than the time to detect, so the team always recovers before the breach is observable to users.
- Drift detection latency. From manual cluster change to OutOfSync alert. Target: shorter than the next sync window.
Each SLO has an error budget. When the budget is exhausted, the team pauses auto-promotion and audits the pipeline.
Closing the loop on SLO breach
The right pattern is not “alert and hope”. The right pattern is “alert and trigger”:
flowchart LR
A["SLO breach detected"] --> B["Notification fires"]
B --> C["PagerDuty pages on-call"]
B --> D["GitHub issue opened"]
D --> E["Workflow runs revert PR"]
E --> F["Revert merged"]
F --> G["Controller rolls back cluster"]
G --> H["SLO recovers"]
The revert PR is automated: the workflow opens a PR that reverts the offending commit and assigns it to the on-call. The on-call merges the revert; the controller rolls the cluster back through the reconcile loop. The whole sequence runs without manual intervention unless the on-call decides the revert is wrong.
This is the loop closing: the runtime signal drove a commit, the commit was merged, the cluster rolled back, the SLO recovered. The next change inherits the lessons of this one.
Production discipline
- Notifications drive actions, not channels. A Slack message that nobody reads is noise; an issue that opens a PR is feedback.
- SLOs are measurable and budgeted. Without an error budget, an SLO is a slogan. With one, it is a contract.
- Revert is automated, not manual. The on-call’s job is to confirm the revert, not to write it.
- Drift alerts are routed to the team that owns the change. A drift alert to a generic channel is noise; one routed to the team that owns the offending resource is feedback.
- The loop’s arrow is reviewed. The team reads the feedback path monthly and asks: did the signal drive the commit? If not, the path is broken.
Cross-course references
- Kubernetes for Production Sysadmins - Parts XI-XIV cover Argo CD notifications, Flux’s notification controller, and rollout health.
- Observability for Production Sysadmins - Parts XXIII-XXVI cover Prometheus, SLOs, and the alerting path the loop depends on.
- This course, Part LVII (Approvals) - covers the human gate that the loop’s revert PR must respect.
- This course, Part XLVII (PipelineGraph) - covers how the loop’s feedback path is a DAG edge, not a side channel.
Quiz
Knowledge check · 4 questions
Q1. What closes the loop in a Kubernetes delivery pipeline?
Q2. An SLO without an error budget is a slogan, not a contract.
Q3. Which SLO is most directly tied to closing the Kubernetes delivery loop?
Q4. Diagnose a Kubernetes pipeline whose loop never closes, and prescribe the structural correction.
A team has a working pipeline: image builds, manifests render, the controller syncs, and rollouts complete. Six months in, the team notices that mean-time-to-detect for bad rollouts is hours, because nothing in production talks back to the pipeline. A bad canary lingers for an hour before a human notices in Slack; a NetworkPolicy that silently blocks traffic is only discovered when users complain. The team has Prometheus, Loki, and the Argo CD notifications webhook, but none of them produce a commit, an issue, or even a Slack thread that triggers a follow-up change.
Passing score: 75%. Answers are checked in this browser.