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: Drop karpenter.sh/managed-by annotation #6379

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

rschalo
Copy link
Contributor

@rschalo rschalo commented Jun 18, 2024

Fixes #N/A
Addresses concerns in #6319 and points to correct branch.

Description

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.

@coveralls
Copy link

coveralls commented Jun 18, 2024

Pull Request Test Coverage Report for Build 9569656382

Details

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

Files with Coverage Reduction New Missed Lines %
pkg/providers/amifamily/ami.go 1 90.56%
Totals Coverage Status
Change from base Build 9568229212: 0.02%
Covered Lines: 5531
Relevant Lines: 6705

💛 - Coveralls

@rschalo rschalo marked this pull request as ready for review June 18, 2024 17:52
@rschalo rschalo requested a review from a team as a code owner June 18, 2024 17:52
@rschalo rschalo requested a review from jmdeal June 18, 2024 17:52
@coveralls
Copy link

coveralls commented Jun 20, 2024

Pull Request Test Coverage Report for Build 9605074231

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.437%

Totals Coverage Status
Change from base Build 9588967583: 0.0%
Covered Lines: 5534
Relevant Lines: 6713

💛 - Coveralls

@jonathan-innis jonathan-innis changed the base branch from staging/v1 to main June 27, 2024 03:16
Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 9be1f46
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/668c5fdb5ac72e0009ce6179

@coveralls
Copy link

coveralls commented Jul 8, 2024

Pull Request Test Coverage Report for Build 9847447893

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

  • 12 of 12 (100.0%) changed or added relevant lines in 4 files are covered.
  • 52 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.01%) to 78.829%

Files with Coverage Reduction New Missed Lines %
pkg/providers/amifamily/ami.go 1 90.56%
pkg/fake/cloudprovider.go 8 0.0%
pkg/cloudprovider/cloudprovider.go 43 73.88%
Totals Coverage Status
Change from base Build 9844518117: -0.01%
Covered Lines: 5950
Relevant Lines: 7548

💛 - Coveralls

Makefile Outdated
@@ -57,7 +57,8 @@ test: ## Run tests
-cover -coverprofile=coverage.out -outputdir=. -coverpkg=./... \
--ginkgo.focus="${FOCUS}" \
--ginkgo.randomize-all \
--ginkgo.vv
--ginkgo.v \
--ginkgo.fail-fast \
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 we want this. We should also end the last line without a \

managedRetrieved := lo.Filter(retrieved, func(nc *v1beta1.NodeClaim, _ int) bool {
return nc.Annotations[v1beta1.ManagedByAnnotationKey] != "" && nc.DeletionTimestamp.IsZero()
managedRetrieved := lo.Filter(retrieved, func(nc *corev1beta1.NodeClaim, _ int) bool {
return nc.Annotations[v1beta1.LabelNodeClass] != "" && nc.DeletionTimestamp.IsZero()
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 the nodepool label? I think it should be the same, but I want to make sure we follow the convention in the upstream provider.

Suggested change
return nc.Annotations[v1beta1.LabelNodeClass] != "" && nc.DeletionTimestamp.IsZero()
return nc.Annotations[v1beta1.LabelNodePool] != "" && nc.DeletionTimestamp.IsZero()

@@ -137,7 +137,8 @@ var _ = Describe("GarbageCollection", func() {
awsEnv.EC2API.Instances.Store(aws.StringValue(instance.InstanceId), instance)

ExpectSingletonReconciled(ctx, garbageCollectionController)
_, err := cloudProvider.Get(ctx, providerID)
nc, err := cloudProvider.Get(ctx, providerID)
fmt.Println(nc)
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to remove?

@@ -288,9 +289,9 @@ var _ = Describe("GarbageCollection", func() {
Expect(err).NotTo(HaveOccurred())
})
It("should not delete an instance if it was not launched by a NodeClaim", func() {
// Remove the "karpenter.sh/managed-by" tag (this isn't launched by a machine)
// Remove the nodepool tag (this isn't launched by a machine)
Copy link
Contributor

Choose a reason for hiding this comment

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

You say nodepool, but the label below is nodeclass. Mistake?

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.

None yet

4 participants