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 an Subnet Controller to Asynchronously Hydrate Subnet Data #6057

Merged
merged 3 commits into from
May 1, 2024

Conversation

engedaam
Copy link
Contributor

@engedaam engedaam commented Apr 18, 2024

Fixes #N/A

Description

  • Asynchronously hydrate with subnet data. The controller will attempt to refresh the data every 5 minutes, and implement a exponential backoff for delay: 1ms and max: 1000s

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 Apr 18, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 986ff30
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/66327c0a4de6530008e5b96e

@engedaam engedaam force-pushed the subnet-controller branch 3 times, most recently from bfa4173 to 7d01bc1 Compare April 18, 2024 15:16
@coveralls
Copy link

coveralls commented Apr 18, 2024

Pull Request Test Coverage Report for Build 8912693456

Details

  • 82 of 87 (94.25%) changed or added relevant lines in 7 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.08%) to 82.088%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/operator/operator.go 0 1 0.0%
pkg/providers/instancetype/instancetype.go 9 11 81.82%
pkg/providers/subnet/subnet.go 49 51 96.08%
Files with Coverage Reduction New Missed Lines %
pkg/providers/subnet/subnet.go 2 87.79%
pkg/cloudprovider/drift.go 4 91.4%
Totals Coverage Status
Change from base Build 8886791767: 0.08%
Covered Lines: 5403
Relevant Lines: 6582

💛 - Coveralls

@engedaam engedaam force-pushed the subnet-controller branch 6 times, most recently from 6dd285e to 62c0dcd Compare April 19, 2024 02:50
@engedaam engedaam marked this pull request as ready for review April 19, 2024 02:54
@engedaam engedaam requested a review from a team as a code owner April 19, 2024 02:54
@engedaam engedaam requested a review from jonathan-innis April 19, 2024 02:54
Copy link
Contributor Author

@engedaam engedaam 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-62c0dcd03a960b3831d861196131f759a472c989.
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-62c0dcd03a960b3831d861196131f759a472c989" --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

@engedaam engedaam force-pushed the subnet-controller branch 2 times, most recently from 4ba17dd to c6e2cc4 Compare April 19, 2024 15:38
Copy link
Contributor Author

@engedaam engedaam 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-c6e2cc43dd494721e93969856fe8c69b612cd746.
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-c6e2cc43dd494721e93969856fe8c69b612cd746" --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/providers/subnet/subnet.go Outdated Show resolved Hide resolved
pkg/controllers/providers/subnet/controller.go Outdated Show resolved Hide resolved
pkg/providers/subnet/subnet.go Outdated Show resolved Hide resolved
@engedaam engedaam force-pushed the subnet-controller branch 9 times, most recently from 1c3acff to c1b5582 Compare April 25, 2024 22:25
@engedaam engedaam force-pushed the subnet-controller branch 4 times, most recently from 88eb73b to 2b36f38 Compare April 30, 2024 01:38
pkg/cache/cache.go Outdated Show resolved Hide resolved
pkg/cache/cache.go Outdated Show resolved Hide resolved
pkg/test/environment.go Outdated Show resolved Hide resolved
pkg/providers/subnet/subnet.go Outdated Show resolved Hide resolved
pkg/providers/subnet/subnet.go Show resolved Hide resolved
pkg/providers/subnet/subnet.go Outdated Show resolved Hide resolved
pkg/providers/subnet/subnet.go Outdated Show resolved Hide resolved
pkg/providers/subnet/subnet.go Outdated Show resolved Hide resolved
@engedaam engedaam force-pushed the subnet-controller branch 8 times, most recently from 87ea0cb to bb4d551 Compare April 30, 2024 03:51
pkg/cache/cache.go Outdated Show resolved Hide resolved
pkg/cache/cache.go Outdated Show resolved Hide resolved
pkg/cloudprovider/suite_test.go Outdated Show resolved Hide resolved
pkg/test/environment.go Show resolved Hide resolved
pkg/providers/subnet/suite_test.go Outdated Show resolved Hide resolved
pkg/providers/subnet/subnet.go Outdated Show resolved Hide resolved
pkg/providers/subnet/subnet.go Outdated Show resolved Hide resolved
pkg/providers/launchtemplate/suite_test.go Outdated Show resolved Hide resolved
pkg/providers/subnet/subnet.go Outdated Show resolved Hide resolved
pkg/cloudprovider/suite_test.go Show resolved Hide resolved
@engedaam engedaam force-pushed the subnet-controller branch 3 times, most recently from 3056023 to d156cc3 Compare April 30, 2024 18:05
jonathan-innis
jonathan-innis previously approved these changes May 1, 2024
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.

Nice work! Just some optional comments.

pkg/cloudprovider/suite_test.go Show resolved Hide resolved
pkg/cloudprovider/suite_test.go Show resolved Hide resolved
pkg/cloudprovider/suite_test.go Show resolved Hide resolved
pkg/providers/subnet/subnet.go Outdated Show resolved Hide resolved
@engedaam engedaam force-pushed the subnet-controller branch from dc30761 to 986ff30 Compare May 1, 2024 17:29
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 🚀

Copy link
Contributor Author

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

github-actions bot commented May 1, 2024

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

@engedaam engedaam merged commit 9836cbe into aws:main May 1, 2024
26 of 31 checks passed
@engedaam engedaam deleted the subnet-controller branch May 1, 2024 20:07
rschalo pushed a commit to rschalo/karpenter-provider-aws that referenced this pull request May 1, 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