Skip to content

Commit f8aa3f7

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 8ccbf40 commit f8aa3f7

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: |-
@@ -6125,7 +6122,6 @@ spec:
61256122
type: string
61266123
maxItems: 2
61276124
type: array
6128-
uniqueItems: true
61296125
clusterOSImage:
61306126
description: ClusterOSImage overrides the url provided in rhcos.json
61316127
to download the RHCOS Image.
@@ -6513,7 +6509,6 @@ spec:
65136509
type: string
65146510
maxItems: 2
65156511
type: array
6516-
uniqueItems: true
65176512
loadBalancer:
65186513
description: |-
65196514
LoadBalancer defines how the load balancer used by the cluster is configured.
@@ -6663,7 +6658,6 @@ spec:
66636658
type: string
66646659
maxItems: 2
66656660
type: array
6666-
uniqueItems: true
66676661
cloud:
66686662
description: Cloud is the name of OpenStack cloud to use from
66696663
clouds.yaml.
@@ -6839,7 +6833,6 @@ spec:
68396833
type: string
68406834
maxItems: 2
68416835
type: array
6842-
uniqueItems: true
68436836
lbFloatingIP:
68446837
description: |-
68456838
LbFloatingIP is the IP address of an available floating IP in your OpenStack cluster
@@ -6942,7 +6935,6 @@ spec:
69426935
type: string
69436936
maxItems: 2
69446937
type: array
6945-
uniqueItems: true
69466938
defaultMachinePlatform:
69476939
description: |-
69486940
DefaultMachinePlatform is the default configuration used when
@@ -7066,7 +7058,6 @@ spec:
70667058
type: string
70677059
maxItems: 2
70687060
type: array
7069-
uniqueItems: true
70707061
loadBalancer:
70717062
description: |-
70727063
LoadBalancer defines how the load balancer used by the cluster is configured.
@@ -7277,7 +7268,6 @@ spec:
72777268
type: string
72787269
maxItems: 2
72797270
type: array
7280-
uniqueItems: true
72817271
cluster:
72827272
description: |-
72837273
Cluster is the name of the cluster virtual machines will be cloned into.
@@ -7625,7 +7615,6 @@ spec:
76257615
type: string
76267616
maxItems: 2
76277617
type: array
7628-
uniqueItems: true
76297618
loadBalancer:
76307619
description: |-
76317620
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)