Skip to content

Feature/infrastructure annotations support - ipam.vitistack.io/addresses - #20

Draft
haahaakon wants to merge 6 commits into
mainfrom
feature/infrastructure-annotations-support
Draft

Feature/infrastructure annotations support - ipam.vitistack.io/addresses#20
haahaakon wants to merge 6 commits into
mainfrom
feature/infrastructure-annotations-support

Conversation

@haahaakon

Copy link
Copy Markdown
Collaborator

No description provided.

@haahaakon haahaakon changed the title Feature/infrastructure annotations support Feature/infrastructure annotations support - ipam.vitistack.io/addresses Jul 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ValidateAddresses webhook validation to enforce that all routes attached to an existing Gateway either omit ipam.vitistack.io/addresses or use the exact same value as the Gateway.
  • Extends the HTTPRoute controller flow to read ipam.vitistack.io/addresses and 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants