✨ eks: skip aws:-prefixed tags in nodegroup reconciliation#5965
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @cPu1! |
|
Hi @cPu1. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
aws:-prefixed tags in nodegroup reconciliationaws:-prefixed tags in nodegroup reconciliation
022ff1b to
101f50a
Compare
When reconciling tags for EKS managed nodegroups and Fargate profiles, ignore `aws:`-prefixed keys when building the list of keys to remove, using the same reserved-prefix logic as `pkg/cloud/tags` for tag application. Those tags are not part of CAPA’s desired tag map since the validating webhooks forbid them in `additionalTags`, but they can exist on nodegroups created outside of CAPA (e.g., via CloudFormation). Including them in `UntagResource` triggers an API validation error, failing reconciliation and adoption of pre-existing nodegroups. Additionally, this changelist also replaces manual copying of variables (`kCopy`/`vCopy`) with `ptr.To()` so the loop-variable aliasing workaround is not required. This has been tested on an eksctl-provisioned cluster which creates nodegroups using CloudFormation. The AWS-reserved tags on the nodegroup (`aws:cloudformation:stack-name`, `aws:cloudformation:logical-id` and `aws:cloudformation:stack-id`) were correctly skipped and reconciliation passed. Signed-off-by: cpu1 <patwal.chetan@gmail.com>
101f50a to
b2e0926
Compare
|
/ok-to-test |
|
@nrb tests are passing. Can you review this PR? |
What type of PR is this?
/kind feature
What this PR does / why we need it:
When reconciling tags for EKS managed nodegroups and Fargate profiles, ignore
aws:-prefixed keys when building the list of keys to remove, using the same reserved-prefix logic aspkg/cloud/tagsfor tag application.Those tags are not part of CAPA’s desired tag map since the validating webhooks forbid them in
additionalTags, but they can exist on nodegroups created outside of CAPA (e.g., via CloudFormation). Including them inUntagResourcetriggers an API validation error, failing reconciliation and adoption of pre-existing nodegroups.Additionally, this changelist also replaces manual copying of variables (
kCopy/vCopy) withptr.To()so the loop-variable aliasing workaround is not required.This has been tested on an eksctl-provisioned cluster which creates nodegroups using CloudFormation. The AWS-reserved tags on the nodegroup (
aws:cloudformation:stack-name,aws:cloudformation:logical-idandaws:cloudformation:stack-id) were correctly skipped and reconciliation passed.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #5964
Special notes for your reviewer:
Checklist:
Release note: