diff --git a/operator/v1/0000_70_cluster-network-operator_01.crd.yaml b/operator/v1/0000_70_cluster-network-operator_01.crd.yaml index ab52d00b174..0e5b10bc776 100644 --- a/operator/v1/0000_70_cluster-network-operator_01.crd.yaml +++ b/operator/v1/0000_70_cluster-network-operator_01.crd.yaml @@ -290,9 +290,24 @@ spec: type: integer type: object ovnKubernetesConfig: - description: oVNKubernetesConfig configures the ovn-kubernetes - plugin. This is currently not implemented. + description: ovnKubernetesConfig configures the ovn-kubernetes + plugin. properties: + gatewayConfig: + description: gatewayConfig holds the configuration for node + gateway options. + properties: + routingViaHost: + default: false + description: RoutingViaHost allows pod egress traffic + to exit via the ovn-k8s-mp0 management port into the + host before sending it out. If this is not set, traffic + will always egress directly from OVN to outside without + touching the host stack. Setting this to true means + hardware offload will not be supported. Default is false + if GatewayConfig is specified. + type: boolean + type: object genevePort: description: geneve port is the UDP port to be used by geneve encapulation. Default is 6081 diff --git a/operator/v1/types_network.go b/operator/v1/types_network.go index b04c6b6d332..a5e9cc83cff 100644 --- a/operator/v1/types_network.go +++ b/operator/v1/types_network.go @@ -139,8 +139,7 @@ type DefaultNetworkDefinition struct { // +optional OpenShiftSDNConfig *OpenShiftSDNConfig `json:"openshiftSDNConfig,omitempty"` - // oVNKubernetesConfig configures the ovn-kubernetes plugin. This is currently - // not implemented. + // ovnKubernetesConfig configures the ovn-kubernetes plugin. // +optional OVNKubernetesConfig *OVNKubernetesConfig `json:"ovnKubernetesConfig,omitempty"` @@ -374,6 +373,9 @@ type OVNKubernetesConfig struct { // reported defaults are used. // +optional PolicyAuditConfig *PolicyAuditConfig `json:"policyAuditConfig,omitempty"` + // gatewayConfig holds the configuration for node gateway options. + // +optional + GatewayConfig *GatewayConfig `json:"gatewayConfig,omitempty"` } type HybridOverlayConfig struct { @@ -388,6 +390,17 @@ type HybridOverlayConfig struct { type IPsecConfig struct { } +// GatewayConfig holds node gateway-related parsed config file parameters and command-line overrides +type GatewayConfig struct { + // RoutingViaHost allows pod egress traffic to exit via the ovn-k8s-mp0 management port + // into the host before sending it out. If this is not set, traffic will always egress directly + // from OVN to outside without touching the host stack. Setting this to true means hardware + // offload will not be supported. Default is false if GatewayConfig is specified. + // +kubebuilder:default:=false + // +optional + RoutingViaHost bool `json:"routingViaHost,omitempty"` +} + type ExportNetworkFlows struct { // netFlow defines the NetFlow configuration. // +optional diff --git a/operator/v1/zz_generated.deepcopy.go b/operator/v1/zz_generated.deepcopy.go index d7f461e0aff..1fe5d763309 100644 --- a/operator/v1/zz_generated.deepcopy.go +++ b/operator/v1/zz_generated.deepcopy.go @@ -1263,6 +1263,22 @@ func (in *GCPLoadBalancerParameters) DeepCopy() *GCPLoadBalancerParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GatewayConfig) DeepCopyInto(out *GatewayConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayConfig. +func (in *GatewayConfig) DeepCopy() *GatewayConfig { + if in == nil { + return nil + } + out := new(GatewayConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GenerationStatus) DeepCopyInto(out *GenerationStatus) { *out = *in @@ -2555,6 +2571,11 @@ func (in *OVNKubernetesConfig) DeepCopyInto(out *OVNKubernetesConfig) { *out = new(PolicyAuditConfig) (*in).DeepCopyInto(*out) } + if in.GatewayConfig != nil { + in, out := &in.GatewayConfig, &out.GatewayConfig + *out = new(GatewayConfig) + **out = **in + } return } diff --git a/operator/v1/zz_generated.swagger_doc_generated.go b/operator/v1/zz_generated.swagger_doc_generated.go index cc2ce25e220..dca68fdc839 100644 --- a/operator/v1/zz_generated.swagger_doc_generated.go +++ b/operator/v1/zz_generated.swagger_doc_generated.go @@ -918,7 +918,7 @@ var map_DefaultNetworkDefinition = map[string]string{ "": "DefaultNetworkDefinition represents a single network plugin's configuration. type must be specified, along with exactly one \"Config\" that matches the type.", "type": "type is the type of network All NetworkTypes are supported except for NetworkTypeRaw", "openshiftSDNConfig": "openShiftSDNConfig configures the openshift-sdn plugin", - "ovnKubernetesConfig": "oVNKubernetesConfig configures the ovn-kubernetes plugin. This is currently not implemented.", + "ovnKubernetesConfig": "ovnKubernetesConfig configures the ovn-kubernetes plugin.", "kuryrConfig": "KuryrConfig configures the kuryr plugin", } @@ -936,6 +936,15 @@ func (ExportNetworkFlows) SwaggerDoc() map[string]string { return map_ExportNetworkFlows } +var map_GatewayConfig = map[string]string{ + "": "GatewayConfig holds node gateway-related parsed config file parameters and command-line overrides", + "routingViaHost": "RoutingViaHost allows pod egress traffic to exit via the ovn-k8s-mp0 management port into the host before sending it out. If this is not set, traffic will always egress directly from OVN to outside without touching the host stack. Setting this to true means hardware offload will not be supported. Default is false if GatewayConfig is specified.", +} + +func (GatewayConfig) SwaggerDoc() map[string]string { + return map_GatewayConfig +} + var map_HybridOverlayConfig = map[string]string{ "hybridClusterNetwork": "HybridClusterNetwork defines a network space given to nodes on an additional overlay network.", "hybridOverlayVXLANPort": "HybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network. Default is 4789", @@ -1046,6 +1055,7 @@ var map_OVNKubernetesConfig = map[string]string{ "hybridOverlayConfig": "HybridOverlayConfig configures an additional overlay network for peers that are not using OVN.", "ipsecConfig": "ipsecConfig enables and configures IPsec for pods on the pod network within the cluster.", "policyAuditConfig": "policyAuditConfig is the configuration for network policy audit events. If unset, reported defaults are used.", + "gatewayConfig": "gatewayConfig holds the configuration for node gateway options.", } func (OVNKubernetesConfig) SwaggerDoc() map[string]string {