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

BREAKING: Drop logger name injection and add consistent formatting for K8s objects #6255

Merged
merged 2 commits into from
May 22, 2024

Conversation

jonathan-innis
Copy link
Contributor

@jonathan-innis jonathan-innis commented May 22, 2024

Fixes #N/A

Description

Drop logger name injection at the top of controllers and add consistent formatting for K8s objects

Before PR

{"level":"DEBUG","time":"2024-05-22T18:56:55.832Z","logger":"controller.nodeclass.status","message":"discovered amis","commit":"d39fdb5","controller":"nodeclass.status","controllerGroup":"karpenter.k8s.aws","controllerKind":"EC2NodeClass","EC2NodeClass":{"name":"default"},"namespace":"","name":"default","reconcileID":"5bc00b9a-2d9a-4622-84ee-55c67f0aad1a","ec2nodeclass":"default","ids":["ami-06882dd1807dd93be","ami-086598116d98d2953","ami-0ef5558292b11416e"]}

After PR

{"level":"DEBUG","time":"2024-05-22T18:48:29.569Z","logger":"controller","message":"discovered amis","commit":"1169b7a","controller":"nodeclass.status","controllerGroup":"karpenter.k8s.aws","controllerKind":"EC2NodeClass","EC2NodeClass":{"name":"default"},"namespace":"","name":"default","reconcileID":"961bcab4-a293-4cca-b48c-81ba7c5397ed","ids":["ami-06882dd1807dd93be","ami-086598116d98d2953","ami-0ef5558292b11416e"]}

Looking at the difference between these two log lines, you can see that we no longer have duplicate keys for nodeclaim and we changed our naming mechanism for the logger name.

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.

Copy link

netlify bot commented May 22, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 35f931a
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/664e4d31f9e428000898ee23

Copy link
Contributor Author

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

/karpenter snapshot

Copy link
Contributor

Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-eb558a04744225b28ecf2110e90d3800b2d8d434.
To install you must login to the ECR repo with an AWS account:

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 021119463062.dkr.ecr.us-east-1.amazonaws.com

helm upgrade --install karpenter oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter --version "0-eb558a04744225b28ecf2110e90d3800b2d8d434" --namespace "kube-system" --create-namespace \
  --set "settings.clusterName=${CLUSTER_NAME}" \
  --set "settings.interruptionQueue=${CLUSTER_NAME}" \
  --set controller.resources.requests.cpu=1 \
  --set controller.resources.requests.memory=1Gi \
  --set controller.resources.limits.cpu=1 \
  --set controller.resources.limits.memory=1Gi \
  --wait

@coveralls
Copy link

coveralls commented May 22, 2024

Pull Request Test Coverage Report for Build 9197543833

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 82.415%

Totals Coverage Status
Change from base Build 9179589869: -0.01%
Covered Lines: 5488
Relevant Lines: 6659

💛 - Coveralls

@jonathan-innis jonathan-innis changed the title chore: Drop logger name injection and add consistent formatting for K8s objects BREAKING: Drop logger name injection and add consistent formatting for K8s objects May 22, 2024
@jonathan-innis jonathan-innis marked this pull request as ready for review May 22, 2024 19:53
@jonathan-innis jonathan-innis requested a review from a team as a code owner May 22, 2024 19:53
@jonathan-innis jonathan-innis enabled auto-merge (squash) May 22, 2024 20:04
Copy link
Contributor

@jmdeal jmdeal left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@jonathan-innis jonathan-innis merged commit 9a71b6c into aws:main May 22, 2024
16 checks passed
rschalo pushed a commit to rschalo/karpenter-provider-aws that referenced this pull request May 22, 2024
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