Commit 02b0ebe
committed
Do not watch guest.net / multi priority queues
This patch further restricts the async watcher from monitoring
guest.net due to the same churn in VKS nodes that caused guest.ipStack
to be so busy. This is okay since the summary.guest will still trigger
a reconcile when a VM gets its primary IP.
Additionally, this patch also introduces multiple priority queues for a
VM's lifecycle. When a VM is going to be reconciled, it will now fall into
one of the following buckets:
- priorityLow int = handler.LowPriority // 0
- priorityCreating int = 100
- priorityPowerStateChange int = 90
- priorityWaitingForIP int = 90
- priorityDeleting int = 80
- priorityWaitingForDiskPromo int = 70
Thus, it no longer matters if async signal is sending thousands of VMs a minute,
because VMs that are being created, deleted, waiting on a power state change,
waiting for an IP, or waiting for disk promotion will all be moved to the head
of the line.
Finally, the VM watcher has been updated to cache VM properties for an hour
and will not send async signal updates if a VM's properties have not changed.
The local property cache is flushed once an hour or when the pod restarts.1 parent b6d62a4 commit 02b0ebe
File tree
24 files changed
+1966
-254
lines changed- controllers
- infra/zone
- virtualmachinepublishrequest
- virtualmachine/virtualmachine
- docs/concepts/workloads
- pkg
- constants
- util
- kube
- nil
- vmopv1
- vsphere
- library
- watcher
- services/vm-watcher
- webhooks/virtualmachine/validation
24 files changed
+1966
-254
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
| |||
187 | 185 | | |
188 | 186 | | |
189 | 187 | | |
| 188 | + | |
190 | 189 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
199 | 193 | | |
200 | 194 | | |
201 | 195 | | |
| |||
241 | 235 | | |
242 | 236 | | |
243 | 237 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
252 | 241 | | |
253 | 242 | | |
254 | 243 | | |
| |||
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
94 | 102 | | |
95 | 103 | | |
96 | 104 | | |
| |||
105 | 113 | | |
106 | 114 | | |
107 | 115 | | |
108 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
109 | 120 | | |
110 | 121 | | |
111 | 122 | | |
| |||
392 | 403 | | |
393 | 404 | | |
394 | 405 | | |
395 | | - | |
| 406 | + | |
396 | 407 | | |
397 | 408 | | |
398 | 409 | | |
| |||
661 | 672 | | |
662 | 673 | | |
663 | 674 | | |
664 | | - | |
| 675 | + | |
665 | 676 | | |
666 | 677 | | |
667 | 678 | | |
| |||
695 | 706 | | |
696 | 707 | | |
697 | 708 | | |
698 | | - | |
| 709 | + | |
699 | 710 | | |
700 | 711 | | |
701 | 712 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | 48 | | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
503 | | - | |
| 503 | + | |
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| |||
992 | 992 | | |
993 | 993 | | |
994 | 994 | | |
995 | | - | |
| 995 | + | |
996 | 996 | | |
997 | 997 | | |
998 | 998 | | |
| |||
0 commit comments