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

Fixed a bug where Karpenter node labels were accidentally removed #796

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

ellistarn
Copy link
Contributor

1. Issue, if available:

2. Description of changes:

3. Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: link to issue
  • No

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

@netlify
Copy link

netlify bot commented Nov 11, 2021

✔️ Deploy Preview for karpenter-docs-prod canceled.

🔨 Explore the source changes: 5f85b5b

🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/618d71d645c4a30007fe6170

@@ -74,10 +75,10 @@ func (s *Scheduler) Solve(ctx context.Context, provisioner *v1alpha5.Provisioner
defer metrics.Measure(schedulingDuration.WithLabelValues(provisioner.Name))()

constraints := provisioner.Spec.Constraints.DeepCopy()
constraints.Labels = functional.UnionStringMaps(constraints.Labels, map[string]string{v1alpha5.ProvisionerNameLabelKey: provisioner.Name})
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to store this back to constraints.Labels can we directly pass them to the With() on line 81?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes -- unfortunately this a little bit convoluted. The labels are propagated to nodes, but the requirements aren't. However, we include the labels in the requirements when doing scheduling calculation so that we can ensure pod requirements are met.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok I see, what you mean we are using the constraints object later.

@ellistarn ellistarn merged commit a392286 into aws:main Nov 11, 2021
@ellistarn ellistarn deleted the bugfix branch November 11, 2021 21:09
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