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

fix: Fix failure launching windows pod when instance type isn't in vpc resource controller config #6415

Merged

Conversation

jonathan-innis
Copy link
Contributor

Fixes #N/A

Description

This change fixes a bug in the returned instance types from the Windows AMI to ensure that we don't allow instance types that don't have PrivateIPv4Addresses reported on the VPC limits.go file to be launched with the Windows AMI. Even though we can know the private IP address count from the EC2 DescribeInstances API, the vpc.amazonaws.com/PrivateIPv4Address resource won't be reported unless the VPC resource controller is aware of it.

How was this change tested?

make presubmit
/karpenter snapshot

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 June 27, 2024 04:53
Copy link

netlify bot commented Jun 27, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 118662a
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/667efe66f7c5030008bf03a4

@coveralls
Copy link

coveralls commented Jun 27, 2024

Pull Request Test Coverage Report for Build 9690879183

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

  • 15 of 15 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 79.208%

Totals Coverage Status
Change from base Build 9690099756: 0.1%
Covered Lines: 5802
Relevant Lines: 7325

💛 - Coveralls

@jonathan-innis jonathan-innis force-pushed the fix-windows-vpc-resource-controller branch from 117d803 to 33c396e Compare June 27, 2024 05:02
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

@jonathan-innis jonathan-innis enabled auto-merge (squash) June 27, 2024 05:03
Copy link
Contributor

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

Pull Request Test Coverage Report for Build 9690950874

Details

  • 15 of 15 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 79.208%

Totals Coverage Status
Change from base Build 9690889704: 0.1%
Covered Lines: 5802
Relevant Lines: 7325

💛 - Coveralls

@jonathan-innis jonathan-innis force-pushed the fix-windows-vpc-resource-controller branch from 33c396e to 281c614 Compare June 27, 2024 22:49
@coveralls
Copy link

coveralls commented Jun 27, 2024

Pull Request Test Coverage Report for Build 9704639239

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

  • 15 of 15 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 79.254%

Totals Coverage Status
Change from base Build 9704271327: 0.1%
Covered Lines: 5799
Relevant Lines: 7317

💛 - Coveralls

njtran
njtran previously approved these changes Jun 28, 2024
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. One nit

pkg/providers/instancetype/types.go Outdated Show resolved Hide resolved
@jonathan-innis jonathan-innis force-pushed the fix-windows-vpc-resource-controller branch from 281c614 to 118662a Compare June 28, 2024 18:18
auto-merge was automatically disabled June 28, 2024 18:20

Pull Request is not mergeable

@jonathan-innis jonathan-innis enabled auto-merge (squash) June 28, 2024 20:11
auto-merge was automatically disabled July 2, 2024 00:05

Pull request was closed

@jonathan-innis jonathan-innis reopened this Jul 2, 2024
@jonathan-innis jonathan-innis enabled auto-merge (squash) July 2, 2024 00:05
@jonathan-innis jonathan-innis merged commit a057ec7 into aws:main Jul 2, 2024
18 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9752722018

Details

  • 17 of 17 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on fix-windows-vpc-resource-controller at 78.434%

Totals Coverage Status
Change from base Build 9752671141: 78.4%
Covered Lines: 5801
Relevant Lines: 7396

💛 - Coveralls

LPetro pushed a commit to LPetro/karpenter-provider-aws that referenced this pull request Jul 4, 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