Skip to content

Commit 26d9156

Browse files
authored
Write docs for the new v0.7 features (#453)
* Write docs for the new v0.7 features This PR adds documentation on the v0.7 features: * Custom Allowed Nodes * Custom IP Pool Config * Add docs for setting TLS cert in capmox
1 parent 4bab7b5 commit 26d9156

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

docs/advanced-setups.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,103 @@ For the Proxmox API user/token you create for CAPMOX, these are the minimum requ
211211
* CAPMOX needs `PVEDataStoreAdmin` on a storage suitable for ISO images for cloud-init. Create a dedicated storage for this (you can use subdirectories in an existing network share for example).
212212
* CAPMOX needs `AllocateSpace` permissions on a storage suitable for disc images. This can be shared with other users as it is only accessed indirectly by cloning/deleting VMs.
213213

214+
## Proxmox TLS communication
215+
216+
The default behavior of the Proxmox API is to skip TLS verification when communicating with the Proxmox API,
217+
The `PROXMOX_INSECURE` environment variable is set to `true` by default in the CAPMOX manager, to skip the verification of the TLS certificate with the Proxmox API.
218+
```
219+
containers:
220+
- name: manager
221+
args:
222+
- --leader-elect
223+
- --feature-gates=ClusterTopology=true
224+
- "--metrics-bind-address=localhost:8080"
225+
- "--v=0"
226+
env:
227+
- name: PROXMOX_INSECURE
228+
value: "true"
229+
```
230+
231+
If you want to use a certificate for communication with the Proxmox API, you can set the `proxmox-root-cert-file` flag variable to the path of the certificate file, and
232+
set the `PROXMOX_INSECURE` environment variable to `false`.
233+
234+
```yaml
235+
containers:
236+
- name: manager
237+
args:
238+
- --leader-elect
239+
- --feature-gates=ClusterTopology=true
240+
- "--metrics-bind-address=localhost:8080"
241+
- "--v=0"
242+
- "--proxmox-root-cert-file=/var/lib/proxmox/certs/root-ca.pem"
243+
env:
244+
- name: PROXMOX_INSECURE
245+
value: "false"
246+
volumeMounts:
247+
- name: proxmox-root-cert
248+
mountPath: /var/lib/proxmox/certs
249+
readOnly: true
250+
251+
volumes:
252+
- name: proxmox-root-cert
253+
secret:
254+
secretName: proxmox-root-cert
255+
256+
```
257+
258+
259+
## Custom Allowed Nodes for ProxmoxMachine
260+
261+
Previously, the Proxmox nodes that will host the Machines are defined in `ProxmoxCluster.spec.allowedNodes`, that config restrict us from placing some set of machines into some specific nodes.
262+
Now, you can also define and override the `allowedNodes` in the ProxmoxMachine, to do so:
263+
264+
```diff
265+
kind: ProxmoxMachineTemplate
266+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
267+
metadata:
268+
name: "test-control-plane"
269+
spec:
270+
template:
271+
spec:
272+
sourceNode: "pve"
273+
templateID: 1000
274+
format: "qcow2"
275+
full: true
276+
+ allowedNodes: ["pve-1", "pve-3", "pve-4"]
277+
```
278+
279+
With the following config, you can override what has been set in the Proxmox Cluster, and also you have more flexibility for example you can have a custom allowed Nodes per Machine Deployments.
280+
281+
## Custom Default Network IP Pool for ProxmoxMachine
282+
283+
Like the Allowed Nodes, in the past we couldn't set a custom IP Pool for the default network device, everything was tied to the ProxmoxCluster IP Config.
284+
Now, you can also customize the IP Pool for the default network device, just by setting the `ipv4PoolRef` and/or `ipv6PoolRef`.
285+
286+
```diff
287+
kind: ProxmoxMachineTemplate
288+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
289+
metadata:
290+
name: "test-control-plane"
291+
spec:
292+
template:
293+
spec:
294+
sourceNode: "pve"
295+
templateID: 1000
296+
format: "qcow2"
297+
full: true
298+
network:
299+
default:
300+
bridge: ${BRIDGE}
301+
model: virtio
302+
+ ipv4PoolRef:
303+
+ apiGroup: ipam.cluster.x-k8s.io
304+
+ kind: GlobalInClusterIPPool
305+
+ name: shared-inclusterippool
306+
```
307+
308+
You can set either `ipv4PoolRef` or `ipv6PoolRef` or you can also set them both for dual-stack.
309+
It's up for you also to manage the IP Pool, you can choose a `GlobalInClusterIPPool` or an `InClusterIPPool`.
310+
214311
## Notes
215312

216313
* Clusters with IPV6 only is supported.

0 commit comments

Comments
 (0)