-
Notifications
You must be signed in to change notification settings - Fork 979
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
fix topologySpread nil label selector bug #1095
Conversation
✔️ Deploy Preview for karpenter-docs-prod canceled. 🔨 Explore the source changes: 37fe0a8 🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/61d77d31f727b8000804238a |
1b7a5d0
to
d99bf75
Compare
MaxSkew: 1, | ||
}} | ||
ExpectProvisioned(ctx, env.Client, selectionController, provisioners, provisioner, | ||
test.UnschedulablePod(test.PodOptions{ObjectMeta: metav1.ObjectMeta{Labels: labels}}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we specify pods with different labels just to be safe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or no labels!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice fix!
Co-authored-by: Ellis Tarn <[email protected]>
1. Issue, if available:
#1021
2. Description of changes:
Fixes #1021 where if the labelSelector was not provided for a topologySpread, then Karpenter would crash. This fix makes a nil labelSelector select everything per labelSelector docs
3. How was this change tested?
Wrote a unit-test to reproduce the issue, after the fix was implemented, the unit test now passes.
4. Does this change impact docs?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.