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: Fix spurious discovered subnets lines in logging #6481

Merged

Conversation

jonathan-innis
Copy link
Contributor

Fixes #N/A

Description

This fixes an issue where Karpenter was spurious logging "discovered subnets" any time there was a change in the subnet's IP availability. This change ensures that we will only log subnets when there is a change in the ids that are being selected on.

{"level":"DEBUG","time":"2024-07-10T07:08:41.539Z","logger":"controller","message":"discovered subnets","commit":"ff0dc7d","controller":"nodeclass.status","controllerGroup":"karpenter.k8s.aws","controllerKind":"EC2NodeClass","EC2NodeClass":{"name":"default"},"namespace":"","name":"default","reconcileID":"54da3ce7-88e7-42e3-ad25-6c0d9fef954f","subnets":[{"id":"subnet-0c89532267e680e6f","zone":"us-west-2a","zoneID":"usw2-az1"},{"id":"subnet-09d3d3e0bd7f68ee9","zone":"us-west-2b","zoneID":"usw2-az2"},{"id":"subnet-01095f4c202083b01","zone":"us-west-2a","zoneID":"usw2-az1"},{"id":"subnet-01a75589aa6237be1","zone":"us-west-2b","zoneID":"usw2-az2"},{"id":"subnet-060f9fb17941d125c","zone":"us-west-2c","zoneID":"usw2-az3"},{"id":"subnet-0e60f26cf52c5a6df","zone":"us-west-2c","zoneID":"usw2-az3"}]}
{"level":"DEBUG","time":"2024-07-10T07:12:45.409Z","logger":"controller","message":"discovered subnets","commit":"ff0dc7d","controller":"nodeclass.status","controllerGroup":"karpenter.k8s.aws","controllerKind":"EC2NodeClass","EC2NodeClass":{"name":"default"},"namespace":"","name":"default","reconcileID":"6cc09a98-b64f-42a7-b8b2-3f6a37ea1448","subnets":[{"id":"subnet-01095f4c202083b01","zone":"us-west-2a","zoneID":"usw2-az1"},{"id":"subnet-01a75589aa6237be1","zone":"us-west-2b","zoneID":"usw2-az2"},{"id":"subnet-060f9fb17941d125c","zone":"us-west-2c","zoneID":"usw2-az3"},{"id":"subnet-0e60f26cf52c5a6df","zone":"us-west-2c","zoneID":"usw2-az3"},{"id":"subnet-0c89532267e680e6f","zone":"us-west-2a","zoneID":"usw2-az1"},{"id":"subnet-09d3d3e0bd7f68ee9","zone":"us-west-2b","zoneID":"usw2-az2"}]}

How was this change tested?

make presubmit

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.

@jonathan-innis jonathan-innis requested a review from a team as a code owner July 10, 2024 07:20
Copy link

netlify bot commented Jul 10, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 2a2607b
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/668e3630d6323700082fadf2

@jonathan-innis jonathan-innis enabled auto-merge (squash) July 10, 2024 07:20
@jonathan-innis jonathan-innis changed the title chore: Fix spurious discovered lines in logging chore: Fix spurious discovered subnets lines in logging Jul 10, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9869887590

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 79.025%

Files with Coverage Reduction New Missed Lines %
pkg/providers/amifamily/ami.go 1 93.33%
Totals Coverage Status
Change from base Build 9865052861: -0.01%
Covered Lines: 5968
Relevant Lines: 7552

💛 - Coveralls

@jonathan-innis jonathan-innis merged commit b8c2c88 into aws:main Jul 10, 2024
17 checks passed
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.

3 participants