Conversation
|
🚀 Temp artifacts published: |
There was a problem hiding this comment.
Pull request overview
This PR enforces a new admission validation rule that limits the number of gateways allowed in a gateway group based on how many BGP communities are configured (Fix #315), by wiring controller config into the Gateway webhook and Gateway validation.
Changes:
- Pass
meta.GatewayCtrlConfiginto the Gateway validating webhook and intoGateway.Validate. - Add Gateway validation logic to reject joining a group when existing members >= configured community count.
- Extend Gateway API validation tests with group-size scenarios.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pkg/ctrl/gateway_wh.go |
Threads controller config into the Gateway webhook so admission can use config-driven validation. |
cmd/main.go |
Passes loaded GatewayCtrlConfig into the Gateway webhook setup. |
api/gateway/v1alpha1/gateway_types.go |
Adds group member counting and enforces max members based on configured communities. |
api/gateway/v1alpha1/gateway_types_test.go |
Adds test coverage for “too many gateways in group” and “fits in group” cases using configured communities. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
do not allow the addition of a gateway to a group if the number of existing gateways in the groups is already greater or equal than the number of communities available for priority Signed-off-by: Emanuele Di Pascale <emanuele@githedgehog.com>
ac5274c to
c4ad2c1
Compare
|
🚀 Temp artifacts published: |
point to a branch where the new validate signature is used, until we can merge this and bump it in fabricator Signed-off-by: Emanuele Di Pascale <emanuele@githedgehog.com>
|
🚀 Temp artifacts published: |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
do not allow the addition of a gateway to a group if the number of existing gateways in the groups is already greater or equal than the number of communities available for priority
also temporarily changes the fabricator branch ref for the vlab jobs to one where the new validate signature is used, until this is merged and bumped in fabricator
Fix #315