Skip to content

Commit

Permalink
Add support for setting VLAN in network devices through config
Browse files Browse the repository at this point in the history
  • Loading branch information
Luzifer committed Nov 19, 2024
1 parent afca76c commit cc5cbb3
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ GATEWAY: "10.10.10.1" # The gateway for
IP_PREFIX: "25" # Subnet Mask in CIDR notation for your node IP ranges
DNS_SERVERS: "[8.8.8.8,8.8.4.4]" # The dns nameservers for the machines network-config.
BRIDGE: "vmbr1" # The network bridge device for Proxmox VE VMs
VLAN: "2" # (optional) The VLAN to put the bridge device into
## -- xl nodes -- ##
BOOT_VOLUME_DEVICE: "scsi0" # The device used for the boot disk.
Expand Down
2 changes: 2 additions & 0 deletions templates/cluster-class-calico.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
kind: ProxmoxMachineTemplate
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
Expand All @@ -998,6 +999,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
kind: KubeadmConfigTemplate
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
Expand Down
2 changes: 2 additions & 0 deletions templates/cluster-class-cilium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
kind: ProxmoxMachineTemplate
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
Expand All @@ -998,6 +999,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
kind: KubeadmConfigTemplate
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
Expand Down
2 changes: 2 additions & 0 deletions templates/cluster-template-calico.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
Expand Down Expand Up @@ -238,6 +239,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
Expand Down
7 changes: 7 additions & 0 deletions templates/cluster-template-cilium-load-balancer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,12 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
additionalDevices:
- name: net1
bridge: ${SECONDARY_BRIDGE}
model: virtio
vlan: ${SECONDARY_VLAN}
ipv4PoolRef:
apiGroup: ipam.cluster.x-k8s.io
kind: GlobalInClusterIPPool
Expand Down Expand Up @@ -295,10 +297,12 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
additionalDevices:
- name: net1
bridge: ${SECONDARY_BRIDGE}
model: virtio
vlan: ${SECONDARY_VLAN}
ipv4PoolRef:
apiGroup: ipam.cluster.x-k8s.io
kind: GlobalInClusterIPPool
Expand Down Expand Up @@ -355,10 +359,12 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
additionalDevices:
- name: net1
bridge: ${SECONDARY_BRIDGE}
model: virtio
vlan: ${SECONDARY_VLAN}
ipv4PoolRef:
apiGroup: ipam.cluster.x-k8s.io
kind: GlobalInClusterIPPool
Expand All @@ -367,6 +373,7 @@ spec:
- name: net2
bridge: ${EXT_SERVICE_BRIDGE}
model: virtio
vlan: ${EXT_SERVICE_VLAN}
ipv4PoolRef:
apiGroup: ipam.cluster.x-k8s.io
kind: GlobalInClusterIPPool
Expand Down
2 changes: 2 additions & 0 deletions templates/cluster-template-cilium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
Expand Down Expand Up @@ -224,6 +225,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
Expand Down
2 changes: 2 additions & 0 deletions templates/cluster-template-dual-stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
Expand Down Expand Up @@ -243,6 +244,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
Expand Down
2 changes: 2 additions & 0 deletions templates/cluster-template-external-creds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
Expand Down Expand Up @@ -246,6 +247,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
Expand Down
4 changes: 4 additions & 0 deletions templates/cluster-template-multiple-vlans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,12 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
additionalDevices:
- name: net1
bridge: ${SECONDARY_BRIDGE}
model: virtio
vlan: ${SECONDARY_VLAN}
ipv4PoolRef:
apiGroup: ipam.cluster.x-k8s.io
kind: GlobalInClusterIPPool
Expand Down Expand Up @@ -251,10 +253,12 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
additionalDevices:
- name: net1
bridge: ${SECONDARY_BRIDGE}
model: virtio
vlan: ${SECONDARY_VLAN}
ipv4PoolRef:
apiGroup: ipam.cluster.x-k8s.io
kind: GlobalInClusterIPPool
Expand Down
2 changes: 2 additions & 0 deletions templates/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
Expand Down Expand Up @@ -233,6 +234,7 @@ spec:
default:
bridge: ${BRIDGE}
model: virtio
vlan: ${VLAN}
---
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
Expand Down

0 comments on commit cc5cbb3

Please sign in to comment.