Skip to content

Commit f9d438c

Browse files
committed
Remove UniqueItem=true validation for API/Ingress ip addresses
Iff the intent of adding kubebuilder/DeepCopy code generation is to enable these types to be used in CRD definitions, it stands to reason that these CRDs should be usable in a k8s cluster. UniqueItem=true is not permitted on CRDs for k8s. This might be controversial because it relaxes validation requirements
1 parent 71d6b4e commit f9d438c

File tree

6 files changed

+0
-22
lines changed

6 files changed

+0
-22
lines changed

data/data/install.openshift.io_installconfigs.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5348,7 +5348,6 @@ spec:
53485348
items:
53495349
type: string
53505350
type: array
5351-
uniqueItems: true
53525351
apiVIP:
53535352
description: |-
53545353
DeprecatedAPIVIP is the VIP to use for internal API communication
@@ -5365,7 +5364,6 @@ spec:
53655364
type: string
53665365
maxItems: 2
53675366
type: array
5368-
uniqueItems: true
53695367
bootstrapExternalStaticDNS:
53705368
description: |-
53715369
BootstrapExternalStaticDNS is the static network DNS of the bootstrap node.
@@ -5547,7 +5545,6 @@ spec:
55475545
type: string
55485546
maxItems: 2
55495547
type: array
5550-
uniqueItems: true
55515548
libvirtURI:
55525549
default: qemu:///system
55535550
description: |-
@@ -6183,7 +6180,6 @@ spec:
61836180
type: string
61846181
maxItems: 2
61856182
type: array
6186-
uniqueItems: true
61876183
clusterOSImage:
61886184
description: ClusterOSImage overrides the url provided in rhcos.json
61896185
to download the RHCOS Image.
@@ -6571,7 +6567,6 @@ spec:
65716567
type: string
65726568
maxItems: 2
65736569
type: array
6574-
uniqueItems: true
65756570
loadBalancer:
65766571
description: |-
65776572
LoadBalancer defines how the load balancer used by the cluster is configured.
@@ -6721,7 +6716,6 @@ spec:
67216716
type: string
67226717
maxItems: 2
67236718
type: array
6724-
uniqueItems: true
67256719
cloud:
67266720
description: Cloud is the name of OpenStack cloud to use from
67276721
clouds.yaml.
@@ -6897,7 +6891,6 @@ spec:
68976891
type: string
68986892
maxItems: 2
68996893
type: array
6900-
uniqueItems: true
69016894
lbFloatingIP:
69026895
description: |-
69036896
LbFloatingIP is the IP address of an available floating IP in your OpenStack cluster
@@ -7000,7 +6993,6 @@ spec:
70006993
type: string
70016994
maxItems: 2
70026995
type: array
7003-
uniqueItems: true
70046996
defaultMachinePlatform:
70056997
description: |-
70066998
DefaultMachinePlatform is the default configuration used when
@@ -7124,7 +7116,6 @@ spec:
71247116
type: string
71257117
maxItems: 2
71267118
type: array
7127-
uniqueItems: true
71287119
loadBalancer:
71297120
description: |-
71307121
LoadBalancer defines how the load balancer used by the cluster is configured.
@@ -7335,7 +7326,6 @@ spec:
73357326
type: string
73367327
maxItems: 2
73377328
type: array
7338-
uniqueItems: true
73397329
cluster:
73407330
description: |-
73417331
Cluster is the name of the cluster virtual machines will be cloned into.
@@ -7683,7 +7673,6 @@ spec:
76837673
type: string
76847674
maxItems: 2
76857675
type: array
7686-
uniqueItems: true
76877676
loadBalancer:
76887677
description: |-
76897678
LoadBalancer defines how the load balancer used by the cluster is configured.

