Repository navigation
Description
Context
cozystack/cozystack PR #4813 (draft; design proposal cozystack/community#93, parent issue cozystack/cozystack#3481) lets a VirtualPrivateCloud subnet be backed by a Proxmox VLAN, so Proxmox VMs, including the workers of a Proxmox-backed tenant cluster, attach to the same L2 as the VPC's pods. It adds these optional fields:
| App | Field | Type | Default |
|---|---|---|---|
VirtualPrivateCloud |
subnets[].proxmox |
object, optional | unset |
VirtualPrivateCloud |
subnets[].proxmox.zone |
string, optional | unset (the only ProxmoxNetworkZone) |
VirtualPrivateCloud |
subnets[].proxmox.vmRange |
string first-last, optional |
middle half of the subnet |
VirtualPrivateCloud |
egress |
object | {} (schema default; enabled and replicas are then defaulted) |
VirtualPrivateCloud |
egress.enabled |
bool | false |
VirtualPrivateCloud |
egress.replicas |
int | 1 |
VirtualPrivateCloud |
egress.internalCidr |
string, optional | unset |
Kubernetes |
proxmox.network.vpc |
string | "" |
Kubernetes |
proxmox.network.subnet |
string | "" |
KubernetesNodes |
proxmox.network.vpc |
string, optional | unset |
KubernetesNodes |
proxmox.network.subnet |
string, optional | unset |
KubernetesNodes |
proxmox.additionalNetworks[] |
list of {name, vpc, subnet, mtu?} |
[] |
KubernetesNodes proxmox.network.bridge is no longer required when vpc/subnet are set.
Things worth care in the model
subnets[].proxmoxis presence-based. The chart treats a subnet as Proxmox-backed when theproxmoxkey is present and is a map, soproxmox = {}(zone and range defaulted) is a different request fromproxmoxbeing absent. A model that drops an empty nested object silently turns a Proxmox-backed subnet back into an overlay subnet, which deletes its VLAN and IP pool. Same family as KubernetesNodes: model the new image field (upstream cozystack#3294) #39 (image.builtin = {}).- Mutually exclusive inputs are rejected at render.
KubernetesNodesproxmox.network.vpc/subnetcannot be combined withbridge/vlan, andKubernetesproxmox.network.vpc/subnetcannot be combined withproxmox.ipv4Config.addresses. Empty strings and a zero VLAN are treated as unset, so the provider must not send real defaults for the fields it does not own. additionalNetworks[].mtushould stay null when unset. Unset means "use the zone's MTU".- Do not marshal the upstream
vpc.Subnettype to build the spec. In the feat(vpc,kubernetes): back VPC subnets with Proxmox VLANs cozystack#4813 head the generatedSubnet.Proxmoxis a struct value (SubnetProxmox,json:"proxmox,omitempty"), not a pointer, andomitemptydoes not drop a struct, so marshallingvpc.Subnetemitsproxmox: {}for every subnet and would make each one Proxmox-backed. Keep building the map by hand, as the provider does today, and sendproxmoxonly when the configuration has the block. The type may change before the PR merges. allowSubnetsis refused on a Proxmox-backed subnet. It lives on the samesubnets[]object and is tracked in vpc: support subnets[].allowSubnets #61.
Dependencies
- The fields nest under the
substrate/proxmoxblocks that feat(kubernetes): add a proxmox substrate for managed clusters and worker pools cozystack#4088 added toKubernetesandKubernetesNodes(first shipped in v1.7.0-alpha.2). The provider does not model those blocks yet, and the pinnedapi/apps/v1alpha1module (v1.6.3) does not have them, so they need to land first or together with this. - The spec-coverage guard (
assertSpecCoverage) reflects against the pinned module, and feat(vpc,kubernetes): back VPC subnets with Proxmox VLANs cozystack#4813 is not in a release. This should wait for the upstream PR to merge and ship in a tagged release, then bump theapi/apps/v1alpha1pin to pick upvpc.SubnetProxmox,vpc.Egress,kubernetes.ProxmoxClusterNetwork, the newkubernetesnodes.ProxmoxNetworkfields andkubernetesnodes.ProxmoxAdditionalNetwork.
Why this repository is affected
Per the upstream trigger map (docs/agents/contributing.md, "Downstream Repositories"), this provider models every app field by hand (internal/provider/vpc_schema.go, vpc_model.go, kubernetes_* and kubernetes_nodes_*). Until the fields are modelled they cannot be set from Terraform. Because an update replaces the whole spec, an apply against an object that declares them through the API also strips them, which for subnets[].proxmox removes the subnet's Proxmox VLAN.
Assisted-by: LLM
Activity
themoriarti commentedon Oct 21, 2026
Scope update: the first implementation PR, cozystack/cozystack#5047, adds one nested field,
proxmox.network.name, to thekubernetesandkubernetes-nodesschemas; the VPC fields of cozystack/cozystack#4813 (subnets[].proxmox,egress,proxmox.additionalNetworks) are deferred with cozystack/community#93. A PR here follows once a tagged release carries the field.