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: only operate on managed resources #7423

Merged
merged 5 commits into from
Nov 24, 2024

Conversation

jmdeal
Copy link
Contributor

@jmdeal jmdeal commented Nov 21, 2024

Fixes #N/A

Description
Takes in the changes from kubernetes-sigs/karpenter#1818, ensuring a given Karpenter binary only operates on objects associated with it's NodeClass. For example, this would allow the use of the kwok and the AWS provider in the same cluster.

How was this change tested?
make test

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.

@jmdeal jmdeal requested a review from a team as a code owner November 21, 2024 23:09
@jmdeal jmdeal requested a review from rschalo November 21, 2024 23:09
Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 1d3b135
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/67436fccb34d080008aeeced

@jmdeal jmdeal force-pushed the feat/managed-resource-checks branch from dc8b04b to 8d5e077 Compare November 21, 2024 23:25
@coveralls
Copy link

coveralls commented Nov 21, 2024

Pull Request Test Coverage Report for Build 11998551449

Details

  • 43 of 54 (79.63%) changed or added relevant lines in 8 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 82.445%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controllers/nodeclaim/garbagecollection/controller.go 14 15 93.33%
pkg/controllers/controllers.go 0 2 0.0%
pkg/controllers/providers/instancetype/capacity/controller.go 3 5 60.0%
pkg/cloudprovider/cloudprovider.go 7 13 53.85%
Files with Coverage Reduction New Missed Lines %
pkg/controllers/interruption/controller.go 1 71.43%
Totals Coverage Status
Change from base Build 11981164534: -0.02%
Covered Lines: 5692
Relevant Lines: 6904

💛 - Coveralls

Copy link
Contributor Author

@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.

/karpenter snapshot

Copy link
Contributor

Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-8d5e07796b8122febbb504f24f8c55c7d01f18b9.
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-8d5e07796b8122febbb504f24f8c55c7d01f18b9" --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

@jmdeal jmdeal force-pushed the feat/managed-resource-checks branch from 8d5e077 to b47e190 Compare November 22, 2024 05:35
@jmdeal jmdeal force-pushed the feat/managed-resource-checks branch from b47e190 to 21afb86 Compare November 22, 2024 05:42
Copy link
Contributor Author

@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.

/karpenter snapshot

Copy link
Contributor

Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-21afb864cd00e42c3ba11bf50e4b7147785be673.
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-21afb864cd00e42c3ba11bf50e4b7147785be673" --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

@jmdeal jmdeal force-pushed the feat/managed-resource-checks branch from 21afb86 to fce7b76 Compare November 23, 2024 18:43
Copy link
Contributor Author

@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.

/karpenter snapshot

Copy link
Contributor

Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-0dcea04d43df841d359e6c57218c9d3b155fa6cc.
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-0dcea04d43df841d359e6c57218c9d3b155fa6cc" --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

@jmdeal jmdeal force-pushed the feat/managed-resource-checks branch 6 times, most recently from fdf5fc9 to 7f32fb4 Compare November 24, 2024 18:21
@jmdeal jmdeal force-pushed the feat/managed-resource-checks branch from 7f32fb4 to 1d3b135 Compare November 24, 2024 18:26
Copy link
Contributor

@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.

LGTM 🚀

@jmdeal jmdeal merged commit 7304f30 into aws:main Nov 24, 2024
20 checks passed
edibble21 pushed a commit to edibble21/karpenter-provider-aws that referenced this pull request Dec 2, 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.

4 participants