Repository navigation
Conversation
Support custom deployment metadata annotations and configurable PodDisruptionBudget for kagent-tools. Assisted-by: Gemini 3.7 Flash Signed-off-by: Anthony Hausman <anthonyhaussmann@gmail.com>
…vailable Use hasKey so minAvailable/maxUnavailable of 0 are rendered, fail when both or neither are set, and add unit tests for these cases. Signed-off-by: Dmytro Rashko <dimetron@me.com>
- Add kagent-tools.pdb.isSet/validate helpers: null and "" are unset, 0 and percentages are kept; both-set and neither-set fail with actionable messages (mirrors kagent's controller PDB). - Default to maxUnavailable: 1 when enabled. - Only render the PDB when replicaCount > 1 (istio pattern), still validating config, and warn in NOTES when it is skipped. - Expand unit tests. Signed-off-by: Dmytro Rashko <dimetron@me.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the Deployment annotation and PodDisruptionBudget changes.
No open issues 🎉
What changed in this PR
Building on #73, this PR adds configurable Deployment annotations and PodDisruptionBudget support to the KAgent Tools Helm chart, preserving zero budgets and rejecting conflicting or missing budget settings.
Changes:
- Adds optional PDB settings with a default
maxUnavailable: 1and selectors shared with the Deployment. - Validates enabled PDB configurations even when the replica guard skips creation, and warns users when skipped.
- Adds Deployment annotations and unit tests for annotations, PDB rendering, zero budgets, and validation.
| File | Description |
|---|---|
helm/kagent-tools/values.yaml |
Defines Deployment annotations and documented PDB defaults. |
helm/kagent-tools/tests/pdb_test.yaml |
Tests PDB rendering, zero budgets, optional metadata, and validation. |
helm/kagent-tools/tests/deployment_test.yaml |
Tests default and custom Deployment annotations. |
helm/kagent-tools/templates/pdb.yaml |
Renders the optional PDB using shared selectors. |
helm/kagent-tools/templates/NOTES.txt |
Warns when the replica guard skips an enabled PDB. |
helm/kagent-tools/templates/deployment.yaml |
Renders optional Deployment-level annotations. |
helm/kagent-tools/templates/_helpers.tpl |
Adds budget-presence, validation, and replica-guard helpers. |
Review effort: Balanced
peterj
approved these changes
Nov 17, 2026
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.
Builds on #73 (includes its commit, rebased on
main) and combines the best PDB patterns from kagent's own chart and istio.Design
kagent-tools.pdb.isSet:nulland""are unset;0and percentages are keptkagent-tools.pdb.validatefails with an actionable messagemaxUnavailable: 1when enabled (minAvailable: null)kagent-tools.selectorLabels(cannot drift from the Deployment)unhealthyPodEvictionPolicywithreplicaCount > 1; a single-replica PDB protects nothing or blocks drainsNOTES.txtwarns when the PDB is skippedPrior art (CNCF charts)
0maxUnavailablewinsmaxUnavailablewinsminAvailable: 0minAvailable: 1maxUnavailablewinsminAvailable: 1Testing
make helm-test— 36/36 passing;helm lintclean.Relates to #73