aws / karpenter-provider-aws

Karpenter is a Kubernetes Node Autoscaler built for flexibility, performance, and simplicity.
https://karpenter.sh
Apache License 2.0
6.15k stars 849 forks source link

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

Closed jonathan-innis closed 1 day ago

jonathan-innis commented 6 days ago

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?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

netlify[bot] commented 6 days ago

Deploy Preview for karpenter-docs-prod canceled.

Name Link
Latest commit 118662acfa5fe5d4f472890b160467264c8d365b
Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/667efe66f7c5030008bf03a4
coveralls commented 6 days ago

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


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

💛 - Coveralls
github-actions[bot] commented 6 days ago

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 commented 6 days ago

Pull Request Test Coverage Report for Build 9690950874

Details


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

💛 - Coveralls
coveralls commented 5 days ago

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


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

💛 - Coveralls
coveralls commented 1 day ago

Pull Request Test Coverage Report for Build 9752722018

Details


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

💛 - Coveralls