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: add nodeclass name as label to nodeclaim #6125

Closed
wants to merge 5 commits into from

Conversation

rschalo
Copy link
Contributor

@rschalo rschalo commented May 1, 2024

Fixes #5178

Description
Adds the node class name to node claim.
How was this change tested?
Unit testing.

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 May 1, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 061353d
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/66357e781a665600085e6c3a

@coveralls
Copy link

coveralls commented May 1, 2024

Pull Request Test Coverage Report for Build 8946404523

Details

  • 9 of 9 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 82.261%

Totals Coverage Status
Change from base Build 8945304949: 0.03%
Covered Lines: 5407
Relevant Lines: 6573

💛 - Coveralls

@rschalo rschalo marked this pull request as ready for review May 1, 2024 18:18
@rschalo rschalo requested a review from a team as a code owner May 1, 2024 18:18
@rschalo rschalo requested a review from bwagner5 May 1, 2024 18:18
Copy link
Contributor

@engedaam engedaam left a comment

Choose a reason for hiding this comment

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

Nice work!

@rschalo rschalo force-pushed the label-nodeclaim-with-nodeclass-name branch from 20e2de1 to 406f2f1 Compare May 1, 2024 23:33
@@ -131,6 +131,7 @@ func (p *DefaultProvider) List(ctx context.Context, kc *corev1beta1.KubeletConfi
blockDeviceMappingsHash,
aws.StringValue((*string)(nodeClass.Spec.InstanceStorePolicy)),
aws.StringValue(nodeClass.Spec.AMIFamily),
nodeClass.Name,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit worried with how this aligns with other changes we've made in the past that modifies our controller's memory usage + cache hits. Realistically, if every other detail is the same, and only the nodeClass name is different, we shouldn't need to maintain two cache values, especially since the data we're storing is pretty large.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if adding this requirement into the cloudprovider.InstanceType is the right way to do this in the long run, especially as the nodeClass requirement is applicable for all instance types in the NodePool. I'd like to explore the idea of adding in a karpenter.sh/nodeclass-name label in the upstream code, so that we can better model this in the scheduling code. @jonathan-innis @engedaam thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

aligns with other changes we've made in the past that modifies our controller's memory usage + cache hits

IMO, this is the strongest point. This will definitely increase our memory footprint for storing these instance types in a cache. Given this trade-off, I'd agree that the neutral code is probably the best way to attack this, though I'd recommend that we take a format more akin to <nodeClassRef.group>/<nodeClassRef.kind>: <nodeClassRef.name>

Copy link
Contributor

This PR has been inactive for 14 days. StaleBot will close this stale PR after 14 more days of inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nodeclass / ec2nodeclass not in labels
5 participants