Skip to content

Commit

Permalink
Merge pull request #1033 from tssurya/add-gm-config-ovnk
Browse files Browse the repository at this point in the history
SDN 2316: Add GatewayConfig to OVNKubernetesConfig
  • Loading branch information
openshift-merge-robot authored Dec 3, 2021
2 parents d5252ba + a880d29 commit fb6f933
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 5 deletions.
19 changes: 17 additions & 2 deletions operator/v1/0000_70_cluster-network-operator_01.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 15 additions & 2 deletions operator/v1/types_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,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"`

Expand Down Expand Up @@ -409,6 +408,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 {
Expand All @@ -423,6 +425,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
Expand Down
21 changes: 21 additions & 0 deletions operator/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion operator/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fb6f933

Please sign in to comment.