Feature/infrastructure annotations support - ipam.vitistack.io/addresses - #20
Draft
haahaakon wants to merge 6 commits into
Draft
Feature/infrastructure annotations support - ipam.vitistack.io/addresses#20haahaakon wants to merge 6 commits into
haahaakon wants to merge 6 commits into
Conversation
…ith the adresses annotation
…cing a gw without it
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds end-to-end support for the ipam.vitistack.io/addresses infrastructure annotation, ensuring a consistent “addresses” value across HTTPRoute and its referred Gateway, and propagating the value into Gateway.Spec.Infrastructure.Annotations when creating gateways.
Changes:
- Introduces
ValidateAddresseswebhook validation to enforce that all routes attached to an existing Gateway either omitipam.vitistack.io/addressesor use the exact same value as the Gateway. - Extends the HTTPRoute controller flow to read
ipam.vitistack.io/addressesand pass it into Gateway creation/validation logic. - Adds unit tests covering the new addresses validation behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/webhook/v1/validations/validations_test.go | Adds unit tests for ValidateAddresses covering match/mismatch and nil/missing annotation scenarios. |
| internal/webhook/v1/validations/validate_addresses.go | Implements ValidateAddresses and matching logic between HTTPRoute annotations and Gateway infrastructure annotations. |
| internal/webhook/v1/httproute_webhook.go | Hooks the new addresses validation into HTTPRoute create/update admission validation. |
| internal/controller/httproute_controller.go | Reads the addresses annotation from HTTPRoute and passes it into gateway ensure/create logic. |
| internal/controller/gateway_manager.go | Validates addresses consistency for existing gateways and propagates addresses into newly created gateway infrastructure annotations. |
| internal/annotations/gateway_annotations.go | Adds the AnnotationIPAMAddresses constant for ipam.vitistack.io/addresses. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.