Commit aec9ffd
authored
fix: make ListenerSet and GRPCRoute watches optional (#9583)
* fix: make ListenerSet and GRPCRoute watches optional (#8991)
The Kubernetes provider watches, indexes and Lists ListenerSet and
GRPCRoute unconditionally. When either CRD is absent, the manager's cache
sync fails and Envoy Gateway crash-loops at startup with:
error watching resources: no matches for kind "ListenerSet" in version
"gateway.networking.k8s.io/v1"
Both kinds are in the Gateway API standard channel, but some managed
Kubernetes offerings install only a curated subset of it and don't let
users add the missing CRDs. GKE's managed gateway-api-crds addon ships
Gateway API v1.5 without listenersets and grpcroutes, because the GKE
Gateway controller doesn't implement them; installing them out-of-band
means a second owner for addon-managed CRDs.
Guard both watches, their indexers, the reconcile-time processing and the
GRPCRoute predicate Lists behind a CRD existence check, restoring the
pre-#8365 behavior for these two kinds only. TLSRoute and
BackendTLSPolicy stay unconditional. When the CRDs are present, behavior
is unchanged; when one is absent, the controller starts and simply
doesn't serve that kind instead of taking down the whole controller. The
offline (file) provider keeps assuming all CRDs are present.
Existence is probed once at startup, so a CRD installed later is not
watched until the controller restarts, the same trade-off already
accepted for EnvoyProxy, TCPRoute and UDPRoute.
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
* fix: make the TLSRoute watch optional too
TLSRoute graduated to the Gateway API standard channel in v1.5, so it is
subject to the same problem as ListenerSet and GRPCRoute: a cluster may
run a bundle that predates the graduation, or a managed offering may ship
only a curated subset of the standard channel, and the unconditional
watch then fails the manager's cache sync and crash-loops Envoy Gateway
at startup.
Guard the TLSRoute watch, its indexers, the reconcile-time processing and
the TLSRoute predicate List behind a CRD existence check, matching what
the previous commit does for ListenerSet and GRPCRoute. Also correct the
rationale comment: TCPRoute and UDPRoute are standard channel as of
Gateway API v1.6, they are not experimental-only.
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
---------
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>1 parent ddf2fc4 commit aec9ffd
5 files changed
Lines changed: 186 additions & 84 deletions
File tree
- internal/provider/kubernetes
- release-notes/current/bug_fixes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
88 | 89 | | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| 94 | + | |
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
| |||
1887 | 1890 | | |
1888 | 1891 | | |
1889 | 1892 | | |
1890 | | - | |
1891 | | - | |
1892 | | - | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
1893 | 1899 | | |
1894 | | - | |
1895 | 1900 | | |
1896 | 1901 | | |
1897 | 1902 | | |
1898 | 1903 | | |
1899 | | - | |
1900 | | - | |
1901 | | - | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
1902 | 1909 | | |
1903 | 1910 | | |
1904 | 1911 | | |
1905 | 1912 | | |
1906 | 1913 | | |
1907 | 1914 | | |
1908 | 1915 | | |
1909 | | - | |
1910 | | - | |
1911 | | - | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
1912 | 1921 | | |
1913 | 1922 | | |
1914 | 1923 | | |
| |||
2310 | 2319 | | |
2311 | 2320 | | |
2312 | 2321 | | |
2313 | | - | |
2314 | | - | |
2315 | | - | |
2316 | | - | |
2317 | | - | |
2318 | | - | |
2319 | | - | |
2320 | | - | |
2321 | | - | |
2322 | | - | |
2323 | | - | |
2324 | | - | |
2325 | | - | |
2326 | | - | |
2327 | | - | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
2328 | 2335 | | |
2329 | 2336 | | |
2330 | | - | |
2331 | | - | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
2332 | 2360 | | |
2333 | 2361 | | |
2334 | 2362 | | |
| |||
2350 | 2378 | | |
2351 | 2379 | | |
2352 | 2380 | | |
2353 | | - | |
2354 | | - | |
2355 | | - | |
2356 | | - | |
2357 | | - | |
2358 | | - | |
2359 | | - | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
2363 | | - | |
2364 | | - | |
2365 | | - | |
2366 | | - | |
2367 | | - | |
2368 | | - | |
| 2381 | + | |
| 2382 | + | |
2369 | 2383 | | |
2370 | 2384 | | |
2371 | | - | |
2372 | | - | |
2373 | | - | |
2374 | | - | |
2375 | | - | |
2376 | | - | |
2377 | | - | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
2378 | 2406 | | |
2379 | | - | |
2380 | | - | |
2381 | | - | |
2382 | | - | |
2383 | | - | |
2384 | | - | |
| 2407 | + | |
| 2408 | + | |
2385 | 2409 | | |
2386 | 2410 | | |
2387 | | - | |
2388 | | - | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
2389 | 2432 | | |
2390 | 2433 | | |
2391 | 2434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| 116 | + | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
574 | 576 | | |
575 | 577 | | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
585 | 589 | | |
586 | 590 | | |
587 | 591 | | |
| |||
1007 | 1011 | | |
1008 | 1012 | | |
1009 | 1013 | | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
1010 | 1018 | | |
1011 | 1019 | | |
1012 | 1020 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1154 | 1154 | | |
1155 | 1155 | | |
1156 | 1156 | | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
1161 | 1166 | | |
1162 | 1167 | | |
1163 | 1168 | | |
| |||
1242 | 1247 | | |
1243 | 1248 | | |
1244 | 1249 | | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
1245 | 1261 | | |
1246 | 1262 | | |
1247 | 1263 | | |
| |||
1253 | 1269 | | |
1254 | 1270 | | |
1255 | 1271 | | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
1256 | 1284 | | |
1257 | 1285 | | |
1258 | 1286 | | |
| |||
1496 | 1524 | | |
1497 | 1525 | | |
1498 | 1526 | | |
| 1527 | + | |
| 1528 | + | |
1499 | 1529 | | |
1500 | 1530 | | |
1501 | 1531 | | |
| |||
1846 | 1876 | | |
1847 | 1877 | | |
1848 | 1878 | | |
1849 | | - | |
1850 | | - | |
1851 | | - | |
1852 | | - | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
1853 | 1886 | | |
1854 | 1887 | | |
1855 | 1888 | | |
| |||
1886 | 1919 | | |
1887 | 1920 | | |
1888 | 1921 | | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
1889 | 1935 | | |
1890 | 1936 | | |
1891 | 1937 | | |
| |||
1897 | 1943 | | |
1898 | 1944 | | |
1899 | 1945 | | |
| 1946 | + | |
1900 | 1947 | | |
1901 | 1948 | | |
1902 | 1949 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments