Skip to content

API Reference

Packages

k8s.ovn.org/v1

Package v1 contains API Schema definitions for the ClusterNetworkConnect v1 API group

Resource Types

CIDR

Underlying type: string

Validation: - MaxLength: 43

Appears in: - ConnectSubnet

ClusterNetworkConnect

ClusterNetworkConnect enables connecting multiple User Defined Networks and/or Cluster User Defined Networks together.

Appears in: - ClusterNetworkConnectList

Field Description Default Validation
apiVersion string k8s.ovn.org/v1
kind string ClusterNetworkConnect
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec ClusterNetworkConnectSpec Required: {}
status ClusterNetworkConnectStatus

ClusterNetworkConnectList

ClusterNetworkConnectList contains a list of ClusterNetworkConnect.

Field Description Default Validation
apiVersion string k8s.ovn.org/v1
kind string ClusterNetworkConnectList
metadata ListMeta Refer to Kubernetes API documentation for fields of metadata.
items ClusterNetworkConnect array

ClusterNetworkConnectSpec

ClusterNetworkConnectSpec defines the desired state of ClusterNetworkConnect.

Appears in: - ClusterNetworkConnect

Field Description Default Validation
networkSelectors NetworkSelectors networkSelectors selects the networks to be connected together.
This can match User Defined Networks (UDNs) and/or Cluster User Defined Networks (CUDNs).
Only ClusterUserDefinedNetworkSelector and PrimaryUserDefinedNetworkSelector can be selected.
Required: {}
connectSubnets ConnectSubnet array connectSubnets specifies the subnets used for interconnecting the selected networks.
This creates a shared subnet space that connected networks can use to communicate.
Can have at most 1 CIDR for each IP family (IPv4 and IPv6).
Must not overlap with:
any of the pod subnets used by the selected networks.
any of the transit subnets used by the selected networks.
any of the service CIDR range used in the cluster.
any of the join subnet of the selected networks to be connected.
any of the masquerade subnet range used in the cluster.
any of the node subnets chosen by the platform.
any of other connect subnets for other ClusterNetworkConnects that might be selecting same networks.
Does not have a default value for the above reason so
that user takes care in setting non-overlapping subnets.
MaxItems: 2
MinItems: 1
Required: {}
connectivity ConnectivityType array connectivity specifies which connectivity types should be enabled for the connected networks. Enum: [PodNetwork ServiceNetwork]
MaxItems: 2
MinItems: 1
Required: {}

ClusterNetworkConnectStatus

ClusterNetworkConnectStatus defines the observed state of ClusterNetworkConnect.

Appears in: - ClusterNetworkConnect

Field Description Default Validation
status StatusType status is a concise indication of whether the ClusterNetworkConnect
resource is applied with success.
Enum: [Success Failure]
Optional: {}
conditions Condition array conditions is an array of condition objects indicating details about
status of ClusterNetworkConnect object.

ConnectSubnet

Appears in: - ClusterNetworkConnectSpec

Field Description Default Validation
cidr CIDR CIDR specifies ConnectSubnet, which is split into smaller subnets for every connected network.
This CIDR should be containing 2((Number of L3 networksMax Number of Nodes)+Number of L2 networks) IPs.
Example: cidr= "192.168.0.0/16", networkPrefix=24 and if the cluster has 128 nodes that means that you can
connect 256 layer3 networks and 0 layer2 networks OR 255 layer3 networks and 128 layer2 networks.
CIDR also restricts the maximum number of networks that can be connected together
based on what CIDR range is picked. So choosing a large enough CIDR for future use cases
is important.
The largest CIDR that can be used for this field is /16 (65536 IPs) because OVN
has a limit of 32K(2^15) tunnel keys per router. So we will only ever have 32K /31 or /127 slices
which is 2^16 IPs.
Having a CIDR greater than /16 will not be utilized fully for the same reason.
MaxLength: 43
networkPrefix integer NetworkPrefix specifies the prefix length for every connected network.
This prefix length should be equal to or longer than the length of the CIDR prefix.
For example, if the CIDR is 10.0.0.0/16 and the networkPrefix is 24,
then the connect subnet for each connected layer3 network will be 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/24 etc.
For layer2 networks we will allocate the next available /networkPrefix range
that is then split into /31 or /127 slices for each layer2 network
A good practice is to set this to a value that ensures it contains more
than twice the number of maximum nodes planned to be deployed in the cluster.
Each node gets a /31 subnet for the layer3 networks, hence networkPrefix should
contain enough IPs for 4 times the maximum nodes planned
Example - recommended values:
if you plan to deploy 10 nodes, set the networkPrefix to /26 (40+ IPs)
if you plan to deploy 100 nodes, set the networkPrefix to /23 (400+ IPs)
if you plan to deploy 1000 nodes, set the networkPrefix to /20 (4000+ IPs)
if you plan to deploy 5000 nodes, set the networkPrefix to /17 (20000+ IPs)
This field restricts the maximum number of nodes that can be deployed in the cluster
and hence its good to plan this value carefully along with the CIDR.
Maximum: 127
Minimum: 1

ConnectivityType

Underlying type: string

ConnectivityType represents the different connectivity types that can be enabled for connected networks.

Validation: - Enum: [PodNetwork ServiceNetwork]

Appears in: - ClusterNetworkConnectSpec

Field Description
PodNetwork PodNetwork enables direct pod-to-pod communication across connected networks.
ServiceNetwork ServiceNetwork enables ClusterIP service access across connected networks.
Note that services of type nodeports and loadbalancers are already reachable
across networks by default.

StatusType

Underlying type: string

StatusType represents the status of a ClusterNetworkConnect.

Validation: - Enum: [Success Failure]

Appears in: - ClusterNetworkConnectStatus

Field Description
Success Success indicates that the ClusterNetworkConnect has been successfully applied.
Failure Failure indicates that the ClusterNetworkConnect has failed to be applied.