cozystack/packages/apps/vpc
Andrei Kvapil 8e8bea039f
feat(vpc): migrate subnets definition from map to array format
Change VPC subnets from map[string]Subnet to []Subnet with explicit
name field, aligning with the vm-instance subnet format.

Map format:  subnets: {mysubnet: {cidr: "x"}}
Array format: subnets: [{name: mysubnet, cidr: "x"}]

Subnet ID generation (sha256 of namespace/vpcId/subnetName) remains
unchanged — subnetName now comes from .name field instead of map key.
ConfigMap output format stays the same.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-02-15 21:34:19 +01:00
..
charts [vpc,dashboard] Expose subnet details in dashboard 2025-11-13 19:10:22 +03:00
logos [apps] Add VPC app 2025-10-31 17:48:17 +03:00
templates feat(vpc): migrate subnets definition from map to array format 2026-02-15 21:34:19 +01:00
Chart.yaml [apps] Add VPC app 2025-10-31 17:48:17 +03:00
Makefile refactor: move scripts to hack directory 2026-01-15 16:06:56 +01:00
README.md [apps] vpc: fix typo in README 2025-11-17 13:23:45 +03:00
values.schema.json feat(vpc): migrate subnets definition from map to array format 2026-02-15 21:34:19 +01:00
values.yaml feat(vpc): migrate subnets definition from map to array format 2026-02-15 21:34:19 +01:00

VPC

VPC offers a subset of dedicated subnets with networking services related to it. As the service evolves, it will provide more ways to isolate your workloads.

Service details

To function, the service requires kube-ovn and multus CNI to be present, so by default it will only work on paas-full bundle. Kube-ovn provides VPC and Subnet resources and performs isolation and networking maintenance such as DHCP. Under the hood it uses ovn virtual routers and virtual switches. Multus enables a multi-nic capability, so a pod or a VM could have two or more network interfaces.

Currently every workload will have a connection to a default management network which will also have a default gateway, and the majority of traffic will go through it. VPC subnets are for now an additional dedicated networking spaces.

Deployment notes

VPC name must be unique within a tenant. Subnet name and ip address range must be unique within a VPC. Subnet ip address space must not overlap with the default management network ip address range, subsets of 172.16.0.0/12 are recommended. Currently there are no fail-safe checks, however they are planned for the future.

Different VPCs may have subnets with overlapping ip address ranges.

A VM or a pod may be connected to multiple secondary Subnets at once. Each secondary connection will be represented as an additional network interface.

Parameters

Common parameters

Name Description Type Value
subnets Subnets of a VPC map[string]object {...}
subnets[name].cidr Subnet CIDR, e.g. 192.168.0.0/24 cidr {}

Examples

apiVersion: apps.cozystack.io/v1alpha1
kind: VirtualPrivateCloud
metadata:
  name: vpc00
spec:
  subnets:
    sub00:
      cidr: 172.16.0.0/24
    sub01:
      cidr: 172.16.1.0/24
    sub02:
      cidr: 172.16.2.0/24