Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions api/v1alpha1/proxmoxcluster_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ func defaultCluster() *ProxmoxCluster {
},
Spec: ProxmoxClusterSpec{
IPv4Config: &IPConfigSpec{
Addresses: []string{"10.0.0.0/24"},
Addresses: []string{"203.0.113.0/24"},
Prefix: 24,
Gateway: "10.0.0.254",
Gateway: "203.0.113.254",
Metric: func() *uint32 { var a uint32 = 123; return &a }(),
},
DNSServers: []string{"1.2.3.4"},
Expand Down Expand Up @@ -221,9 +221,9 @@ func TestSetInClusterIPPoolRef(t *testing.T) {
Namespace: metav1.NamespaceDefault,
},
Spec: ipamicv1.InClusterIPPoolSpec{
Addresses: []string{"10.10.10.2/24"},
Addresses: []string{"192.0.2.2/24"},
Prefix: 24,
Gateway: "10.10.10.1",
Gateway: "192.0.2.1",
},
}

Expand Down
8 changes: 4 additions & 4 deletions api/v1alpha2/proxmoxcluster_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ func defaultCluster() *ProxmoxCluster {
},
Spec: ProxmoxClusterSpec{
IPv4Config: &IPConfigSpec{
Addresses: []string{"10.0.0.0/24"},
Addresses: []string{"203.0.113.0/24"},
Prefix: 24,
Gateway: "10.0.0.254",
Gateway: "203.0.113.254",
Metric: ptr.To(int32(123)),
},
DNSServers: []string{"1.2.3.4"},
Expand Down Expand Up @@ -228,9 +228,9 @@ func TestSetInClusterIPPoolRef(t *testing.T) {
Namespace: metav1.NamespaceDefault,
},
Spec: ipamicv1.InClusterIPPoolSpec{
Addresses: []string{"10.10.10.2/24"},
Addresses: []string{"192.0.2.2/24"},
Prefix: 24,
Gateway: "10.10.10.1",
Gateway: "192.0.2.1",
},
}

Expand Down
10 changes: 5 additions & 5 deletions docs/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ As an example:
```
kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
test-cluster-control-plane-gcgc6 Ready control-plane 11h v1.26.7 10.0.1.69 <none> Ubuntu 22.04.3 LTS 5.15.0-89-generic containerd://1.7.6
test-cluster-load-balancer-c8rd2 Ready load-balancer,node 11h v1.26.7 10.0.2.155 <none> Ubuntu 22.04.3 LTS 5.15.0-89-generic containerd://1.7.6
test-cluster-load-balancer-wqbcg Ready load-balancer,node 11h v1.26.7 10.0.2.152 <none> Ubuntu 22.04.3 LTS 5.15.0-89-generic containerd://1.7.6
test-cluster-worker-hbm8s Ready node 11h v1.26.7 10.0.1.71 <none> Ubuntu 22.04.3 LTS 5.15.0-89-generic containerd://1.7.6
test-cluster-worker-n2vbc NotReady node 17m v1.26.7 10.0.1.73 <none> Ubuntu 22.04.3 LTS 5.15.0-89-generic containerd://1.7.6
test-cluster-control-plane-gcgc6 Ready control-plane 11h v1.26.7 198.51.100.69 <none> Ubuntu 22.04.3 LTS 5.15.0-89-generic containerd://1.7.6
test-cluster-load-balancer-c8rd2 Ready load-balancer,node 11h v1.26.7 198.51.100.155 <none> Ubuntu 22.04.3 LTS 5.15.0-89-generic containerd://1.7.6
test-cluster-load-balancer-wqbcg Ready load-balancer,node 11h v1.26.7 198.51.100.152 <none> Ubuntu 22.04.3 LTS 5.15.0-89-generic containerd://1.7.6
test-cluster-worker-hbm8s Ready node 11h v1.26.7 198.51.100.71 <none> Ubuntu 22.04.3 LTS 5.15.0-89-generic containerd://1.7.6
test-cluster-worker-n2vbc NotReady node 17m v1.26.7 198.51.100.73 <none> Ubuntu 22.04.3 LTS 5.15.0-89-generic containerd://1.7.6
```

The load-balancers have an `e1000` interface as their default network, whereas `ens19` and `ens20` are `virtio`
Expand Down
6 changes: 3 additions & 3 deletions docs/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ ALLOWED_NODES: "[pve1,pve2,pve3, ...]" # The Proxmox VE n
VM_SSH_KEYS: "ssh-ed25519 ..., ssh-ed25519 ..." # The ssh authorized keys used to ssh to the machines.

