Skip to content

feat(helm): gate operator/webhook PDBs on HA and expose maxUnavailable#178

Open
giuliocalzo wants to merge 1 commit into
SlinkyProject:mainfrom
giuliocalzo:feat/helm-operator-pdb-ha
Open

feat(helm): gate operator/webhook PDBs on HA and expose maxUnavailable#178
giuliocalzo wants to merge 1 commit into
SlinkyProject:mainfrom
giuliocalzo:feat/helm-operator-pdb-ha

Conversation

@giuliocalzo
Copy link
Copy Markdown
Contributor

Summary

  • Skip rendering the operator and webhook PodDisruptionBudget when replicas <= 1 in helm/slurm-operator. A PDB in front of a single-replica Deployment would block voluntary evictions (drains, node upgrades) without providing any availability benefit.
  • Expose maxUnavailable alongside minAvailable in values.yaml for both operator.pdb and webhook.pdb. When neither is explicitly set, templates default to maxUnavailable: 1. When both are set, both are rendered. When only minAvailable is set, only minAvailable is rendered.
  • Drop the unhealthyPodEvictionPolicy knob to keep the values surface small and focused.

Test plan

  • helm unittest helm/slurm-operator -f 'tests/operator_pdb_test.yaml' -f 'tests/webhook_pdb_test.yaml' passes (18 tests), including new cases:
    • no PDB is rendered when replicas: 1
    • both minAvailable and maxUnavailable are rendered when both are set
    • maxUnavailable defaults to 1 when neither is set
    • only maxUnavailable is rendered when minAvailable is unset

Skip rendering the operator and webhook PodDisruptionBudgets when
`replicas <= 1` since a PDB covering a single-replica Deployment blocks
voluntary evictions. Expose `maxUnavailable` alongside `minAvailable` in
values, defaulting `maxUnavailable` to 1 when neither is explicitly set.
Drop the `unhealthyPodEvictionPolicy` knob to keep the surface small.

Helm unit tests updated accordingly, including a case that verifies no
PDB is rendered when running a single replica.
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