Skip to content

Commit d4fcf54

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 f99bfe3 commit d4fcf54

File tree

5 files changed

+0
-11
lines changed

5 files changed

+0
-11
lines changed

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)