Skip to content

Fix multi-tag VPC lookup #4638

Merged
zac-nixon merged 1 commit intokubernetes-sigs:mainfrom
shraddhabang:vpcmultitagfix
Mar 27, 2026
Merged

Fix multi-tag VPC lookup #4638
zac-nixon merged 1 commit intokubernetes-sigs:mainfrom
shraddhabang:vpcmultitagfix

Conversation

@shraddhabang
Copy link
Copy Markdown
Collaborator

@shraddhabang shraddhabang commented Mar 23, 2026

Issue

#4633

The --aws-vpc-tags flag claims to support multiple tags for VPC lookup, but the implementation only ever used a single tag — the one selected by --aws-vpc-tag-key (defaulting to Name). All other tags were silently ignored.

For example, deploying with --aws-vpc-tags=foo=bar,baz=buzz would only filter on the Name tag (which doesn't exist in this input), causing the controller to fail at startup

Fix

  • Fixed --aws-vpc-tags to always use all specified tags as AND filters in the DescribeVpcs call, matching the documented behavior.
  • Deprecated --aws-vpc-tag-key. The flag is still accepted but ignored, and logs a warning at startup if set to a non-default value. It will be removed in a future release.

Breaking Changes

If you were passing multiple tags via --aws-vpc-tags but your VPC only matched a subset of them (relying on the buggy single-tag behavior), the controller will now fail to find the VPC since all tags are used as filters. Update your VPC tags or your --aws-vpc-tags value to ensure they match.

Release Notes updates

Bug Fixes

  • Fixed --aws-vpc-tags to use all specified tags as AND filters for VPC lookup. Previously, only a single tag (selected by --aws-vpc-tag-key, defaulting to Name) was used, and all other tags were silently ignored.

Deprecations

  • --aws-vpc-tag-key is now deprecated and ignored. All tags from --aws-vpc-tags are always used for VPC lookup. This flag will be removed in a future release.

Breaking Changes

  • If you were passing multiple tags via --aws-vpc-tags but your VPC only matched a subset of them, the controller will now fail to find the VPC since all tags are used as filters. Update your VPC tags or your --aws-vpc-tags value to ensure they match.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 23, 2026
Copy link
Copy Markdown
Collaborator

@zac-nixon zac-nixon left a comment

Choose a reason for hiding this comment

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

/lgtm
/approved

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 27, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shraddhabang, wweiwei-li, zac-nixon

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [shraddhabang,wweiwei-li,zac-nixon]

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

@zac-nixon zac-nixon merged commit de7dac9 into kubernetes-sigs:main Mar 27, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants