Skip to content

Commit 3e7785f

Browse files
committed
Allow users to specify Gateway Subnet
We currently reserve a range of addresses to configure host to service traffic internally in ovn. We need to allow users to specify this range to avoid conflicting with addresses they use in their local infra Signed-off-by: Ben Pickard <bpickard@redhat.com>
1 parent 42edf4f commit 3e7785f

File tree

5 files changed

+46
-2
lines changed

5 files changed

+46
-2
lines changed

openapi/generated_openapi/zz_generated.openapi.go

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/openapi.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23454,6 +23454,14 @@
2345423454
"routingViaHost": {
2345523455
"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.",
2345623456
"type": "boolean"
23457+
},
23458+
"v4InternalMasqueradeSubnet": {
23459+
"description": "V4InternalMasqueradeSubnet contains the v4 masquerade addresses used internally by ovn-kubernetes to enable host to service traffic. The host is configured with these addresses, as well as the shared gateway bridge interface.The values can be changed after installation. The default subnet is 169.254.169.0/29",
23460+
"type": "string"
23461+
},
23462+
"v6InternalMasqueradeSubnet": {
23463+
"description": "V6InternalMasqueradeSubnet contains the v6 masquerade addresses used internally by ovn-kubernetes to enable host to service traffic. The host is configured with these addresses, as well as the shared gateway bridge interface.The values can be changed after installation. The default subnet is fd69::/125",
23464+
"type": "string"
2345723465
}
2345823466
}
2345923467
},

operator/v1/0000_70_cluster-network-operator_01.crd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,12 @@ spec:
220220
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.
221221
type: boolean
222222
default: false
223+
v4InternalMasqueradeSubnet:
224+
description: V4InternalMasqueradeSubnet contains the v4 masquerade addresses used internally by ovn-kubernetes to enable host to service traffic. The host is configured with these addresses, as well as the shared gateway bridge interface.The values can be changed after installation. The default subnet is 169.254.169.0/29
225+
type: string
226+
v6InternalMasqueradeSubnet:
227+
description: V6InternalMasqueradeSubnet contains the v6 masquerade addresses used internally by ovn-kubernetes to enable host to service traffic. The host is configured with these addresses, as well as the shared gateway bridge interface.The values can be changed after installation. The default subnet is fd69::/125
228+
type: string
223229
genevePort:
224230
description: geneve port is the UDP port to be used by geneve encapulation. Default is 6081
225231
type: integer

operator/v1/types_network.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,20 @@ type GatewayConfig struct {
482482
// +kubebuilder:default:=false
483483
// +optional
484484
RoutingViaHost bool `json:"routingViaHost,omitempty"`
485+
// V4InternalMasqueradeSubnet contains the v4 masquerade addresses used internally by
486+
// ovn-kubernetes to enable host to service traffic. The host is configured with these
487+
// addresses, as well as the shared gateway bridge interface.The values can be changed after
488+
// installation.
489+
// The default subnet is 169.254.169.0/29
490+
// +optional
491+
V4InternalMasqueradeSubnet string `json:"v4InternalMasqueradeSubnet,omitempty"`
492+
// V6InternalMasqueradeSubnet contains the v6 masquerade addresses used internally by
493+
// ovn-kubernetes to enable host to service traffic. The host is configured with these
494+
// addresses, as well as the shared gateway bridge interface.The values can be changed after
495+
// installation.
496+
// The default subnet is fd69::/125
497+
// +optional
498+
V6InternalMasqueradeSubnet string `json:"v6InternalMasqueradeSubnet,omitempty"`
485499
}
486500

487501
type ExportNetworkFlows struct {

operator/v1/zz_generated.swagger_doc_generated.go

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)