Skip to content

fix(helm): preserve zero PDB budgets and validate minAvailable/maxUnavailable - #106

Open
dimetron wants to merge 3 commits into
mainfrom
fix/helm-pdb-validation
Open

dimetron wants to merge 3 commits into
mainfrom
fix/helm-pdb-validation

Conversation

@dimetron

@dimetron dimetron commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Builds on #73 (includes its commit, rebased on main) and combines the best PDB patterns from kagent's own chart and istio.

Design

Concern Source Behaviour
Zero / empty handling kagent kagent-tools.pdb.isSet: null and "" are unset; 0 and percentages are kept
Both or neither set kagent kagent-tools.pdb.validate fails with an actionable message
Default budget kagent maxUnavailable: 1 when enabled (minAvailable: null)
Selector kagent reuses kagent-tools.selectorLabels (cannot drift from the Deployment)
Labels / annotations / unhealthyPodEvictionPolicy kagent optional, rendered via with
Replica guard istio only rendered when replicaCount > 1; a single-replica PDB protects nothing or blocks drains
Skipped-PDB feedback new config is still validated, and NOTES.txt warns when the PDB is skipped

Prior art (CNCF charts)

Chart Keeps 0 Both set Neither set Replica guard
kagent ✅ fail fail ❌
istio ❌ maxUnavailable wins not rendered ✅
argo-cd ✅ maxUnavailable wins minAvailable: 0 ❌
cert-manager ✅ renders both minAvailable: 1 ❌
ingress-nginx ❌ maxUnavailable wins not rendered ✅
kyverno ❌ fail minAvailable: 1 ✅

Testing

make helm-test — 36/36 passing; helm lint clean.

Relates to #73

anthonyhaussman and others added 2 commits November 11, 2026 23:42
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>
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.

2 participants