Skip to content

Commit 2e7b000

Browse files
committed
Clean backport of transit subnets to 4.13
Although transit switch doesn't exsit in 4.13. We need this flag to allow users to customize the value before upgrading to 4.14. Signed-off-by: Peng Liu <[email protected]>
1 parent 0f638a8 commit 2e7b000

6 files changed

+254
-1
lines changed

openapi/generated_openapi/zz_generated.openapi.go

+53-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/openapi.json

+26
Original file line numberDiff line numberDiff line change
@@ -23826,6 +23826,24 @@
2382623826
"com.github.openshift.api.operator.v1.IPsecConfig": {
2382723827
"type": "object"
2382823828
},
23829+
"com.github.openshift.api.operator.v1.IPv4OVNKubernetesConfig": {
23830+
"type": "object",
23831+
"properties": {
23832+
"internalTransitSwitchSubnet": {
23833+
"description": "internalTransitSwitchSubnet is a v4 subnet in IPV4 CIDR format used internally by OVN-Kubernetes for the distributed transit switch in the OVN Interconnect architecture that connects the cluster routers on each node together to enable east west traffic. The subnet chosen should not overlap with other networks specified for OVN-Kubernetes as well as other networks used on the host. The value can be changed after installation. When ommitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. The current default subnet is 100.88.0.0/16 The subnet must be large enough to accomadate one IP per node in your cluster The value must be in proper IPV4 CIDR format",
23834+
"type": "string"
23835+
}
23836+
}
23837+
},
23838+
"com.github.openshift.api.operator.v1.IPv6OVNKubernetesConfig": {
23839+
"type": "object",
23840+
"properties": {
23841+
"internalTransitSwitchSubnet": {
23842+
"description": "internalTransitSwitchSubnet is a v4 subnet in IPV4 CIDR format used internally by OVN-Kubernetes for the distributed transit switch in the OVN Interconnect architecture that connects the cluster routers on each node together to enable east west traffic. The subnet chosen should not overlap with other networks specified for OVN-Kubernetes as well as other networks used on the host. The value can be changed after installation. When ommitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. The subnet must be large enough to accomadate one IP per node in your cluster The current default subnet is fd97::/64 The value must be in proper IPV6 CIDR format Note that IPV6 dual addresses are not permitted",
23843+
"type": "string"
23844+
}
23845+
}
23846+
},
2382923847
"com.github.openshift.api.operator.v1.IngressController": {
2383023848
"description": "IngressController describes a managed ingress controller for the cluster. The controller can service OpenShift Route and Kubernetes Ingress resources.\n\nWhen an IngressController is created, a new ingress controller deployment is created to allow external traffic to reach the services that expose Ingress or Route resources. Updating this resource may lead to disruption for public facing network connections as a new ingress controller revision may be rolled out.\n\nhttps://kubernetes.io/docs/concepts/services-networking/ingress-controllers\n\nWhenever possible, sensible defaults for the platform are used. See each field for more details.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).",
2383123849
"type": "object",
@@ -25618,6 +25636,14 @@
2561825636
"description": "ipsecConfig enables and configures IPsec for pods on the pod network within the cluster.",
2561925637
"$ref": "#/definitions/com.github.openshift.api.operator.v1.IPsecConfig"
2562025638
},
25639+
"ipv4": {
25640+
"description": "ipv4 allows users to configure IP settings for IPv4 connections. When ommitted, this means no opinions and the default configuration is used. Check individual fields within ipv4 for details of default values.",
25641+
"$ref": "#/definitions/com.github.openshift.api.operator.v1.IPv4OVNKubernetesConfig"
25642+
},
25643+
"ipv6": {
25644+
"description": "ipv6 allows users to configure IP settings for IPv6 connections. When ommitted, this means no opinions and the default configuration is used. Check individual fields within ipv4 for details of default values.",
25645+
"$ref": "#/definitions/com.github.openshift.api.operator.v1.IPv6OVNKubernetesConfig"
25646+
},
2562125647
"mtu": {
2562225648
"description": "mtu is the MTU to use for the tunnel interface. This must be 100 bytes smaller than the uplink mtu. Default is 1400",
2562325649
"type": "integer",

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

+54
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,60 @@ spec:
249249
ipsecConfig:
250250
description: ipsecConfig enables and configures IPsec for pods on the pod network within the cluster.
251251
type: object
252+
ipv4:
253+
description: ipv4 allows users to configure IP settings for IPv4 connections. When ommitted, this means no opinions and the default configuration is used. Check individual fields within ipv4 for details of default values.
254+
type: object
255+
properties:
256+
internalTransitSwitchSubnet:
257+
description: internalTransitSwitchSubnet is a v4 subnet in IPV4 CIDR format used internally by OVN-Kubernetes for the distributed transit switch in the OVN Interconnect architecture that connects the cluster routers on each node together to enable east west traffic. The subnet chosen should not overlap with other networks specified for OVN-Kubernetes as well as other networks used on the host. The value can be changed after installation. When ommitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. The current default subnet is 100.88.0.0/16 The subnet must be large enough to accomadate one IP per node in your cluster The value must be in proper IPV4 CIDR format
258+
type: string
259+
maxLength: 18
260+
x-kubernetes-validations:
261+
- rule: self.indexOf('/') == self.lastIndexOf('/')
262+
message: CIDR format must contain exactly one '/'
263+
- rule: '[int(self.split(''/'')[1])].all(x, x <= 30 && x >= 0)'
264+
message: subnet must be in the range /0 to /30 inclusive
265+
- rule: self.split('/')[0].split('.').size() == 4
266+
message: a valid IPv4 address must contain 4 octets
267+
- rule: '[self.findAll(''[0-9]+'')[0]].all(x, x != ''0'' && int(x) <= 255 && !x.startsWith(''0''))'
268+
message: first IP address octet must not contain leading zeros, must be greater than 0 and less or equal to 255
269+
- rule: '[self.findAll(''[0-9]+'')[1], self.findAll(''[0-9]+'')[2], self.findAll(''[0-9]+'')[3]].all(x, int(x) <= 255 && (x == ''0'' || !x.startsWith(''0'')))'
270+
message: IP address octets must not contain leading zeros, and must be less or equal to 255
271+
ipv6:
272+
description: ipv6 allows users to configure IP settings for IPv6 connections. When ommitted, this means no opinions and the default configuration is used. Check individual fields within ipv4 for details of default values.
273+
type: object
274+
properties:
275+
internalTransitSwitchSubnet:
276+
description: internalTransitSwitchSubnet is a v4 subnet in IPV4 CIDR format used internally by OVN-Kubernetes for the distributed transit switch in the OVN Interconnect architecture that connects the cluster routers on each node together to enable east west traffic. The subnet chosen should not overlap with other networks specified for OVN-Kubernetes as well as other networks used on the host. The value can be changed after installation. When ommitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. The subnet must be large enough to accomadate one IP per node in your cluster The current default subnet is fd97::/64 The value must be in proper IPV6 CIDR format Note that IPV6 dual addresses are not permitted
277+
type: string
278+
maxLength: 48
279+
x-kubernetes-validations:
280+
- rule: self.indexOf('/') == self.lastIndexOf('/')
281+
message: CIDR format must contain exactly one '/'
282+
- rule: self.split('/').size() == 2 && [int(self.split('/')[1])].all(x, x <= 125 && x >= 0)
283+
message: subnet must be in the range /0 to /125 inclusive
284+
- rule: self.indexOf('::') == self.lastIndexOf('::')
285+
message: IPv6 addresses must contain at most one '::' and may only be shortened once
286+
- rule: 'self.contains(''::'') ? self.split(''/'')[0].split('':'').size() <= 8 : self.split(''/'')[0].split('':'').size() == 8'
287+
message: a valid IPv6 address must contain 8 segments unless elided (::), in which case it must contain at most 6 non-empty segments
288+
- rule: 'self.split(''/'')[0].split('':'').size() >=1 ? [self.split(''/'')[0].split('':'', 8)[0]].all(x, x == '''' || (x.matches(''^[0-9A-Fa-f]{1,4}$'')) && size(x)<5 ) : true'
289+
message: each segment of an IPv6 address must be a hexadecimal number between 0 and FFFF, failed on segment 1
290+
- rule: 'self.split(''/'')[0].split('':'').size() >=2 ? [self.split(''/'')[0].split('':'', 8)[1]].all(x, x == '''' || (x.matches(''^[0-9A-Fa-f]{1,4}$'')) && size(x)<5 ) : true'
291+
message: each segment of an IPv6 address must be a hexadecimal number between 0 and FFFF, failed on segment 2
292+
- rule: 'self.split(''/'')[0].split('':'').size() >=3 ? [self.split(''/'')[0].split('':'', 8)[2]].all(x, x == '''' || (x.matches(''^[0-9A-Fa-f]{1,4}$'')) && size(x)<5 ) : true'
293+
message: each segment of an IPv6 address must be a hexadecimal number between 0 and FFFF, failed on segment 3
294+
- rule: 'self.split(''/'')[0].split('':'').size() >=4 ? [self.split(''/'')[0].split('':'', 8)[3]].all(x, x == '''' || (x.matches(''^[0-9A-Fa-f]{1,4}$'')) && size(x)<5 ) : true'
295+
message: each segment of an IPv6 address must be a hexadecimal number between 0 and FFFF, failed on segment 4
296+
- rule: 'self.split(''/'')[0].split('':'').size() >=5 ? [self.split(''/'')[0].split('':'', 8)[4]].all(x, x == '''' || (x.matches(''^[0-9A-Fa-f]{1,4}$'')) && size(x)<5 ) : true'
297+
message: each segment of an IPv6 address must be a hexadecimal number between 0 and FFFF, failed on segment 5
298+
- rule: 'self.split(''/'')[0].split('':'').size() >=6 ? [self.split(''/'')[0].split('':'', 8)[5]].all(x, x == '''' || (x.matches(''^[0-9A-Fa-f]{1,4}$'')) && size(x)<5 ) : true'
299+
message: each segment of an IPv6 address must be a hexadecimal number between 0 and FFFF, failed on segment 6
300+
- rule: 'self.split(''/'')[0].split('':'').size() >=7 ? [self.split(''/'')[0].split('':'', 8)[6]].all(x, x == '''' || (x.matches(''^[0-9A-Fa-f]{1,4}$'')) && size(x)<5 ) : true'
301+
message: each segment of an IPv6 address must be a hexadecimal number between 0 and FFFF, failed on segment 7
302+
- rule: 'self.split(''/'')[0].split('':'').size() >=8 ? [self.split(''/'')[0].split('':'', 8)[7]].all(x, x == '''' || (x.matches(''^[0-9A-Fa-f]{1,4}$'')) && size(x)<5 ) : true'
303+
message: each segment of an IPv6 address must be a hexadecimal number between 0 and FFFF, failed on segment 8
304+
- rule: '!self.contains(''.'')'
305+
message: IPv6 dual addresses are not permitted, value should not contain `.` characters
252306
mtu:
253307
description: mtu is the MTU to use for the tunnel interface. This must be 100 bytes smaller than the uplink mtu. Default is 1400
254308
type: integer

0 commit comments

Comments
 (0)