Commands icon
If icon
SlackIncomingWebhook icon
Schedule icon

Kubernetes ConfigMap and Secret Hash Drift Sentinel

Audits Kubernetes Deployment annotations to detect unrolled ConfigMap/Secret changes and pod configuration drift.

Categories
CloudInfrastructure

How it works

This workflow inspects Kubernetes Deployment pod templates (spec.template.metadata.annotations) for configuration hash annotations (such as checksum/config, checksum/secret, or Helm standard roll hashes). In Kubernetes, modifying a ConfigMap or Secret does not trigger a rolling restart of existing pods unless a pod template hash changes. Workloads lacking checksum annotations suffer from silent config drift and stale configurations. When unhashed deployments are found, Slack is alerted.

What you get

  • Automated detection of Kubernetes Deployments vulnerable to silent configuration drift.
  • Ensures all microservices reload configuration changes reliably upon GitOps deployment.
  • Prevents split-brain environments where newly spawned pods have new config while older pods run stale config.

Who it's for

  • SREs and Platform Engineers enforcing GitOps best practices across Kubernetes clusters.
  • DevOps engineers deploying Helm charts and Kustomize overlays.

Why orchestrate this with Kestra

  • GitOps Governance: Enforce configuration reloading standards continuously.
  • Native Kubectl Tooling: Uses standard Kubernetes API primitives without custom admission controllers.
  • Clear Actionable Guidance: Pinpoints exactly which deployments need checksum annotations.

Prerequisites

  • Kubernetes cluster with read permissions to Deployments in target namespace.
  • Secret SLACK_WEBHOOK configured in Kestra.

Quick start

  1. Import the blueprint into Kestra.
  2. Specify the target namespace.
  3. Run the workflow to inspect deployment annotations.

How to extend

  • Automatically trigger kubectl rollout restart deployment/<name> when ConfigMap modifications are detected.
  • Expand audit across all cluster namespaces using EachParallel.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.