Commit b9f5936
[CASCL-1304] Fix Fargate profile name in
* [CASCL-1304] Fix Fargate profile name in dd-cluster-info ConfigMap
The dd-cluster-info ConfigMap was writing an empty string as the
Fargate profile-name bucket key, because `classifyNodeByLabel` read
`eks.amazonaws.com/fargate-profile` from the Node. EKS stamps that
label on the Pod scheduled on the Fargate node, not on the Node
itself, so the read always returned "".
Resolve the profile name by listing Pods filtered server-side with
`LabelSelector: "eks.amazonaws.com/fargate-profile"`, building a
nodeName→profileName index, and threading it through the classifier.
A Fargate node with no Pod yet scheduled keeps falling into the
empty-key bucket — acceptable for a one-shot informational snapshot.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [CASCL-1304] Cover error and empty-NodeName branches of fargateProfilesByNode
The patch coverage gate failed at 72.72% (threshold 80%) because three new
branches in classify.go were untested:
- Classify error-return when fargateProfilesByNode fails.
- The empty-NodeName skip path in fargateProfilesByNode.
- The List error wrap path in fargateProfilesByNode.
Adds two tests that close those branches via fake-clientset reactors and a
pending pod fixture, mirroring the existing API-list-error pattern in
guess/karpenter_test.go. fargateProfilesByNode now reaches 100% statement
coverage and the package totals 93.9%.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>dd-cluster-info ConfigMap (#3000)1 parent 2c675b3 commit b9f5936
2 files changed
Lines changed: 126 additions & 15 deletions
Lines changed: 43 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
| |||
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
118 | 152 | | |
119 | 153 | | |
120 | 154 | | |
| |||
126 | 160 | | |
127 | 161 | | |
128 | 162 | | |
129 | | - | |
| 163 | + | |
130 | 164 | | |
131 | 165 | | |
132 | 166 | | |
133 | 167 | | |
134 | 168 | | |
135 | 169 | | |
136 | 170 | | |
137 | | - | |
| 171 | + | |
138 | 172 | | |
139 | 173 | | |
140 | 174 | | |
| |||
155 | 189 | | |
156 | 190 | | |
157 | 191 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
162 | 197 | | |
163 | | - | |
| 198 | + | |
164 | 199 | | |
165 | 200 | | |
166 | 201 | | |
| |||
Lines changed: 83 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
| |||
195 | 202 | | |
196 | 203 | | |
197 | 204 | | |
198 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
199 | 208 | | |
200 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
201 | 212 | | |
202 | 213 | | |
203 | | - | |
| 214 | + | |
| 215 | + | |
204 | 216 | | |
205 | 217 | | |
206 | 218 | | |
| |||
248 | 260 | | |
249 | 261 | | |
250 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
251 | 321 | | |
252 | 322 | | |
253 | 323 | | |
| |||
448 | 518 | | |
449 | 519 | | |
450 | 520 | | |
451 | | - | |
452 | | - | |
| 521 | + | |
453 | 522 | | |
454 | 523 | | |
455 | | - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
456 | 530 | | |
457 | 531 | | |
458 | 532 | | |
| |||
476 | 550 | | |
477 | 551 | | |
478 | 552 | | |
479 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
480 | 556 | | |
481 | 557 | | |
482 | 558 | | |
| |||
0 commit comments