Commit 006ca7d
committed
Fix FRR pods unable to reach Kubernetes API during bootstrap
FRR pods use hostNetwork: true but were trying to reach the Kubernetes
API at the service IP (172.30.0.1), which kubelet auto-injects as
KUBERNETES_SERVICE_HOST. During bootstrap, this service IP is not
routable because the CNI (OVN-K) is not running yet, creating a
deadlock:
CNO waits for FRR webhook -> FRR pods can't reach API at 172.30.0.1
-> Service IP needs CNI routing -> CNI waits for FRR -> DEADLOCK
Add KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT environment
variables to FRR pods, overriding the kubelet-injected values with
the actual API server address (the API VIP, e.g., 192.168.111.5).
Since FRR pods use hostNetwork, they can reach the API VIP directly
via L2 without needing CNI routing, breaking the deadlock.
This follows the pattern used by other CNO hostNetwork components
(ovnkube-node, multus, sdn).
Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>1 parent cc63cdb commit 006ca7d
File tree
4 files changed
+27
-5
lines changed- bindata/network/frr-k8s
- pkg/network
4 files changed
+27
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
116 | | - | |
| 120 | + | |
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| |||
259 | 263 | | |
260 | 264 | | |
261 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
262 | 270 | | |
263 | 271 | | |
264 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
1077 | | - | |
| 1077 | + | |
1078 | 1078 | | |
1079 | 1079 | | |
1080 | 1080 | | |
| |||
1087 | 1087 | | |
1088 | 1088 | | |
1089 | 1089 | | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
1090 | 1100 | | |
1091 | 1101 | | |
1092 | 1102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
641 | | - | |
| 641 | + | |
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
647 | | - | |
| 647 | + | |
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
| |||
0 commit comments