You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: config/v1/types_infrastructure.go
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -295,7 +295,9 @@ type ExternalPlatformSpec struct {
295
295
// PlatformSpec holds the desired state specific to the underlying infrastructure provider
296
296
// of the current cluster. Since these are used at spec-level for the underlying cluster, it
297
297
// is supposed that only one of the spec structs is set.
298
-
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.vsphere) && has(self.vsphere) ? size(self.vsphere.vcenters) < 2 : true",message="vcenters can have at most 1 item when configured post-install"
298
+
// +openshift:validation:FeatureGateAwareXValidation:featureGate="",rule="!has(oldSelf.vsphere) && has(self.vsphere) && has(self.vsphere.vcenters) ? size(self.vsphere.vcenters) < 2 : true",message="vcenters can have at most 1 item when configured post-install"
299
+
// +openshift:validation:FeatureGateAwareXValidation:featureGate=VSphereMultiVCenterDay2,rule="has(oldSelf.vsphere) && has(oldSelf.vsphere.vcenters) ? (has(self.vsphere) && has(self.vsphere.vcenters) && size(self.vsphere.vcenters) > 0) : true",message="vcenters is required once set and must have at least 1 item"
300
+
// +openshift:validation:FeatureGateAwareXValidation:featureGate=VSphereMultiVCenterDay2,rule="!has(oldSelf.vsphere) && has(self.vsphere) && has(self.vsphere.vcenters) ? size(self.vsphere.vcenters) > 0 : true",message="vcenters must have at least 1 item when initially configured"
299
301
typePlatformSpecstruct {
300
302
// type is the underlying infrastructure provider for the cluster. This
301
303
// value controls whether infrastructure automation such as service load
@@ -1641,7 +1643,9 @@ type VSpherePlatformNodeNetworking struct {
1641
1643
// use these fields for configuration.
1642
1644
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.apiServerInternalIPs) || has(self.apiServerInternalIPs)",message="apiServerInternalIPs list is required once set"
1643
1645
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.ingressIPs) || has(self.ingressIPs)",message="ingressIPs list is required once set"
1644
-
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.vcenters) && has(self.vcenters) ? size(self.vcenters) < 2 : true",message="vcenters can have at most 1 item when configured post-install"
1646
+
// +openshift:validation:FeatureGateAwareXValidation:featureGate="",rule="!has(oldSelf.vcenters) && has(self.vcenters) ? size(self.vcenters) < 2 : true",message="vcenters can have at most 1 item when configured post-install"
1647
+
// +openshift:validation:FeatureGateAwareXValidation:featureGate=VSphereMultiVCenterDay2,rule="!has(oldSelf.vcenters) || has(self.vcenters)",message="vcenters is required once set"
1648
+
// +openshift:validation:FeatureGateAwareXValidation:featureGate=VSphereMultiVCenterDay2,rule="has(self.vcenters) ? size(self.vcenters) > 0 : true",message="vcenters must have at least 1 item"
1645
1649
typeVSpherePlatformSpecstruct {
1646
1650
// vcenters holds the connection details for services to communicate with vCenter.
1647
1651
// Currently, only a single vCenter is supported, but in tech preview 3 vCenters are supported.
@@ -1655,7 +1659,8 @@ type VSpherePlatformSpec struct {
1655
1659
// + in openshift-config.
1656
1660
// +kubebuilder:validation:MinItems=0
1657
1661
// +kubebuilder:validation:MaxItems=3
1658
-
// +kubebuilder:validation:XValidation:rule="size(self) != size(oldSelf) ? size(oldSelf) == 0 && size(self) < 2 : true",message="vcenters cannot be added or removed once set"
1662
+
// +openshift:validation:FeatureGateAwareXValidation:featureGate="",rule="size(self) != size(oldSelf) ? size(oldSelf) == 0 && size(self) < 2 : true",message="vcenters cannot be added or removed once set"
1663
+
// +openshift:validation:FeatureGateAwareXValidation:featureGate=VSphereMultiVCenterDay2,rule="size(self) != size(oldSelf) ? size(self) > 0 : true",message="vcenters must have at least 1 item"
Copy file name to clipboardExpand all lines: config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml
+14-9Lines changed: 14 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1083,23 +1083,28 @@ spec:
1083
1083
type: array
1084
1084
x-kubernetes-list-type: atomic
1085
1085
x-kubernetes-validations:
1086
-
- message: vcenters cannot be added or removed once set
Copy file name to clipboardExpand all lines: config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
Copy file name to clipboardExpand all lines: config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AWSClusterHostedDNSInstall.yaml
-11Lines changed: 0 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -991,24 +991,13 @@ spec:
991
991
minItems: 0
992
992
type: array
993
993
x-kubernetes-list-type: atomic
994
-
x-kubernetes-validations:
995
-
- message: vcenters cannot be added or removed once set
Copy file name to clipboardExpand all lines: config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AWSDualStackInstall.yaml
-11Lines changed: 0 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -991,24 +991,13 @@ spec:
991
991
minItems: 0
992
992
type: array
993
993
x-kubernetes-list-type: atomic
994
-
x-kubernetes-validations:
995
-
- message: vcenters cannot be added or removed once set
0 commit comments