Backport 2392 to 0.10.x release branch - #2430
Open
anthonyhaussman wants to merge 1 commit into
Open
Conversation
…#2392) ## What Adds an opt-in `PodDisruptionBudget` for the controller and UI Deployments, configured per component via `controller.pdb` and `ui.pdb`. ```yaml controller: pdb: enabled: false minAvailable: null maxUnavailable: 1 unhealthyPodEvictionPolicy: "" labels: {} annotations: {} ``` ## Why these defaults Disabled by default. Both components default to `replicas: 1`, and a `minAvailable: 1` budget on a single-replica Deployment refuses every voluntary eviction, so node drains and cluster upgrades hang. When enabled, the default is `maxUnavailable: 1`, which is safe at any replica count. `NOTES.txt` warns at install time when `minAvailable >= replicas`, the configuration that deadlocks drains. ## Selector correctness The budget selector is rendered from `kagent.<component>.selectorLabels`, the same helper the Deployment `spec.selector` already uses. A budget whose selector does not match the Deployment silently protects nothing, so reusing the helper makes drift impossible rather than merely unlikely. ## Validation Kubernetes rejects a PDB with both `minAvailable` and `maxUnavailable`, and one with neither is meaningless. Both cases now fail at template time with a message naming the offending values path: ``` Error: execution error at (kagent/templates/ui-pdb.yaml:2:4): ui.pdb: minAvailable and maxUnavailable are mutually exclusive. Set exactly one (to use minAvailable, set ui.pdb.maxUnavailable=null). ``` The set/unset check uses `kindIs "invalid"` rather than `default ""`, because Helm treats `0` as empty and would otherwise silently drop a `maxUnavailable: 0` budget. Signed-off-by: Anthony Hausman <ahausman@tf1.fr> (cherry picked from commit a284889)
anthonyhaussman
marked this pull request as ready for review
August 12, 2026 07:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2392