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

chore: Added new policy to PodDisruptionBudget #7037

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

peterabarr
Copy link

@peterabarr peterabarr commented Sep 18, 2024

Fixes #7025

Description

Added the unhealthyPodEvictionPolicy to the Karpenter PDB.

How was this change tested?

I generated a helm template file locally and tried to set unhealthyPodEvictionPolicy in the chart values to AlwaysAllow:
Screenshot 2024-09-18 at 13 07 13

I also tried not setting anything in the chart values and expected that there would be no mention of unhealthyPodEvictionPolicy in the spec:
Screenshot 2024-09-18 at 13 09 35

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

netlify bot commented Sep 18, 2024

Deploy Preview for karpenter-docs-prod ready!

Name Link
🔨 Latest commit 7df72fe
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/66fa6d395f449c0008cbfc96
😎 Deploy Preview https://deploy-preview-7037--karpenter-docs-prod.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@njtran njtran left a comment

Choose a reason for hiding this comment

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

So this is only available in beta starting in 1.27. What happens with users who try to define this on 1.25/1.26? Is there some way we can just not include this based on the kubernetes version?

@peterabarr
Copy link
Author

@njtran Good point, I've added a function that ensures it only adds the field if the Kubernetes version is >= 1.27.

@peterabarr peterabarr force-pushed the feat-pdb-policy branch 4 times, most recently from 9458443 to 2db9c04 Compare September 26, 2024 12:49
@@ -11,6 +11,11 @@ metadata:
{{- end }}
spec:
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- if (semverCompare ">= 1.27-0" .Capabilities.KubeVersion.Version) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use .Capabilities.KubeVersion.Minor? Don't think we care too much about major or patch, right?

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.

Allow for user PDB configuration so new fields can be added
2 participants