Skip to content

fix(kong): select PodDisruptionBudget pods with the Deployment selector labels - #1593

Open
RaphaelFakhri wants to merge 1 commit into
Kong:mainfrom
RaphaelFakhri:fix/pdb-selector-labels
Open

RaphaelFakhri wants to merge 1 commit into
Kong:mainfrom
RaphaelFakhri:fix/pdb-selector-labels

Conversation

@RaphaelFakhri

@RaphaelFakhri RaphaelFakhri commented Oct 24, 2026 •

Copy link
Copy Markdown

What this PR does / why we need it:

The PodDisruptionBudget in the kong and kong-ai-gateway charts built its selector from kong.metaLabels, which includes helm.sh/chart and app.kubernetes.io/version. An upgrade that changes either label updates the PDB selector immediately, while the running pods keep the old values. Until the rollout replaces them, the PDB covers none of those pods, so a node drain can evict all of them at once.

This PR switches the PDB selector to kong.selectorLabels, the same labels the Deployment uses for its own selector (app.kubernetes.io/name, app.kubernetes.io/component, app.kubernetes.io/instance). The PDB metadata labels are unchanged.

  • charts/kong/templates/pdb.yaml, charts/kong-ai-gateway/templates/pdb.yaml: use kong.selectorLabels in spec.selector.matchLabels.
  • charts/kong/ci/__snapshots__/pdb-default.snap, pdb-always-allow.snap: rebuilt with helm chartsnap -u.
  • CHANGELOG entries for both charts.

Which issue this PR fixes

Special notes for your reviewer:

policy/v1 PodDisruptionBudget selectors are mutable, so helm upgrade updates existing PDBs in place.

make test.golden equivalent (helm chartsnap -c ./charts/kong -f ./charts/kong/ci/ with the Makefile's --api-versions) passes: 37 snapshots matched. helm lint passes for both charts.

Checklist

  • PR is based off the current tip of the main branch.
  • Changes are documented under the "Unreleased" header in CHANGELOG.md
  • Commits follow the Kong commit message guidelines

@RaphaelFakhri
RaphaelFakhri requested a review from a team as a code owner October 24, 2026 19:41

This branch has not been deployed

No deployments
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.

kong: PodDisruptionBudget selector includes chart and version labels, so it stops matching running pods after an upgrade

1 participant