Commit 453a039
committed
refactor(kubernetes): optimize pod recycling logic and cleanup tests
- Add support for customizing restart timeout via annotation in docs
- Replace PodsToRecycle slice with RecyclingPods set for efficient lookup
- Refactor allocator to skip pods currently recycling in allocation logic
- Remove deprecated canAllocate function and simplify recycling checks
- Update pool reconciler to collect recycling pods and handle recycling in batch
- Refactor handlePodRecycle to process multiple pods and aggregate errors
- Enhance restart tracker logging with timeout and elapsed time details
- Remove outdated controller unit tests and reduce e2e test scope for simplicity1 parent 8aa745a commit 453a039
11 files changed
Lines changed: 84 additions & 1468 deletions
File tree
- kubernetes
- internal/controller
- test/e2e
- testdata
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
| 181 | + | |
| 182 | + | |
180 | 183 | | |
181 | 184 | | |
182 | 185 | | |
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
186 | 189 | | |
187 | | - | |
188 | | - | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| |||
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
226 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
227 | 232 | | |
228 | 233 | | |
229 | 234 | | |
| |||
271 | 276 | | |
272 | 277 | | |
273 | 278 | | |
274 | | - | |
275 | 279 | | |
276 | 280 | | |
277 | 281 | | |
| |||
391 | 395 | | |
392 | 396 | | |
393 | 397 | | |
394 | | - | |
395 | 398 | | |
396 | 399 | | |
397 | 400 | | |
| |||
413 | 416 | | |
414 | 417 | | |
415 | 418 | | |
416 | | - | |
417 | 419 | | |
418 | 420 | | |
419 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
| |||
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
176 | | - | |
177 | 175 | | |
178 | 176 | | |
179 | 177 | | |
| |||
241 | 239 | | |
242 | 240 | | |
243 | 241 | | |
244 | | - | |
245 | 242 | | |
246 | 243 | | |
247 | 244 | | |
| |||
296 | 293 | | |
297 | 294 | | |
298 | 295 | | |
299 | | - | |
300 | 296 | | |
301 | 297 | | |
302 | 298 | | |
| |||
363 | 359 | | |
364 | 360 | | |
365 | 361 | | |
366 | | - | |
367 | 362 | | |
368 | 363 | | |
369 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 90 | + | |
| 91 | + | |
106 | 92 | | |
107 | 93 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 94 | + | |
| 95 | + | |
122 | 96 | | |
123 | 97 | | |
124 | 98 | | |
| |||
This file was deleted.
0 commit comments