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: add label and ability to schedule for az-id #6216

Merged
merged 19 commits into from
May 24, 2024

Conversation

rschalo
Copy link
Contributor

@rschalo rschalo commented May 16, 2024

Fixes #4612 #3878

Description
This change adds the az-id label to nodes and adds the ability to schedule against az-id.
How was this change tested?
Unit tests but I'm pretty certain an additional e2e test is required but want to get some feedback on implementation.

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 16, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit a5f78b1
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/6650e37e7c3c07000862f4e4

go.mod Outdated Show resolved Hide resolved
@rschalo rschalo force-pushed the add-az-id-label branch from 25d099c to 0f3a89d Compare May 22, 2024 00:32
hack/validation/labels.sh Outdated Show resolved Hide resolved
hack/validation/requirements.sh Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented May 22, 2024

Pull Request Test Coverage Report for Build 9228695319

Details

  • 105 of 114 (92.11%) changed or added relevant lines in 9 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.09%) to 82.52%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/fake/ec2api.go 4 8 50.0%
pkg/cloudprovider/cloudprovider.go 24 29 82.76%
Files with Coverage Reduction New Missed Lines %
pkg/fake/ec2api.go 1 86.89%
Totals Coverage Status
Change from base Build 9202817621: 0.09%
Covered Lines: 5547
Relevant Lines: 6722

💛 - Coveralls

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.

/karpenter snapshot

Copy link
Contributor

Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-a7990602a49a8ae92fb1758e36186bb8c359fede.
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-a7990602a49a8ae92fb1758e36186bb8c359fede" --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 add-az-id-label branch from 9c8b6f5 to 30d7ffd Compare May 22, 2024 16:01
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.

/karpenter snapshot

Copy link
Contributor

Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-30d7ffda0cfbbded65dec0fc7ce68b1ad034dd85.
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-30d7ffda0cfbbded65dec0fc7ce68b1ad034dd85" --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 add-az-id-label branch from 30d7ffd to bda6fae Compare May 22, 2024 16:08
@rschalo rschalo force-pushed the add-az-id-label branch from eb8373d to f458a44 Compare May 22, 2024 22:53
@rschalo rschalo marked this pull request as ready for review May 22, 2024 23:04
@rschalo rschalo requested a review from a team as a code owner May 22, 2024 23:04
@rschalo rschalo requested a review from jonathan-innis May 22, 2024 23: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.

/karpenter snapshot

Copy link
Contributor

Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-739834ae1796b3ed662e8dde07506b00b75c5e70.
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-739834ae1796b3ed662e8dde07506b00b75c5e70" --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 add-az-id-label branch from 911c6a5 to 7d10fc8 Compare May 23, 2024 00:30
pkg/apis/v1beta1/ec2nodeclass_status.go Outdated Show resolved Hide resolved
pkg/apis/v1beta1/labels.go Show resolved Hide resolved
pkg/cloudprovider/cloudprovider.go Outdated Show resolved Hide resolved
pkg/cloudprovider/suite_test.go Outdated Show resolved Hide resolved
pkg/providers/instance/instance.go Show resolved Hide resolved
pkg/providers/instancetype/types.go Show resolved Hide resolved
pkg/providers/instancetype/types.go Outdated Show resolved Hide resolved
test/pkg/environment/aws/expectations.go Outdated Show resolved Hide resolved
pkg/providers/subnet/subnet.go Outdated Show resolved Hide resolved
test/suites/integration/scheduling_test.go Show resolved Hide resolved
@jmdeal jmdeal self-assigned this May 24, 2024
@jmdeal jmdeal force-pushed the add-az-id-label branch from 334defe to 5cbf5ad Compare May 24, 2024 08:52
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.

/karpenter snapshot

Copy link
Contributor

Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-5cbf5ad15a5905df275739b2738272883e5677bf.
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-5cbf5ad15a5905df275739b2738272883e5677bf" --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 add-az-id-label branch from 5cbf5ad to 6ce84f4 Compare May 24, 2024 09:43
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.

/karpenter snapshot

Copy link
Contributor

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

pkg/cloudprovider/cloudprovider.go Show resolved Hide resolved
pkg/cloudprovider/cloudprovider.go Show resolved Hide resolved
pkg/providers/instance/instance.go Show resolved Hide resolved
pkg/providers/subnet/subnet.go Outdated Show resolved Hide resolved
test/suites/integration/scheduling_test.go Outdated Show resolved Hide resolved
@jmdeal jmdeal force-pushed the add-az-id-label branch 2 times, most recently from 579f71b to 5bc5be2 Compare May 24, 2024 18:56
@jmdeal jmdeal force-pushed the add-az-id-label branch from 5bc5be2 to a5f78b1 Compare May 24, 2024 18:59
Copy link
Contributor

@njtran njtran left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@jmdeal jmdeal merged commit 8fa7793 into aws:main May 24, 2024
18 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.

Add karpenter.k8s.aws/zoneid with Availability Zone IDs
5 participants