Commit edbb688
authored
Engnode 568 (#3997)
* feat: use latest gateway api versions only
Pin ReferenceGrant, TLSRoute, and BackendTLSPolicy syncing to the v1
Gateway API versions instead of negotiating older served versions
against the host. Hosts whose Gateway API CRDs do not serve v1 fail
fast at startup with an actionable error.
Signed-off-by: Ryan Swanson <ryan.swanson@loft.sh>
* fix: install tenant referencegrant crd whenever route sync is enabled
- route controllers watch virtual ReferenceGrants regardless of
sync.toHost.gatewayApi.referenceGrants.enabled; with the flag "false"
the CRD was never installed and the watch failed forever, silently
blocking all HTTPRoute/TLSRoute sync
- extract EnsureReferenceGrantCRD and call it from the HTTPRoute and
TLSRoute mappers, keeping "false" semantics: grants never sync to the
host and virtual grants stay authoritative for cross-namespace refs
- add gatewayapi-grants-disabled e2e suite plus a unit test asserting
route mappers ensure the grant CRD when grant sync is disabled
Signed-off-by: Ryan Swanson <ryan.swanson@loft.sh>
* fix: install tenant referencegrant crd whenever route sync is enabled
- route controllers watch virtual ReferenceGrants for cross-namespace
authorization regardless of sync.toHost.gatewayApi.referenceGrants.enabled;
with the flag "false" the CRD was never installed and the watch failed
forever (no matches for kind "ReferenceGrant"), silently blocking all
HTTPRoute/TLSRoute sync
- extract EnsureReferenceGrantCRD and call it from the HTTPRoute and
TLSRoute mappers, independent of grant sync
- keep "false" semantics: no host discovery check, no mapper, no syncer,
grants never sync to the host; virtual grants stay authoritative for
cross-namespace refs in single-namespace mode
- add gatewayapi-grants-disabled e2e suite: same-namespace route syncs,
cross-namespace backendRef denied until a virtual ReferenceGrant permits
it, grant itself never syncs to the host
- add unit test asserting route mappers ensure the grant CRD when grant
sync is disabled
Signed-off-by: Ryan Swanson <ryan.swanson@loft.sh>
# Conflicts:
# e2e-next/test_gatewayapi/test_gatewayapi_grants_disabled.go
# pkg/mappings/resources/register_gateway_test.go
# pkg/mappings/resources/tlsroutes.go
* fix: enable tenant gateway sync via the gatewayapi umbrella switch
The umbrella sync.toHost.gatewayApi.enabled only enabled HTTPRoute sync:
the tenant gateways CRD was never installed, host RBAC for gateways was
never granted, and route controllers logged watch errors for the missing
Gateway kind.
- honor the umbrella in GatewaysEnabled and the chart gateways RBAC rule
- install the tenant Gateway CRD whenever route sync is enabled
- sync ReferenceGrants to the host only with namespace sync or an
explicit referenceGrants toggle, matching the read-only RBAC the chart
grants in single-namespace mode; tenant-side validation is unchanged
- document umbrella and referenceGrants auto semantics in the schema
- add umbrella-only e2e suite plus unit and chart test coverage
Closes ENGNODE-568
Signed-off-by: Ryan Swanson <ryan.swanson@loft.sh>
---------
Signed-off-by: Ryan Swanson <ryan.swanson@loft.sh>1 parent 7f4d24d commit edbb688
21 files changed
Lines changed: 515 additions & 54 deletions
File tree
- chart
- templates
- tests
- config
- e2e-next
- test_gatewayapi
- pkg
- controllers/resources
- mappings/resources
- util/gatewayapi
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
400 | 451 | | |
401 | 452 | | |
402 | 453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2598 | 2598 | | |
2599 | 2599 | | |
2600 | 2600 | | |
2601 | | - | |
| 2601 | + | |
2602 | 2602 | | |
2603 | 2603 | | |
2604 | 2604 | | |
| |||
5306 | 5306 | | |
5307 | 5307 | | |
5308 | 5308 | | |
5309 | | - | |
| 5309 | + | |
5310 | 5310 | | |
5311 | 5311 | | |
5312 | 5312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1234 | 1234 | | |
1235 | 1235 | | |
1236 | 1236 | | |
| 1237 | + | |
1237 | 1238 | | |
1238 | 1239 | | |
1239 | 1240 | | |
| |||
1310 | 1311 | | |
1311 | 1312 | | |
1312 | 1313 | | |
| 1314 | + | |
1313 | 1315 | | |
1314 | 1316 | | |
1315 | 1317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments