Skip to content

feat(helm): add optional PodDisruptionBudget for the controller - #140

Open
anthonyhaussman wants to merge 1 commit into
kagent-dev:mainfrom
anthonyhaussman:feat/helm-pod-disruption-budget
Open

feat(helm): add optional PodDisruptionBudget for the controller#140
anthonyhaussman wants to merge 1 commit into
kagent-dev:mainfrom
anthonyhaussman:feat/helm-pod-disruption-budget

Conversation

@anthonyhaussman

@anthonyhaussman anthonyhaussman commented Aug 6, 2026

Copy link
Copy Markdown

Summary

Adds an opt-in PodDisruptionBudget for the kmcp controller-manager pods.

Node drains and cluster upgrades can currently evict every controller replica at once. A PodDisruptionBudget lets operators keep a minimum number of replicas scheduled during voluntary disruptions.

The feature is disabled by default, so existing installs render an identical manifest set.

Design notes

  • The selector reuses kmcp.selectorLabels, the same helper the Deployment uses, so the budget matches exactly the controller pods.
  • minAvailable and maxUnavailable are mutually exclusive at the API level, so the chart fails at render time when both or neither is set, rather than deferring the error to the API server.
  • kmcp.pdb.isSet treats the integer 0 as a set value while rejecting nil and "", so maxUnavailable: 0 is not silently dropped.
  • unhealthyPodEvictionPolicy is omitted from the manifest unless set, keeping the output valid on clusters older than 1.27.
  • The template targets policy/v1 (Kubernetes 1.21+) without a policy/v1beta1 fallback. The resource is opt-in and the beta API has been removed since 1.25.

Node drains and cluster upgrades can evict every controller replica at once. An opt-in PodDisruptionBudget lets operators keep a minimum number of replicas scheduled during voluntary disruptions.

Disabled by default, so existing installs render an identical manifest set. The template rejects setting both minAvailable and maxUnavailable, or neither, because the API server accepts exactly one of them.

Assisted-by: Claude Opus 5
Signed-off-by: Anthony Hausman <anthonyhaussmann@gmail.com>
@anthonyhaussman
anthonyhaussman force-pushed the feat/helm-pod-disruption-budget branch from c6a451b to 792da57 Compare August 6, 2026 04:50
@anthonyhaussman
anthonyhaussman marked this pull request as ready for review August 6, 2026 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant