Skip to content

Commit 680fd20

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 754e59a commit 680fd20

File tree

5 files changed

+47
-3
lines changed

5 files changed

+47
-3
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
@@ -25116,6 +25116,14 @@
2511625116
"routingViaHost": {
2511725117
"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.",
2511825118
"type": "boolean"
25119+
},
25120+
"v4InternalMasqueradeSubnet": {
25121+
"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",
25122+
"type": "string"
25123+
},
25124+
"v6InternalMasqueradeSubnet": {
25125+
"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",
25126+
"type": "string"
2511925127
}
2512025128
}
2512125129
},

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ spec:
223223
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.
224224
type: boolean
225225
default: false
226+
v4InternalMasqueradeSubnet:
227+
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
228+
type: string
229+
v6InternalMasqueradeSubnet:
230+
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
231+
type: string
226232
genevePort:
227233
description: geneve port is the UDP port to be used by geneve encapulation. Default is 6081
228234
type: integer

operator/v1/types_network.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,20 @@ type GatewayConfig struct {
507507
// The supported values are "Restricted" and "Global".
508508
// +optional
509509
IPForwarding IPForwardingMode `json:"ipForwarding,omitempty"`
510+
// V4InternalMasqueradeSubnet contains the v4 masquerade addresses used internally by
511+
// ovn-kubernetes to enable host to service traffic. The host is configured with these
512+
// addresses, as well as the shared gateway bridge interface.The values can be changed after
513+
// installation.
514+
// The default subnet is 169.254.169.0/29
515+
// +optional
516+
V4InternalMasqueradeSubnet string `json:"v4InternalMasqueradeSubnet,omitempty"`
517+
// V6InternalMasqueradeSubnet contains the v6 masquerade addresses used internally by
518+
// ovn-kubernetes to enable host to service traffic. The host is configured with these
519+
// addresses, as well as the shared gateway bridge interface.The values can be changed after
520+
// installation.
521+
// The default subnet is fd69::/125
522+
// +optional
523+
V6InternalMasqueradeSubnet string `json:"v6InternalMasqueradeSubnet,omitempty"`
510524
}
511525

512526
type ExportNetworkFlows struct {

operator/v1/zz_generated.swagger_doc_generated.go

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

0 commit comments

Comments
 (0)