## -- networking configuration-- ##
CONTROL_PLANE_ENDPOINT_IP: "10.10.10.4" # The IP that kube-vip is going to use as a control plane endpoint.
NODE_IP_RANGES: "[10.10.10.5-10.10.10.50, ...]" # The IP ranges for Cluster nodes.
GATEWAY: "10.10.10.1" # The gateway for the machines network-config..
CONTROL_PLANE_ENDPOINT_IP: "192.0.2.4" # The IP that kube-vip is going to use as a control plane endpoint.
NODE_IP_RANGES: "[192.0.2.5-192.0.2.50, ...]" # The IP ranges for Cluster nodes.
GATEWAY: "192.0.2.1" # The gateway for the machines network-config..
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.
Expand Down
14 changes: 7 additions & 7 deletions docs/advanced-setups.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ To do that you will need to set extra environment variables along with the requi

```bash
# The secondary IP ranges for Cluster nodes
export SECONDARY_IP_RANGES="[10.10.10.100-10.10.10.150]"
export SECONDARY_IP_RANGES="[192.0.2.100-192.0.2.150]"
# The Subnet Mask in CIDR notation for your node secondary IP ranges
export SECONDARY_IP_PREFIX=24
# The secondary gateway for the machines network-config
export SECONDARY_GATEWAY="10.10.10.254"
export SECONDARY_GATEWAY="192.0.2.254"
# The secondary dns nameservers for the machines network-config
export SECONDARY_DNS_SERVERS="[8.8.8.8, 8.8.4.4]"
# The Proxmox secondary network bridge for VMs
Expand Down Expand Up @@ -60,8 +60,8 @@ The metric of the default gateway can be controlled with the proxmoxcluster defi
[...]
ipv4Config:
addresses:
- 10.10.0.70-10.10.0.79
gateway: 10.10.0.1
- 198.51.100.70-198.51.100.79
gateway: 198.51.100.1
metric: 100
prefix: 24
```
Expand Down Expand Up @@ -137,14 +137,14 @@ LoadBalancer nodes are tainted and only run pods required for load balancing.
## -- loadbalancer nodes -- #
LOAD_BALANCER_MACHINE_COUNT: 2 # Number of load balancer nodes
EXT_SERVICE_BRIDGE: "vmbr2" # The network bridge device used for load balancing and bgp.
LB_BGP_IPV4_RANGES: "[172.16.4.10-172.16.4.20]" # The IP ranges used by the cluster for establishing the bgp session.
LB_BGP_IPV4_RANGES: "[203.0.113.10-203.0.113.20]" # The IP ranges used by the cluster for establishing the bgp session.
LB_BGP_IPV6_RANGES:
LB_BGP_IPV4_PREFIX: "24" # Subnet Mask in CIDR notation for your bgp IP ranges.
LB_BGP_IPV6_PREFIX:
METALLB_IPV4_ASN: "65400" # The nodes bgp asn.
METALLB_IPV6_ASN:
METALLB_IPV4_BGP_PEER: "172.16.4.1" # The nodes bgp peer IP address.
METALLB_IPV4_BGP_PEER2: "172.16.4.2" # Backup bgp peer for H/A
METALLB_IPV4_BGP_PEER: "203.0.113.1" # The nodes bgp peer IP address.
METALLB_IPV4_BGP_PEER2: "203.0.113.2" # Backup bgp peer for H/A
METALLB_IPV6_BGP_PEER:
METALLB_IPV6_BGP_PEER2:
METALLB_IPV4_BGP_SECRET: "REDACTED" # The secret required to establish a bgp session (if any).
Expand Down
26 changes: 13 additions & 13 deletions internal/controller/proxmoxcluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,19 +369,19 @@ func buildProxmoxCluster(name string) infrav1.ProxmoxCluster {
},
Spec: infrav1.ProxmoxClusterSpec{
ControlPlaneEndpoint: infrav1.APIEndpoint{
Host: "10.10.10.11",
Host: "192.0.2.11",
Port: 6443,
},
IPv4Config: &infrav1.IPConfigSpec{
Addresses: []string{
"10.10.10.2-10.10.10.10",
"10.10.10.100-10.10.10.125",
"10.10.10.192/64",
"192.0.2.2-192.0.2.10",
"192.0.2.100-192.0.2.125",
"192.0.2.192/64",
},
Gateway: "10.10.10.1",
Gateway: "192.0.2.1",
Prefix: 24,
},
DNSServers: []string{"8.8.8.8", "8.8.4.4"},
DNSServers: []string{"192.0.2.53", "192.0.2.54"},
},
}

