Commit 59b2b62
committed
sdn: disable hostport handling when CRIO is used
This is a workaround because CRIO's CNI driver has different
hostport behavior than Kubernetes' CNI driver. Kube leaves all
hostport handling to the CNI plugin itself, while CRIO does
hostport handling internally, leading to duplicate work if the
plugin also handles hostports.
For now, detect the runtime based on socket path and disable
openshift-sdn hostport handling if the runtime is CRIO.
The real fix for this is to add hostport handling to Kube's CNI
driver, but in the "split" mode discussed upstream where kube's
CNI driver handles the port reservations on the host, while the
plugin handles the actual iptables rules. CRIO should be converted
to this scheme as well, and plugins will indicate with capabilities
in the CNI JSON whether they support this scheme or not. At
that point we can remove this hack and just have openshift-sdn
advertise portmapping support via the CNI JSON.1 parent 9bee56c commit 59b2b62
File tree
3 files changed
+29
-9
lines changed- pkg
- cmd/server/kubernetes/network
- network/node
3 files changed
+29
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
| |||
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| 43 | + | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
181 | | - | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 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 | | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| |||
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
153 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
154 | 159 | | |
155 | 160 | | |
156 | 161 | | |
| |||
499 | 504 | | |
500 | 505 | | |
501 | 506 | | |
502 | | - | |
503 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
504 | 511 | | |
505 | 512 | | |
506 | 513 | | |
| |||
511 | 518 | | |
512 | 519 | | |
513 | 520 | | |
514 | | - | |
515 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
516 | 525 | | |
517 | 526 | | |
518 | 527 | | |
| |||
631 | 640 | | |
632 | 641 | | |
633 | 642 | | |
634 | | - | |
635 | | - | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
636 | 647 | | |
637 | 648 | | |
638 | 649 | | |
| |||
0 commit comments