Script icon
Docker icon
If icon
SlackIncomingWebhook icon
Log icon
Return icon
Schedule icon

Contour Envoy xDS Config NACK and Sync Delay Sentinel

Audits Project Contour ingress controller telemetry to detect Envoy xDS dynamic configuration NACKs, CDS sync delays, and proxy disconnects.

Categories
CloudInfrastructure

Automates continuous health and configuration reliability surveillance for Project Contour Kubernetes ingress controllers.

How it works

  1. A schedule trigger executes the Contour ingress health audit workflow every 15 minutes.
  2. The Python task queries the Contour metrics service endpoint on port 8000.
  3. The script extracts Envoy xDS configuration NACK rejections, sync generation latency, and connected proxy counts.
  4. An evaluation gate determines whether NACK errors, sync delay, or proxy disconnections breach operational bounds.
  5. When configuration errors are detected, a high-priority Slack alert is dispatched to the Ingress SRE team.
  6. When xDS route updates stream cleanly to all data plane proxies, nominal telemetry is logged.
  7. A structured JSON audit manifest is emitted for ingress platform governance and routing SLA records.

Architecture diagram

graph TD
    Trigger[Schedule Trigger: 15m] --> ScanMetrics[Python Script: Scrape Contour Metrics]
    ScanMetrics --> EvalBreach{NACKs > Threshold OR Sync Delay High?}
    EvalBreach -- Yes --> SlackAlert[Slack: High-Urgency Ingress Alert]
    EvalBreach -- No --> LogNominal[Log: Nominal Contour State]
    SlackAlert --> EmitManifest[Debug Return: Ingress Audit Manifest]
    LogNominal --> EmitManifest

Architecture components

  • Trigger: Automated schedule polling at 15-minute recurring intervals.
  • Script Task: Scrapes Project Contour Prometheus metrics endpoints using Docker container runners.
  • Decision Gate: Evaluates whether Envoy xDS NACK rejections or sync snapshot delays exceed limits.
  • Notification Task: Dispatches structured Slack alerts with ingress namespace and sync latency details.
  • Audit Manifest: Emits JSON execution payloads containing ingress data plane health and timestamps.

Key capabilities

  • Continuous surveillance of dynamic Envoy xDS configuration streams including CDS, LDS, RDS, and EDS.
  • Early warning detection for malformed HTTPProxy CRD routes causing Envoy configuration NACKs.
  • Automated tracking of xDS snapshot compilation latency across large multi-tenant ingress topologies.
  • Zero host dependency execution via isolated containerized Python runners.

What you get

  • Real-time visibility into Kubernetes ingress routing consistency and data plane convergence.
  • Proactive alerts preventing traffic blackholing caused by rejected Envoy routing tables.
  • Standardized audit manifests containing exact proxy counts and xDS synchronization metrics.
  • Zero-overhead deployment compatible with self-hosted Kubernetes clusters and managed cloud providers.

Who it's for

  • Ingress and platform SREs maintaining enterprise Kubernetes gateway and edge routing infrastructure.
  • Network engineers overseeing Envoy data plane proxy fleets and service mesh ingress points.
  • DevSecOps teams validating HTTPProxy and Gateway API route definitions across namespaces.
  • Cloud platform architects enforcing consistent ingress routing availability and SLA compliance.

Why orchestrate this with Kestra

  • Serverless Docker Isolation: Executes telemetry scraping in ephemeral Docker environments without persistent workers.
  • Centralized Secrets Governance: Protects sensitive Slack webhooks using encrypted namespace secrets.
  • Declarative YAML Workflows: Manages ingress control plane surveillance as versioned code in Git repositories.
  • Comprehensive Audit History: Preserves historical routing telemetry records in searchable Kestra execution logs.

Use cases

  • HTTPProxy Validation Gating: Detects invalid ingress route configurations before production traffic is impacted.
  • Data Plane Churn Detection: Identifies flapping Envoy proxy connections during horizontal node autoscaling events.
  • Control Plane Bottleneck Analysis: Highlights high xDS generation latency caused by oversized cluster endpoints.

Inputs

Name Type Default Description
contour_metrics_url STRING http://contour.projectcontour.svc.cluster.local:8000 Internal HTTP URL exposing Prometheus metrics for Contour.
ingress_namespace STRING projectcontour Kubernetes namespace where Contour and Envoy proxies run.
max_xds_nack_threshold INT 3 Maximum allowable Envoy xDS NACK rejections before alerting.
max_xds_sync_delay_ms INT 200 Maximum acceptable Envoy xDS sync delay in milliseconds.
alert_on_proxy_disconnect BOOL true Toggle whether loss of connected proxies triggers an alert.

Expected outputs

  • {{ outputs.scan_contour_xds_telemetry.vars.xds_nack_count }}: Count of Envoy dynamic configuration NACK rejections.
  • {{ outputs.scan_contour_xds_telemetry.vars.sync_delay_ms }}: Maximum observed xDS configuration snapshot sync delay.
  • {{ outputs.scan_contour_xds_telemetry.vars.connected_proxies_count }}: Count of active Envoy proxies connected via gRPC.
  • {{ outputs.scan_contour_xds_telemetry.vars.is_alerting }}: Boolean flag indicating if ingress SLA is breached.
  • {{ outputs.scan_contour_xds_telemetry.vars.audit_timestamp }}: ISO-8601 UTC timestamp of the ingress audit run.

Prerequisites

  • Project Contour 1.25+ deployed with Prometheus metrics enabled on port 8000.
  • Network connectivity from the Kestra worker to the Contour metrics service.
  • Configured Slack incoming webhook URL with permissions to post in ingress alert channels.

Secrets

  • SLACK_WEBHOOK_URL: Secure webhook URL for routing ingress alerts to the Ingress SRE Slack channel.

Quick start

  1. Verify that Project Contour exposes Prometheus metrics on HTTP port 8000.
  2. Add the SLACK_WEBHOOK_URL secret within your Kestra namespace settings.
  3. Specify your ingress deployment namespace in ingress_namespace.
  4. Run a manual flow execution via the Kestra UI to validate metric ingestion.
  5. Enable the periodic_contour_audit schedule trigger to establish automated monitoring.

Common pitfalls and troubleshooting

  • Invalid TLS Secrets: NACKs frequently occur when referenced Kubernetes TLS secrets lack valid private keys.
  • Port Accessibility: Ensure Contour --stats-address port 8000 is exposed via a Kubernetes Service.
  • Large Endpoints: Endpoints with thousands of pod addresses can increase xDS serialization latency.
  • Contour Pod Memory: In high-churn clusters, verify Contour controller pods have sufficient memory allocations.

How to extend

  • Automated HTTPProxy Audit: Query Kubernetes API for invalid HTTPProxy CRD status conditions during NACK alerts.
  • Dynamic Proxy Reload: Trigger an Envoy daemonset rollout restart if connected proxy counts drop below baseline.
  • PagerDuty Escalation: Escalate to on-call platform engineers if xDS NACKs persist across 3 consecutive cycles.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.