Skip to content

Commit a59d8f9

Browse files
committed
docs: Update CUDN CRD API reference
This commit changes are result of the following command: crd-ref-docs --source-path ./go-controller/pkg/crd/userdefinednetwork --config=crd-docs-config.yaml --renderer=markdown --output-path=./docs/api-reference/userdefinednetwork-api-spec.md Signed-off-by: Or Mergi <[email protected]>
1 parent 87e9335 commit a59d8f9

File tree

1 file changed

+91
-15
lines changed

1 file changed

+91
-15
lines changed

docs/api-reference/userdefinednetwork-api-spec.md

Lines changed: 91 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,22 @@ Package v1 contains API Schema definitions for the network v1 API group
1616

1717

1818

19+
#### AccessVLANConfig
20+
21+
22+
23+
AccessVLANConfig describes an access VLAN configuration.
24+
25+
26+
27+
_Appears in:_
28+
- [VLANConfig](#vlanconfig)
29+
30+
| Field | Description | Default | Validation |
31+
| --- | --- | --- | --- |
32+
| `id` _integer_ | id is the VLAN ID (VID) to be set for the network.<br />id should be higher than 0 and lower than 4095. | | Maximum: 4094 <br />Minimum: 1 <br /> |
33+
34+
1935
#### CIDR
2036

2137
_Underlying type:_ _string_
@@ -28,6 +44,7 @@ _Validation:_
2844
_Appears in:_
2945
- [DualStackCIDRs](#dualstackcidrs)
3046
- [Layer3Subnet](#layer3subnet)
47+
- [LocalnetConfig](#localnetconfig)
3148

3249

3350

@@ -116,6 +133,7 @@ _Validation:_
116133
_Appears in:_
117134
- [Layer2Config](#layer2config)
118135
- [Layer3Config](#layer3config)
136+
- [LocalnetConfig](#localnetconfig)
119137

120138

121139

@@ -130,11 +148,12 @@ _Validation:_
130148

131149
_Appears in:_
132150
- [Layer2Config](#layer2config)
151+
- [LocalnetConfig](#localnetconfig)
133152

134153
| Field | Description | Default | Validation |
135154
| --- | --- | --- | --- |
136155
| `mode` _[IPAMMode](#ipammode)_ | Mode controls how much of the IP configuration will be managed by OVN.<br />`Enabled` means OVN-Kubernetes will apply IP configuration to the SDN infrastructure and it will also assign IPs<br />from the selected subnet to the individual pods.<br />`Disabled` means OVN-Kubernetes will only assign MAC addresses and provide layer 2 communication, letting users<br />configure IP addresses for the pods.<br />`Disabled` is only available for Secondary networks.<br />By disabling IPAM, any Kubernetes features that rely on selecting pods by IP will no longer function<br />(such as network policy, services, etc). Additionally, IP port security will also be disabled for interfaces attached to this network.<br />Defaults to `Enabled`. | | Enum: [Enabled Disabled] <br /> |
137-
| `lifecycle` _[NetworkIPAMLifecycle](#networkipamlifecycle)_ | Lifecycle controls IP addresses management lifecycle.<br />The only allowed value is Persistent. When set, OVN Kubernetes assigned IP addresses will be persisted in an<br />`ipamclaims.k8s.cni.cncf.io` object. These IP addresses will be reused by other pods if requested.<br />Only supported when mode is `Enabled`. | | Enum: [Persistent] <br /> |
156+
| `lifecycle` _[NetworkIPAMLifecycle](#networkipamlifecycle)_ | Lifecycle controls IP addresses management lifecycle.<br /><br />The only allowed value is Persistent. When set, the IP addresses assigned by OVN Kubernetes will be persisted in an<br />`ipamclaims.k8s.cni.cncf.io` object. These IP addresses will be reused by other pods if requested.<br />Only supported when mode is `Enabled`. | | Enum: [Persistent] <br /> |
138157

139158

140159
#### IPAMMode
@@ -169,10 +188,10 @@ _Appears in:_
169188

170189
| Field | Description | Default | Validation |
171190
| --- | --- | --- | --- |
172-
| `role` _[NetworkRole](#networkrole)_ | Role describes the network role in the pod.<br />Allowed value is "Secondary".<br />Secondary network is only assigned to pods that use `k8s.v1.cni.cncf.io/networks` annotation to select given network. | | Enum: [Primary Secondary] <br />Required: \{\} <br /> |
191+
| `role` _[NetworkRole](#networkrole)_ | Role describes the network role in the pod.<br /><br />Allowed value is "Secondary".<br />Secondary network is only assigned to pods that use `k8s.v1.cni.cncf.io/networks` annotation to select given network. | | Enum: [Primary Secondary] <br />Required: \{\} <br /> |
173192
| `mtu` _integer_ | MTU is the maximum transmission unit for a network.<br />MTU is optional, if not provided, the globally configured value in OVN-Kubernetes (defaults to 1400) is used for the network. | | Maximum: 65536 <br />Minimum: 576 <br /> |
174-
| `subnets` _[DualStackCIDRs](#dualstackcidrs)_ | Subnets are used for the pod network across the cluster.<br />Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.<br />The format should match standard CIDR notation (for example, "10.128.0.0/16").<br />This field must be omitted if `ipam.mode` is `Disabled`. | | MaxItems: 2 <br />MaxLength: 43 <br />MinItems: 1 <br /> |
175-
| `joinSubnets` _[DualStackCIDRs](#dualstackcidrs)_ | JoinSubnets are used inside the OVN network topology.<br />Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.<br />This field is only allowed for "Primary" network.<br />It is not recommended to set this field without explicit need and understanding of the OVN network topology.<br />When omitted, the platform will choose a reasonable default which is subject to change over time. | | MaxItems: 2 <br />MaxLength: 43 <br />MinItems: 1 <br /> |
193+
| `subnets` _[DualStackCIDRs](#dualstackcidrs)_ | Subnets are used for the pod network across the cluster.<br />Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.<br /><br />The format should match standard CIDR notation (for example, "10.128.0.0/16").<br />This field must be omitted if `ipam.mode` is `Disabled`. | | MaxItems: 2 <br />MaxLength: 43 <br />MinItems: 1 <br /> |
194+
| `joinSubnets` _[DualStackCIDRs](#dualstackcidrs)_ | JoinSubnets are used inside the OVN network topology.<br /><br />Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.<br />This field is only allowed for "Primary" network.<br />It is not recommended to set this field without explicit need and understanding of the OVN network topology.<br />When omitted, the platform will choose a reasonable default which is subject to change over time. | | MaxItems: 2 <br />MaxLength: 43 <br />MinItems: 1 <br /> |
176195
| `ipam` _[IPAMConfig](#ipamconfig)_ | IPAM section contains IPAM-related configuration for the network. | | MinProperties: 1 <br /> |
177196

178197

@@ -190,10 +209,10 @@ _Appears in:_
190209

191210
| Field | Description | Default | Validation |
192211
| --- | --- | --- | --- |
193-
| `role` _[NetworkRole](#networkrole)_ | Role describes the network role in the pod.<br />Allowed values are "Primary" and "Secondary".<br />Primary network is automatically assigned to every pod created in the same namespace.<br />Secondary network is only assigned to pods that use `k8s.v1.cni.cncf.io/networks` annotation to select given network. | | Enum: [Primary Secondary] <br />Required: \{\} <br /> |
194-
| `mtu` _integer_ | MTU is the maximum transmission unit for a network.<br />MTU is optional, if not provided, the globally configured value in OVN-Kubernetes (defaults to 1400) is used for the network. | | Maximum: 65536 <br />Minimum: 576 <br /> |
195-
| `subnets` _[Layer3Subnet](#layer3subnet) array_ | Subnets are used for the pod network across the cluster.<br />Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.<br />Given subnet is split into smaller subnets for every node. | | MaxItems: 2 <br />MinItems: 1 <br /> |
196-
| `joinSubnets` _[DualStackCIDRs](#dualstackcidrs)_ | JoinSubnets are used inside the OVN network topology.<br />Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.<br />This field is only allowed for "Primary" network.<br />It is not recommended to set this field without explicit need and understanding of the OVN network topology.<br />When omitted, the platform will choose a reasonable default which is subject to change over time. | | MaxItems: 2 <br />MaxLength: 43 <br />MinItems: 1 <br /> |
212+
| `role` _[NetworkRole](#networkrole)_ | Role describes the network role in the pod.<br /><br />Allowed values are "Primary" and "Secondary".<br />Primary network is automatically assigned to every pod created in the same namespace.<br />Secondary network is only assigned to pods that use `k8s.v1.cni.cncf.io/networks` annotation to select given network. | | Enum: [Primary Secondary] <br />Required: \{\} <br /> |
213+
| `mtu` _integer_ | MTU is the maximum transmission unit for a network.<br /><br />MTU is optional, if not provided, the globally configured value in OVN-Kubernetes (defaults to 1400) is used for the network. | | Maximum: 65536 <br />Minimum: 576 <br /> |
214+
| `subnets` _[Layer3Subnet](#layer3subnet) array_ | Subnets are used for the pod network across the cluster.<br /><br />Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.<br />Given subnet is split into smaller subnets for every node. | | MaxItems: 2 <br />MinItems: 1 <br /> |
215+
| `joinSubnets` _[DualStackCIDRs](#dualstackcidrs)_ | JoinSubnets are used inside the OVN network topology.<br /><br />Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.<br />This field is only allowed for "Primary" network.<br />It is not recommended to set this field without explicit need and understanding of the OVN network topology.<br />When omitted, the platform will choose a reasonable default which is subject to change over time. | | MaxItems: 2 <br />MaxLength: 43 <br />MinItems: 1 <br /> |
197216

198217

199218
#### Layer3Subnet
@@ -210,7 +229,29 @@ _Appears in:_
210229
| Field | Description | Default | Validation |
211230
| --- | --- | --- | --- |
212231
| `cidr` _[CIDR](#cidr)_ | CIDR specifies L3Subnet, which is split into smaller subnets for every node. | | MaxLength: 43 <br /> |
213-
| `hostSubnet` _integer_ | HostSubnet specifies the subnet size for every node.<br />When not set, it will be assigned automatically. | | Maximum: 127 <br />Minimum: 1 <br /> |
232+
| `hostSubnet` _integer_ | HostSubnet specifies the subnet size for every node.<br /><br />When not set, it will be assigned automatically. | | Maximum: 127 <br />Minimum: 1 <br /> |
233+
234+
235+
#### LocalnetConfig
236+
237+
238+
239+
240+
241+
242+
243+
_Appears in:_
244+
- [NetworkSpec](#networkspec)
245+
246+
| Field | Description | Default | Validation |
247+
| --- | --- | --- | --- |
248+
| `role` _[NetworkRole](#networkrole)_ | role describes the network role in the pod, required.<br />Controls whether the pod interface will act as primary or secondary.<br />Localnet topology supports `Secondary` only.<br />The network will be assigned to pods that have the `k8s.v1.cni.cncf.io/networks` annotation in place pointing<br />to subject. | | Enum: [Secondary] <br /> |
249+
| `physicalNetworkName` _string_ | physicalNetworkName points to the OVS bridge-mapping's network-name configured in the nodes, required.<br />Min length is 1, max length is 253, cannot contain `,` or `:` characters.<br />In case OVS bridge-mapping is defined by Kubernetes-nmstate with `NodeNetworkConfigurationPolicy` (NNCP),<br />this field should point to the NNCP `spec.desiredState.ovn.bridge-mappings` item's `localnet` value. | | MaxLength: 253 <br />MinLength: 1 <br /> |
250+
| `subnets` _[DualStackCIDRs](#dualstackcidrs)_ | subnets is a list of subnets used for pods in this localnet network across the cluster.<br />The list may be either 1 IPv4 subnet, 1 IPv6 subnet, or 1 of each IP family.<br />When set, OVN-Kubernetes assigns an IP address from the specified CIDRs to the connected pod,<br />eliminating the need for manual IP assignment or reliance on an external IPAM service (e.g., a DHCP server).<br />subnets is optional. When omitted OVN-Kubernetes won't assign IP address automatically.<br />Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.<br />The format should match standard CIDR notation (for example, "10.128.0.0/16").<br />This field must be omitted if `ipam.mode` is `Disabled`.<br />When physicalNetworkName points to the OVS bridge mapping of a network that provides IPAM services<br />(e.g., a DHCP server), ipam.mode should be set to Disabled. This turns off OVN-Kubernetes IPAM and avoids<br />conflicts with the existing IPAM services on this localnet network. | | MaxItems: 2 <br />MaxLength: 43 <br />MinItems: 1 <br /> |
251+
| `excludeSubnets` _[CIDR](#cidr) array_ | excludeSubnets is a list of CIDRs to be removed from the specified CIDRs in `subnets`.<br />The CIDRs in this list must be in range of at least one subnet specified in `subnets`.<br />excludeSubnets is optional. When omitted no IP address is excluded and all IP addresses specified in `subnets`<br />are subject to assignment.<br />The format should match standard CIDR notation (for example, "10.128.0.0/16").<br />This field must be omitted if `subnets` is unset or `ipam.mode` is `Disabled`.<br />When `physicalNetworkName` points to OVS bridge mapping of a network with reserved IP addresses<br />(which shouldn't be assigned by OVN-Kubernetes), the specified CIDRs will not be assigned. For example:<br />Given: `subnets: "10.0.0.0/24"`, `excludeSubnets: "10.0.0.200/30", the following addresses will not be assigned<br />to pods: `10.0.0.201`, `10.0.0.202`. | | MaxItems: 25 <br />MaxLength: 43 <br />MinItems: 1 <br /> |
252+
| `ipam` _[IPAMConfig](#ipamconfig)_ | ipam configurations for the network.<br />ipam is optional. When omitted, `subnets` must be specified.<br />When `ipam.mode` is `Disabled`, `subnets` must be omitted.<br />`ipam.mode` controls how much of the IP configuration will be managed by OVN.<br /> When `Enabled`, OVN-Kubernetes will apply IP configuration to the SDN infra and assign IPs from the selected<br /> subnet to the pods.<br /> When `Disabled`, OVN-Kubernetes only assigns MAC addresses, and provides layer2 communication, and enables users<br /> to configure IP addresses on the pods.<br />`ipam.lifecycle` controls IP addresses management lifecycle.<br /> When set to 'Persistent', the assigned IP addresses will be persisted in `ipamclaims.k8s.cni.cncf.io` object.<br /> Useful for VMs, IP address will be persistent after restarts and migrations. Supported when `ipam.mode` is `Enabled`. | | MinProperties: 1 <br /> |
253+
| `mtu` _integer_ | mtu is the maximum transmission unit for a network.<br />mtu is optional. When omitted, the configured value in OVN-Kubernetes (defaults to 1500 for localnet topology)<br />is used for the network.<br />Minimum value for IPv4 subnet is 576, and for IPv6 subnet is 1280.<br />Maximum value is 65536.<br />In a scenario `physicalNetworkName` points to OVS bridge mapping of a network configured with certain MTU settings,<br />this field enables configuring the same MTU on pod interface, having the pod MTU aligned with the network MTU.<br />Misaligned MTU across the stack (e.g.: pod has MTU X, node NIC has MTU Y), could result in network disruptions<br />and bad performance. | | Maximum: 65536 <br />Minimum: 576 <br /> |
254+
| `vlan` _[VLANConfig](#vlanconfig)_ | vlan configuration for the network.<br />vlan.mode is the VLAN mode.<br /> When "Access" is set, OVN-Kubernetes configures the network logical switch port in access mode.<br />vlan.access is the access VLAN configuration.<br />vlan.access.id is the VLAN ID (VID) to be set on the network logical switch port.<br />vlan is optional, when omitted the underlying network default VLAN will be used (usually `1`).<br />When set, OVN-Kubernetes will apply VLAN configuration to the SDN infra and to the connected pods. | | |
214255

215256

216257
#### NetworkIPAMLifecycle
@@ -236,12 +277,12 @@ _Underlying type:_ _string_
236277

237278

238279

239-
_Validation:_
240-
- Enum: [Primary Secondary]
280+
241281

242282
_Appears in:_
243283
- [Layer2Config](#layer2config)
244284
- [Layer3Config](#layer3config)
285+
- [LocalnetConfig](#localnetconfig)
245286

246287
| Field | Description |
247288
| --- | --- |
@@ -262,9 +303,10 @@ _Appears in:_
262303

263304
| Field | Description | Default | Validation |
264305
| --- | --- | --- | --- |
265-
| `topology` _[NetworkTopology](#networktopology)_ | Topology describes network configuration.<br />Allowed values are "Layer3", "Layer2".<br />Layer3 topology creates a layer 2 segment per node, each with a different subnet. Layer 3 routing is used to interconnect node subnets.<br />Layer2 topology creates one logical switch shared by all nodes. | | Enum: [Layer2 Layer3] <br />Required: \{\} <br /> |
306+
| `topology` _[NetworkTopology](#networktopology)_ | Topology describes network configuration.<br /><br />Allowed values are "Layer3", "Layer2" and "Localnet".<br />Layer3 topology creates a layer 2 segment per node, each with a different subnet. Layer 3 routing is used to interconnect node subnets.<br />Layer2 topology creates one logical switch shared by all nodes.<br />Localnet topology is based on layer 2 topology, but also allows connecting to an existent (configured) physical network to provide north-south traffic to the workloads. | | Enum: [Layer2 Layer3 Localnet] <br />Required: \{\} <br /> |
266307
| `layer3` _[Layer3Config](#layer3config)_ | Layer3 is the Layer3 topology configuration. | | |
267308
| `layer2` _[Layer2Config](#layer2config)_ | Layer2 is the Layer2 topology configuration. | | |
309+
| `localnet` _[LocalnetConfig](#localnetconfig)_ | Localnet is the Localnet topology configuration. | | |
268310

269311

270312
#### NetworkTopology
@@ -273,15 +315,15 @@ _Underlying type:_ _string_
273315

274316

275317

276-
_Validation:_
277-
- Enum: [Layer2 Layer3]
318+
278319

279320
_Appears in:_
280321
- [NetworkSpec](#networkspec)
281322
- [UserDefinedNetworkSpec](#userdefinednetworkspec)
282323

283324
| Field | Description |
284325
| --- | --- |
326+
| `Localnet` | |
285327
| `Layer2` | |
286328
| `Layer3` | |
287329

@@ -337,7 +379,7 @@ _Appears in:_
337379

338380
| Field | Description | Default | Validation |
339381
| --- | --- | --- | --- |
340-
| `topology` _[NetworkTopology](#networktopology)_ | Topology describes network configuration.<br />Allowed values are "Layer3", "Layer2".<br />Layer3 topology creates a layer 2 segment per node, each with a different subnet. Layer 3 routing is used to interconnect node subnets.<br />Layer2 topology creates one logical switch shared by all nodes. | | Enum: [Layer2 Layer3] <br />Required: \{\} <br /> |
382+
| `topology` _[NetworkTopology](#networktopology)_ | Topology describes network configuration.<br /><br />Allowed values are "Layer3", "Layer2".<br />Layer3 topology creates a layer 2 segment per node, each with a different subnet. Layer 3 routing is used to interconnect node subnets.<br />Layer2 topology creates one logical switch shared by all nodes. | | Enum: [Layer2 Layer3] <br />Required: \{\} <br /> |
341383
| `layer3` _[Layer3Config](#layer3config)_ | Layer3 is the Layer3 topology configuration. | | |
342384
| `layer2` _[Layer2Config](#layer2config)_ | Layer2 is the Layer2 topology configuration. | | |
343385

@@ -358,3 +400,37 @@ _Appears in:_
358400
| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | | | |
359401

360402

403+
#### VLANConfig
404+
405+
406+
407+
VLANConfig describes the network VLAN configuration.
408+
409+
410+
411+
_Appears in:_
412+
- [LocalnetConfig](#localnetconfig)
413+
414+
| Field | Description | Default | Validation |
415+
| --- | --- | --- | --- |
416+
| `mode` _[VLANMode](#vlanmode)_ | mode describe the network VLAN mode.<br />Allowed value is "Access".<br />Access sets the network logical switch port in access mode, according to the config. | | Enum: [Access] <br /> |
417+
| `access` _[AccessVLANConfig](#accessvlanconfig)_ | Access is the access VLAN configuration | | |
418+
419+
420+
#### VLANMode
421+
422+
_Underlying type:_ _string_
423+
424+
425+
426+
_Validation:_
427+
- Enum: [Access]
428+
429+
_Appears in:_
430+
- [VLANConfig](#vlanconfig)
431+
432+
| Field | Description |
433+
| --- | --- |
434+
| `Access` | |
435+
436+

0 commit comments

Comments
 (0)