[vpc] Add VPC peering support for multi-tenant environments by mattia-eleuteri · Pull Request #2152 · cozystack/cozystack

gemini-code-assist[bot]

coderabbitai[bot]

coderabbitai[bot]

coderabbitai[bot]

@kvaps

Implement bilateral VPC peering using Kube-OVN's native vpcPeerings
mechanism. Each VPC can declare peers by specifying the remote VPC name
and tenant namespace. Peering is only activated by Kube-OVN when both
sides declare each other, ensuring mutual consent.

Key features:
- Deterministic remote VPC ID resolution via sha256 hash
- Auto-allocated link-local peering IPs (169.254.0.0/16) derived from
  sorted pair hash, eliminating manual IP coordination
- Static routes support for fine-grained inter-VPC routing
- ConfigMap enrichment with peer discovery info
- Schema validation enforcing tenant- namespace prefix pattern

Signed-off-by: Mattia Eleuteri <mattia.eleuteri@hidora.io>
Signed-off-by: mattia-eleuteri <mattia@hidora.io>

coderabbitai[bot]

@lllamnyp

Simplifies parsing sha256 digits to decimals for the VPC peering
feature.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>

lllamnyp

@dosubot dosubot bot added the lgtm

This PR has been approved by a maintainer

label

Mar 19, 2026