Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable PodDisruptionBudget for replicaCount: 1 #896

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

ubergesundheit
Copy link
Contributor

@ubergesundheit ubergesundheit commented Oct 11, 2023

What this PR does / why we need it:

Check if replicaCount is above 1 before including the PodDisruptionBudget when enabled.

Installations leaving replicaCount: 1 as default and specifying podDisruptionBudget.enabled: true will prevent kong Deployments from progressing during upgrades.

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

@ubergesundheit ubergesundheit requested a review from a team as a code owner October 11, 2023 08:19
Copy link
Contributor

@rainest rainest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this a template fail condition instead of silently deleting the resource?

AFAICT this should only happen on accidental misconfiguration (there's no way to reconcile a single-replica release with a disruption budget), so this should probably immediately fail in the client, to alert you to choose either multiple replicas or no PDB.

@ubergesundheit
Copy link
Contributor Author

Sure :) I've changed the template to fail on both replicaCount: 1 and autoscaling.minReplicas: 1

Check if replicaCount is above 1 before including the PodDisruptionBudget when enabled.

Installations leaving replicaCount: 1 as default and specifying podDisruptionBudget.enabled: true will prevent kong Deployments from progressing during upgrades.

Signed-off-by: Gerald Pape <gerald@giantswarm.io>
… autoscaling minReplicas

Signed-off-by: Gerald Pape <gerald@giantswarm.io>
Signed-off-by: Gerald Pape <gerald@giantswarm.io>
@rainest rainest merged commit 87ac648 into Kong:main Oct 13, 2023
27 checks passed
@ubergesundheit ubergesundheit deleted the disable-pdb-on-one-replica branch October 13, 2023 07:27
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.

None yet

2 participants