Skip to content

Pass volume limit from DescribeInstanceTypes via metadata-labeler#2915

Open
ConnorJC3 wants to merge 1 commit intokubernetes-sigs:masterfrom
ConnorJC3:dit-metadata-labeler
Open

Pass volume limit from DescribeInstanceTypes via metadata-labeler#2915
ConnorJC3 wants to merge 1 commit intokubernetes-sigs:masterfrom
ConnorJC3:dit-metadata-labeler

Conversation

@ConnorJC3
Copy link
Copy Markdown
Contributor

@ConnorJC3 ConnorJC3 commented Apr 8, 2026

What type of PR is this?

/kind feature

What is this PR about? / Why do we need it?

Instead of using our hardcoded table, in the metadata-labeler path we now call DIT at runtime and pass the result via node label. This enables users to immediately get updates from EC2 (e.g. new instance releases) without having to wait on a driver release.

How was this change tested?

Manually (Create a cluster with metadata-labeler enabled, observe labels are added) and with new unit tests and modification to the E2E test for metadata-labeler.

Does this PR introduce a user-facing change?

Pass volume limits from DescribeInstanceTypes when using metadata-labeler

Signed-off-by: Connor Catlett <conncatl@amazon.com>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Apr 8, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign torredil for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 8, 2026

// getMetadata calls the EC2 API to get the number of ENIs and non-CSI managed volumes attached to each node.
func getMetadata(ctx context.Context, cloud cloud.Cloud, nodes *v1.NodeList, pvInformer cache.SharedIndexInformer) (map[string]enisVolumes, error) {
func getMetadata(ctx context.Context, c cloud.Cloud, nodes *v1.NodeList, pvInformer cache.SharedIndexInformer) (map[string]enisVolumes, error) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We needed to rename because the cloud variable was shadowing the cloud package, thus preventing access to cloud.InstanceTypeInfo

@ConnorJC3
Copy link
Copy Markdown
Contributor Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Code Coverage Diff

File Old Coverage New Coverage Delta
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud/cloud.go 85.5% 84.0% -1.5
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud/metadata/k8s.go 72.6% 74.4% 1.8
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud/metadata/labels.go 59.9% 64.9% 5.0
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud/metadata/metadata.go 82.3% 80.3% -2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants