You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5187e11
Browse filesBrowse the repository at this point in the historyBrowse files
feat(vm-instance): pin a static IP on secondary interfaces on both network backends
networks[] exposes a single field per interface, name. A tenant can attach a
VM to a VPC network but cannot choose the interface's address, and nothing
reports the allocated one either. Add an optional networks[].ipAddress and
pin it through whichever backend the cluster serves, picked from API
discovery, never from a lookup.
Kube-OVN (kubeovn.io/v1 IP served) reads a per-network annotation key,
<nad>.<namespace>.ovn.kubernetes.io/ip_address, on the launcher pod.
Cozyplane (sdn.cozystack.io/v1alpha1 VPC served, Kube-OVN absent) reads one
launcher pod annotation, sdn.cozystack.io/networks: a JSON list with an entry
per pinned NIC keyed by the VPC the NetworkAttachmentDefinition names. Both
keys are composed from the same <namespace>/<network> expressions the multus
reference uses, so a pinned network and an attached network cannot disagree;
a key the backend does not recognise is ignored without any admission error.
With neither backend served the render fails: a value that would be dropped
silently is worse than a render that says why it stopped.
Without ipAddress nothing changes: the rendering is byte-identical on every
backend, so existing VMs are untouched. The suite drives both branches from
the capability set, mocks the Kube-OVN IP object to pin that the historical
pod-network annotations keep rendering next to the new key, and is red on
the previous template for every pinning case.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: lfneosequentia <[email protected]>
|`external`| Enable external access from outside the cluster. |`bool`|`false`|
42
-
|`externalMethod`| Method to pass through traffic to the VM. |`string`|`PortList`|
43
-
|`externalPorts`| Ports to forward from outside the cluster. |`[]int`|`[22]`|
44
-
|`externalAllowICMP`| Whether to accept ICMP traffic to the VM in PortList mode (preserves ping and PMTU discovery). No effect in WholeIP mode. Default true so ping behaves as users expect even when port filtering is in effect. |`bool`|`true`|
45
-
|`runStrategy`| Requested running state of the VirtualMachineInstance |`string`|`Always`|
|`gpus`| List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM). |`[]object`|`[]`|
56
-
|`gpus[i].name`| The name of the GPU resource to attach. |`string`|`""`|
57
-
|`cpuModel`| Model specifies the CPU model inside the VMI. List of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map|`string`|`""`|
58
-
|`resources`| Resource configuration for the virtual machine. |`object`|`{}`|
59
-
|`resources.cpu`| Number of CPU cores allocated. |`quantity`|`""`|
60
-
|`resources.memory`| Amount of memory allocated. |`quantity`|`""`|
61
-
|`resources.sockets`| Number of CPU sockets (vCPU topology). |`quantity`|`""`|
62
-
|`sshKeys`| List of SSH public keys for authentication. |`[]string`|`[]`|
63
-
|`cloudInit`| Cloud-init user data. |`string`|`""`|
64
-
|`cloudInitSeed`| Seed string to generate SMBIOS UUID for the VM. |`string`|`""`|
|`external`| Enable external access from outside the cluster. |`bool`|`false`|
42
+
|`externalMethod`| Method to pass through traffic to the VM. |`string`|`PortList`|
43
+
|`externalPorts`| Ports to forward from outside the cluster. |`[]int`|`[22]`|
44
+
|`externalAllowICMP`| Whether to accept ICMP traffic to the VM in PortList mode (preserves ping and PMTU discovery). No effect in WholeIP mode. Default true so ping behaves as users expect even when port filtering is in effect. |`bool`|`true`|
45
+
|`runStrategy`| Requested running state of the VirtualMachineInstance |`string`|`Always`|
|`networks[i].ipAddress`| Static IPv4 address for this interface, pinned through the network backend the cluster serves (Kube-OVN or Cozyplane). Empty lets IPAM allocate one. The address must be free and inside the network CIDR; the backend refuses the VM otherwise. |`string`|`""`|
54
+
|`subnets`| Deprecated: use networks instead. |`[]object`|`[]`|
|`subnets[i].ipAddress`| Static IPv4 address for this interface, pinned through the network backend the cluster serves (Kube-OVN or Cozyplane). Empty lets IPAM allocate one. The address must be free and inside the network CIDR; the backend refuses the VM otherwise. |`string`|`""`|
57
+
|`gpus`| List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM). |`[]object`|`[]`|
58
+
|`gpus[i].name`| The name of the GPU resource to attach. |`string`|`""`|
59
+
|`cpuModel`| Model specifies the CPU model inside the VMI. List of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map|`string`|`""`|
60
+
|`resources`| Resource configuration for the virtual machine. |`object`|`{}`|
61
+
|`resources.cpu`| Number of CPU cores allocated. |`quantity`|`""`|
62
+
|`resources.memory`| Amount of memory allocated. |`quantity`|`""`|
63
+
|`resources.sockets`| Number of CPU sockets (vCPU topology). |`quantity`|`""`|
64
+
|`sshKeys`| List of SSH public keys for authentication. |`[]string`|`[]`|
65
+
|`cloudInit`| Cloud-init user data. |`string`|`""`|
66
+
|`cloudInitSeed`| Seed string to generate SMBIOS UUID for the VM. |`string`|`""`|
0 commit comments