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 8519304
Browse filesBrowse the repository at this point in the historyBrowse files
feat(vm-instance): allow pinning a static IP on secondary interfaces
`networks[].name` is the only per-interface field the chart exposes, so a
tenant cannot choose the address of a VM's secondary interface, and
`VMInstance.status` does not report it either.
kube-ovn already accepts a per-network annotation for exactly this,
`<nad>.<namespace>.ovn.kubernetes.io/ip_address`. This adds an optional
`networks[].ipAddress` that renders it. The key is built from the same two
expressions the template already uses to compose the multus reference
`<namespace>/<nad>`, so the annotated network and the attached network cannot
disagree. That matters more than it looks: a key kube-ovn does not recognise
is ignored silently, with no admission error, and IPAM then allocates some
other address.
Rendering is unchanged byte for byte when `ipAddress` is unset. With it set,
exactly one annotation line is added, for each interface that asks for one.
`subnets`, the deprecated alias of `networks`, shares the `Network` type and
so gains the field as well; it resolves through the same variable.
No CIDR membership check: the chart does not know the subnet, which belongs
to the `vpc` application. kube-ovn rejects an address outside the subnet.
Generated files are updated accordingly, and unit tests cover the rendered
annotation, its absence, the per-interface scoping and the deprecated alias.
Co-Authored-By: Claude Opus 5 <[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. Empty lets kube-ovn IPAM allocate one. The address must belong to the subnet CIDR; kube-ovn rejects one outside it. |`string`|`""`|
54
+
|`subnets`| Deprecated: use networks instead. |`[]object`|`[]`|
|`subnets[i].ipAddress`| Static IPv4 address for this interface. Empty lets kube-ovn IPAM allocate one. The address must belong to the subnet CIDR; kube-ovn rejects one outside it. |`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`|`""`|
Copy file name to clipboardExpand all lines: packages/apps/vm-instance/values.schema.json
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,10 @@
90
90
"items": {
91
91
"type": "object",
92
92
"properties": {
93
+
"ipAddress": {
94
+
"description": "Static IPv4 address for this interface. Empty lets kube-ovn IPAM allocate one. The address must belong to the subnet CIDR; kube-ovn rejects one outside it.",
95
+
"type": "string"
96
+
},
93
97
"name": {
94
98
"description": "Network attachment name.",
95
99
"type": "string",
@@ -107,6 +111,10 @@
107
111
"items": {
108
112
"type": "object",
109
113
"properties": {
114
+
"ipAddress": {
115
+
"description": "Static IPv4 address for this interface. Empty lets kube-ovn IPAM allocate one. The address must belong to the subnet CIDR; kube-ovn rejects one outside it.",
## @field {string} [ipAddress] - Static IPv4 address for this interface. Empty lets kube-ovn IPAM allocate one. The address must belong to the subnet CIDR; kube-ovn rejects one outside it.
0 commit comments