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

feat: use new pod identity based tags #6319

Closed
wants to merge 10 commits into from

Conversation

rschalo
Copy link
Contributor

@rschalo rschalo commented Jun 4, 2024

Fixes #N/A

Description
Update to use EKS controller tagging standards

How was this change tested?

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 Jun 4, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 4011716
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/6670871a641d8e0008287379

@coveralls
Copy link

coveralls commented Jun 9, 2024

Pull Request Test Coverage Report for Build 9432373714

Details

  • 11 of 11 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 82.474%

Totals Coverage Status
Change from base Build 9422632438: 0.0%
Covered Lines: 5553
Relevant Lines: 6733

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 9, 2024

Pull Request Test Coverage Report for Build 9432510660

Details

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

Totals Coverage Status
Change from base Build 9422632438: 0.02%
Covered Lines: 5554
Relevant Lines: 6733

💛 - Coveralls

@rschalo rschalo marked this pull request as ready for review June 9, 2024 00:28
@rschalo rschalo requested a review from a team as a code owner June 9, 2024 00:28
@rschalo rschalo requested a review from ellistarn June 9, 2024 00:28
@ellistarn
Copy link
Contributor

Do we consider this breaking or an implementation detail?

@rschalo rschalo changed the title chore: use new pod identity based tags feat: use new pod identity based tags Jun 9, 2024
@rschalo
Copy link
Contributor Author

rschalo commented Jun 9, 2024

Do we consider this breaking or an implementation detail?

I think this is an implementation detail.

I tested this by creating a deployment with one replica with the old annotation, waiting for a node to come online, upgrading karpenter to an image with the new annotation, scaling out the deployment to two replicas after the upgrade, and then waiting for the second node to come up.

Both nodes continued to operate just fine and later when a SportInterruption disruption happened to the node with the karpenter.sh/managed-by annotation, the node rotated out as expected.

All of that to say, I don't think a cx would take a dependency on presence/absence of tags on an instance when those instances could be rotated out at any time or when karpenter manages those instances in the first place.

@rschalo rschalo changed the title feat: use new pod identity based tags chore: use new pod identity based tags Jun 9, 2024
pkg/apis/v1beta1/ec2nodeclass.go Outdated Show resolved Hide resolved
pkg/apis/v1beta1/labels.go Outdated Show resolved Hide resolved
@@ -271,7 +271,11 @@ func (p *DefaultProvider) createLaunchTemplate(ctx context.Context, options *ami
TagSpecifications: []*ec2.TagSpecification{
{
ResourceType: aws.String(ec2.ResourceTypeLaunchTemplate),
Tags: utils.MergeTags(options.Tags, map[string]string{v1beta1.TagManagedLaunchTemplate: options.ClusterName, v1beta1.LabelNodeClass: options.NodeClassName}),
Tags: utils.MergeTags(options.Tags, map[string]string{
v1beta1.EksClusterNameAnnotationKey: options.ClusterName,
Copy link
Contributor

Choose a reason for hiding this comment

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

So this adds the eks cluster annotation tag on now, is this right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, according to @mikestef9, it should be added to all resources Karpenter creates.

test/suites/integration/tags_test.go Outdated Show resolved Hide resolved
test/suites/integration/validation_test.go Outdated Show resolved Hide resolved
rschalo and others added 3 commits June 17, 2024 11:17
Co-authored-by: Nick Tran <10810510+njtran@users.noreply.github.com>
Co-authored-by: Nick Tran <10810510+njtran@users.noreply.github.com>
Co-authored-by: Nick Tran <10810510+njtran@users.noreply.github.com>
@rschalo rschalo changed the title chore: use new pod identity based tags feat: use new pod identity based tags Jun 17, 2024
@coveralls
Copy link

coveralls commented Jun 17, 2024

Pull Request Test Coverage Report for Build 9553195221

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 11 of 11 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 82.467%

Totals Coverage Status
Change from base Build 9422632438: -0.007%
Covered Lines: 5550
Relevant Lines: 6730

💛 - Coveralls

Copy link
Contributor

github-actions bot commented Jul 2, 2024

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.

None yet

4 participants