Expand Down Expand Up @@ -421,9 +421,9 @@ func dummyIPAddress(client client.Client, owner client.Object, poolName string)
Kind: gvk.Kind,
Name: poolName,
},
Address: "10.10.10.11",
Address: "192.0.2.11",
Prefix: ptr.To[int32](24),
Gateway: "10.10.10.1",
Gateway: "192.0.2.1",
},
}
}
Expand Down Expand Up @@ -453,14 +453,14 @@ func createProxmoxCluster() *infrav1.ProxmoxCluster {
Spec: infrav1.ProxmoxClusterSpec{
IPv4Config: &infrav1.IPConfigSpec{
Addresses: []string{
"10.10.10.2-10.10.10.10",
"10.10.10.100-10.10.10.125",
"10.10.10.192/64",
"192.0.2.2-192.0.2.10",
"192.0.2.100-192.0.2.125",
"192.0.2.192/64",
},
Gateway: "10.10.10.1",
Gateway: "192.0.2.1",
Prefix: 24,
},
DNSServers: []string{"8.8.8.8", "8.8.4.4"},
DNSServers: []string{"192.0.2.53", "192.0.2.54"},
},
}
Expect(testEnv.Create(testEnv.GetContext(), proxmoxCluster)).To(Succeed())
Expand Down
20 changes: 10 additions & 10 deletions internal/inject/inject_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ func TestISOInjectorInjectCloudInit(t *testing.T) {
NetworkRenderer: cloudinit.NewNetworkConfig([]types.NetworkConfigData{
{
Name: "eth0",
IPConfigs: []types.IPConfig{{IPAddress: netip.MustParsePrefix("10.1.1.6/24"), Gateway: "10.1.1.1"}},
DNSServers: []string{"8.8.8.8", "8.8.4.4"},
IPConfigs: []types.IPConfig{{IPAddress: netip.MustParsePrefix("198.51.100.6/24"), Gateway: "198.51.100.1"}},
DNSServers: []string{"192.0.2.53", "192.0.2.54"},
},
}),
}
Expand Down Expand Up @@ -156,8 +156,8 @@ func TestISOInjectorInjectCloudInit_Errors(t *testing.T) {
NetworkRenderer: cloudinit.NewNetworkConfig([]types.NetworkConfigData{
{
Name: "eth0",
IPConfigs: []types.IPConfig{{IPAddress: netip.MustParsePrefix("10.1.1.6/24"), Gateway: "10.1.1.1"}},
DNSServers: []string{"8.8.8.8", "8.8.4.4"},
IPConfigs: []types.IPConfig{{IPAddress: netip.MustParsePrefix("198.51.100.6/24"), Gateway: "198.51.100.1"}},
DNSServers: []string{"192.0.2.53", "192.0.2.54"},
},
}),
}
Expand Down Expand Up @@ -206,8 +206,8 @@ func TestISOInjectorInjectIgnition(t *testing.T) {
Network: []types.NetworkConfigData{
{
Name: "eth0",
IPConfigs: []types.IPConfig{{IPAddress: netip.MustParsePrefix("10.1.1.6/24"), Gateway: "10.1.1.1"}},
DNSServers: []string{"8.8.8.8", "8.8.4.4"},
IPConfigs: []types.IPConfig{{IPAddress: netip.MustParsePrefix("198.51.100.6/24"), Gateway: "198.51.100.1"}},
DNSServers: []string{"192.0.2.53", "192.0.2.54"},
},
},
}
Expand Down Expand Up @@ -257,8 +257,8 @@ func TestISOInjectorInjectIgnition_Errors(t *testing.T) {
Network: []types.NetworkConfigData{
{
Name: "eth0",
IPConfigs: []types.IPConfig{{IPAddress: netip.MustParsePrefix("10.1.1.9/24"), Gateway: "10.1.1.1"}},
DNSServers: []string{"10.1.1.1"},
IPConfigs: []types.IPConfig{{IPAddress: netip.MustParsePrefix("198.51.100.9/24"), Gateway: "198.51.100.1"}},
DNSServers: []string{"198.51.100.1"},
},
},
}
Expand Down Expand Up @@ -310,8 +310,8 @@ func TestISOInjectorInject_Unsupported(t *testing.T) {
NetworkRenderer: cloudinit.NewNetworkConfig([]types.NetworkConfigData{
{
Name: "eth0",
IPConfigs: []types.IPConfig{{IPAddress: netip.MustParsePrefix("10.1.1.6/24"), Gateway: "10.1.1.1"}},
DNSServers: []string{"8.8.8.8", "8.8.4.4"},
IPConfigs: []types.IPConfig{{IPAddress: netip.MustParsePrefix("198.51.100.6/24"), Gateway: "198.51.100.1"}},
DNSServers: []string{"192.0.2.53", "192.0.2.54"},
},
}),
}
Expand Down
Loading