Post

Stage descheduler repair with suspended CronJob and guarded activation

Stage descheduler repair with suspended CronJob and guarded activation

This push lands a staged rollout for the descheduler repair: it renders a suspended CronJob under chart 0.33.0, validates the policy and cadence offline, then requires a repo-owned manual gate to flip the suspend flag. The change adds two new CI checks and extends the validation gate documentation so the activation step cannot be skipped.

Suspended CronJob as the staged artifact

The updated scripts/ci/descheduler-cadence-check.sh now renders the Helm chart twice—once with the repaired values and once with a pre-repair fixture—and asserts that both produce a single CronJob with suspend: true, no Deployment, DaemonSet, StatefulSet, or Job, and the correct --descheduling-interval=30m argument. The Argo chart parameters kind=CronJob and suspend=true are applied explicitly during render, so the staged object can never become an active workload until the manual gate runs.

Policy and release validation scripts

Two new Python scripts gate the staging pipeline. descheduler-policy-check.py validates the rendered DeschedulerPolicy v1alpha2 document: it requires exactly one conservative profile, the LowNodeUtilization and RemovePodsViolatingInterPodAntiAffinity strategies, a DefaultEvictor configuration with nodeFit: true and evictSystemCriticalPods/ignorePvcPods flags, and a global maxNoOfPodsToEvictTotal of one. descheduler-release-check.py runs in the protected live-plan job; it confirms the Argo Application tracks targetRevision=main, the chart overrides are present, and the reconciled revision matches the staged suspended CronJob with zero live descheduler Pods.

Guarded activation gate

The validation gate documentation now spells out a two-step process: after the protected staging job passes, an operator must run a repo-owned manual workflow that binds the exact activation revision and re-checks fresh node, Pod, lease, Job, and kubelet events before flipping suspend=false. The Terragrunt plan workflow and Rego policy tests were extended to include the new descheduler-release-check.py invocation, so the gate appears in every plan run and cannot be bypassed by a fast-forward merge.

Transferable pattern for other staged rollouts

A platform team can replicate this pattern for any Helm-managed workload that needs a safe pre-activation pause: render a suspended or scaled-to-zero object, validate policy and runtime invariants in CI, then require a protected manual step with fresh cluster evidence before enabling. The split between descheduler-cadence-check.sh (offline render assertions) and descheduler-release-check.py (live-cluster reconciliation checks) keeps the feedback loop fast while guaranteeing the activation gate sees the same overrides that staging verified.

This post is licensed under CC BY 4.0 by the author.