pkg/types/baremetal/platform.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ type Platform struct {
187187
// one VIP
188188
//
189189
// +kubebuilder:validation:MaxItems=2
190-
// +kubebuilder:validation:UniqueItems=true
191190
// +kubebuilder:validation:Format=ip
192191
// +optional
193192
APIVIPs []string `json:"apiVIPs,omitempty"`
@@ -203,7 +202,6 @@ type Platform struct {
203202
// clusters it contains an IPv4 and IPv6 address, otherwise only one VIP
204203
//
205204
// +kubebuilder:validation:MaxItems=2
206-
// +kubebuilder:validation:UniqueItems=true
207205
// +kubebuilder:validation:Format=ip
208206
// +optional
209207
IngressVIPs []string `json:"ingressVIPs,omitempty"`
@@ -247,7 +245,6 @@ type Platform struct {
247245

248246
// AdditionalNTPServers defines a list of additional NTP servers
249247
// to use for provisioning
250-
// +kubebuilder:validation:UniqueItems=true
251248
// +optional
252249
AdditionalNTPServers []string `json:"additionalNTPServers,omitempty"`
253250
}

pkg/types/nutanix/platform.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ type Platform struct {
4545
// it contains an IPv4 and IPv6 address, otherwise only one VIP
4646
//
4747
// +kubebuilder:validation:MaxItems=2
48-
// +kubebuilder:validation:UniqueItems=true
4948
// +kubebuilder:validation:Format=ip
5049
// +optional
5150
APIVIPs []string `json:"apiVIPs,omitempty"`
@@ -61,7 +60,6 @@ type Platform struct {
6160
// it contains an IPv4 and IPv6 address, otherwise only one VIP
6261
//
6362
// +kubebuilder:validation:MaxItems=2
64-
// +kubebuilder:validation:UniqueItems=true
6563
// +kubebuilder:validation:Format=ip
6664
// +optional
6765
IngressVIPs []string `json:"ingressVIPs,omitempty"`

pkg/types/openstack/platform.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ type Platform struct {
8888
// CIDR
8989
//
9090
// +kubebuilder:validation:MaxItems=2
91-
// +kubebuilder:validation:UniqueItems=true
9291
// +kubebuilder:validation:Format=ip
9392
// +optional
9493
APIVIPs []string `json:"apiVIPs,omitempty"`
@@ -108,7 +107,6 @@ type Platform struct {
108107
// CIDR
109108
//
110109
// +kubebuilder:validation:MaxItems=2
111-
// +kubebuilder:validation:UniqueItems=true
112110
// +kubebuilder:validation:Format=ip
113111
// +optional
114112
IngressVIPs []string `json:"ingressVIPs,omitempty"`

pkg/types/ovirt/platform.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ type Platform struct {
3636
// IPv4 and IPv6 address, otherwise only one VIP
3737
//
3838
// +kubebuilder:validation:MaxItems=2
39-
// +kubebuilder:validation:UniqueItems=true
4039
// +kubebuilder:validation:Format=ip
4140
// +optional
4241
APIVIPs []string `json:"api_vips,omitempty"`
@@ -55,7 +54,6 @@ type Platform struct {
5554
// IPv4 and IPv6 address, otherwise only one VIP
5655
//
5756
// +kubebuilder:validation:MaxItems=2
58-
// +kubebuilder:validation:UniqueItems=true
5957
// +kubebuilder:validation:Format=ip
6058
// +optional
6159
IngressVIPs []string `json:"ingress_vips,omitempty"`

pkg/types/vsphere/platform.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ type Platform struct {
9393
// it contains an IPv4 and IPv6 address, otherwise only one VIP
9494
//
9595
// +kubebuilder:validation:MaxItems=2
96-
// +kubebuilder:validation:UniqueItems=true
9796
// +kubebuilder:validation:Format=ip
9897
// +optional
9998
APIVIPs []string `json:"apiVIPs,omitempty"`
@@ -109,7 +108,6 @@ type Platform struct {
109108
// contains an IPv4 and IPv6 address, otherwise only one VIP
110109
//
111110
// +kubebuilder:validation:MaxItems=2
112-
// +kubebuilder:validation:UniqueItems=true
113111
// +kubebuilder:validation:Format=ip
114112
// +optional
115113
IngressVIPs []string `json:"ingressVIPs,omitempty"`

0 commit comments

Comments
 (0)