Commit 101f50a
committed
eks: skip
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>aws:-prefixed tags in nodegroup reconciliation1 parent 0da8c3d commit 101f50a
2 files changed
Lines changed: 26 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
70 | | - | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
74 | | - | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 95 | + | |
| 96 | + | |
104 | 97 | | |
105 | 98 | | |
106 | | - | |
| 99 | + | |
107 | 100 | | |
108 | 101 | | |
109 | 102 | | |
| |||
137 | 130 | | |
138 | 131 | | |
139 | 132 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | 133 | | |
145 | | - | |
| 134 | + | |
146 | 135 | | |
147 | 136 | | |
148 | | - | |
149 | | - | |
| 137 | + | |
| 138 | + | |
150 | 139 | | |
151 | 140 | | |
152 | 141 | | |
| |||
158 | 147 | | |
159 | 148 | | |
160 | 149 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | 150 | | |
165 | | - | |
| 151 | + | |
166 | 152 | | |
167 | | - | |
| 153 | + | |
168 | 154 | | |
169 | 155 | | |
170 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
45 | 57 | | |
46 | 58 | | |
47 | 59 | | |
| |||
0 commit comments