Commit c5e808b
authored
Optimize init map (#555)
* pool-manager/pods: Optimize InitMap by pre-filtering managed namespaces
Currently kubemacpool scans all pods cluster-wide and performs expensive
IsPodManaged() checks for each pod during startup. This causes slow
initialization in large clusters with many unmanaged namespaces.
Pre-compute managed namespaces once per webhook type and only scan pods
from those namespaces, eliminating redundant API calls and reducing
startup time.
Signed-off-by: Ram Lavi <ralavi@redhat.com>
* pool-manager/vms: Optimize InitMap by pre-filtering managed namespaces
Currently kubemacpool scans all VMs cluster-wide and performs expensive
IsVMManaged() checks for each VM during startup. This causes slow
initialization in large clusters with many unmanaged namespaces.
Pre-compute managed namespaces once per webhook type and only scan VMs
from those namespaces, eliminating redundant API calls and reducing
startup time.
Signed-off-by: Ram Lavi <ralavi@redhat.com>
* config: Increase readiness wait to 180s
To anticipate big clusters with 10K VMs, increasing the readiness probe
settle time to 3m.
Signed-off-by: Ram Lavi <ralavi@redhat.com>
---------
Signed-off-by: Ram Lavi <ralavi@redhat.com>1 parent 910acf7 commit c5e808b
File tree
6 files changed
+82
-37
lines changed- config
- default/manager
- release
- test
- pkg/pool-manager
6 files changed
+82
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
194 | 193 | | |
195 | 194 | | |
196 | 195 | | |
197 | | - | |
198 | | - | |
199 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
200 | 221 | | |
201 | 222 | | |
202 | 223 | | |
203 | 224 | | |
204 | | - | |
| 225 | + | |
205 | 226 | | |
206 | 227 | | |
207 | 228 | | |
| |||
215 | 236 | | |
216 | 237 | | |
217 | 238 | | |
218 | | - | |
| 239 | + | |
219 | 240 | | |
220 | 241 | | |
221 | 242 | | |
| |||
225 | 246 | | |
226 | 247 | | |
227 | 248 | | |
228 | | - | |
| 249 | + | |
229 | 250 | | |
230 | 251 | | |
231 | 252 | | |
| |||
237 | 258 | | |
238 | 259 | | |
239 | 260 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | 261 | | |
250 | 262 | | |
251 | 263 | | |
| |||
282 | 294 | | |
283 | 295 | | |
284 | 296 | | |
285 | | - | |
| 297 | + | |
286 | 298 | | |
287 | 299 | | |
288 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
145 | 166 | | |
146 | 167 | | |
147 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | | - | |
319 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
320 | 342 | | |
321 | 343 | | |
322 | | - | |
323 | 344 | | |
324 | 345 | | |
325 | | - | |
| 346 | + | |
326 | 347 | | |
327 | 348 | | |
328 | 349 | | |
| |||
336 | 357 | | |
337 | 358 | | |
338 | 359 | | |
339 | | - | |
| 360 | + | |
340 | 361 | | |
341 | 362 | | |
342 | 363 | | |
| |||
347 | 368 | | |
348 | 369 | | |
349 | 370 | | |
350 | | - | |
| 371 | + | |
351 | 372 | | |
352 | 373 | | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | 374 | | |
363 | 375 | | |
364 | 376 | | |
| |||
393 | 405 | | |
394 | 406 | | |
395 | 407 | | |
396 | | - | |
| 408 | + | |
397 | 409 | | |
398 | 410 | | |
399 | 411 | | |
| |||
0 commit comments