Skip to content

Conversation

SinghVikram97
Copy link
Contributor

@SinghVikram97 SinghVikram97 commented Oct 6, 2025

What type of PR is this?
Feature

What does this PR do / Why do we need it:
This PR adds support for adding additional tags on VPC Lattice resources created via the controller.

If an issue # is not available please add repro steps and logs from aws-gateway-controller showing the issue:
#611

Testing done on this change:
Added e2e-tests and unit tests.

Will this PR introduce any new dependencies?:
No

Will this break upgrades or downgrades. Has updating a running cluster been tested?:
No breaking changes

Does this PR introduce any user-facing change?:
Yes, this PR adds support for additional tags.

Added support for additional tags on VPC Lattice resources via the application-networking.k8s.aws/tags annotation. Users can now add additional tags to resources using comma-separated key=value pairs (e.g., "Environment=Prod,Team=Platform").

Do all end-to-end tests successfully pass when running make e2e-test?:
Yes, all existing and new tests pass.

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

@SinghVikram97 SinghVikram97 requested a review from rlymbur October 6, 2025 17:17
}

if len(tagsToAdd) > 0 {
_, err := t.TagResourcesWithContext(ctx, &taggingapi.TagResourcesInput{
Copy link
Contributor

Choose a reason for hiding this comment

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

Do the recent exponential throttling improvements apply here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Incase of an error, it would retry with an exponential backoff.

}

currentTags := k8s.GetNonAWSManagedTags(existingTags[resourceArn])
filteredNewTags := k8s.GetNonAWSManagedTags(newTags)
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be useful to do some pre-validation if we can based on general AWS tagging guidelines

Copy link
Contributor Author

@SinghVikram97 SinghVikram97 Oct 6, 2025

Choose a reason for hiding this comment

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

Added validation for:

  1. Key length (128 characters)
  2. Key can't start with prefix aws:
  3. Value length (256 characters)
  4. Maximum number of tags (50)
  5. Tag pattern: ^([\p{L}\p{Z}\p{N}_.:\/=+\-@]*)$

Taken from: https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_Tag.html
Changes: 34889a4

@rlymbur rlymbur added the enhancement New feature or request label Oct 6, 2025
@SinghVikram97 SinghVikram97 requested a review from rlymbur October 6, 2025 22:53
@SinghVikram97 SinghVikram97 added this pull request to the merge queue Oct 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 7, 2025
@SinghVikram97 SinghVikram97 added this pull request to the merge queue Oct 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 7, 2025
@SinghVikram97 SinghVikram97 added this pull request to the merge queue Oct 7, 2025
github-merge-queue bot pushed a commit that referenced this pull request Oct 7, 2025
* Add support for additional tags on vpc lattice resources

* add documentation for additional tags

* add validation for tags

---------

Co-authored-by: vbedi <vbedi@amazon.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 7, 2025
@SinghVikram97 SinghVikram97 added this pull request to the merge queue Oct 7, 2025
Merged via the queue into main with commit 53e0b02 Oct 7, 2025
5 checks passed
@rlymbur rlymbur deleted the vbedi_issue_611 branch October 16, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants