Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions data/data/install.openshift.io_installconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6715,9 +6715,8 @@ spec:
Deprecated: Use VCenters.Server
type: string
vcenters:
description: |-
VCenters holds the connection details for services to communicate with vCenter.
Currently only a single vCenter is supported.
description: VCenters holds the connection details for services
to communicate with vCenter.
items:
description: |-
VCenter stores the vCenter connection fields
Expand Down
10 changes: 1 addition & 9 deletions pkg/asset/manifests/cloudproviderconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"

"github.com/openshift/api/features"
"github.com/openshift/installer/pkg/asset"
"github.com/openshift/installer/pkg/asset/installconfig"
ibmcloudmachines "github.com/openshift/installer/pkg/asset/machines/ibmcloud"
Expand Down Expand Up @@ -329,14 +328,7 @@ func (cpc *CloudProviderConfig) Generate(ctx context.Context, dependencies asset
}
cm.Data[cloudProviderConfigDataKey] = powervsConfig
case vspheretypes.Name:
var vsphereConfig string
var err error
// When we GA multi vcenter, we should only support yaml generation here.
if installConfig.Config.EnabledFeatureGates().Enabled(features.FeatureGateVSphereMultiVCenters) {
vsphereConfig, err = vspheremanifests.CloudProviderConfigYaml(clusterID.InfraID, installConfig.Config.Platform.VSphere)
} else {
vsphereConfig, err = vspheremanifests.CloudProviderConfigIni(clusterID.InfraID, installConfig.Config.Platform.VSphere)
}
vsphereConfig, err := vspheremanifests.CloudProviderConfigYaml(clusterID.InfraID, installConfig.Config.Platform.VSphere)

if err != nil {
return errors.Wrap(err, "could not create cloud provider config")
Expand Down
7 changes: 2 additions & 5 deletions pkg/types/validation/featuregate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,20 @@ func TestFeatureGates(t *testing.T) {
}(),
},
{
name: "vSphere two vcenters is not allowed with Feature Gates disabled",
name: "vSphere two vcenters is allowed with default Feature Gates",
installConfig: func() *types.InstallConfig {
c := validInstallConfig()
c.FeatureSet = v1.CustomNoUpgrade
c.FeatureGates = []string{"VSphereMultiVCenters=false"}
c.FeatureSet = v1.Default
c.VSphere = validVSpherePlatform()
c.VSphere.VCenters = append(c.VSphere.VCenters, vsphere.VCenter{Server: "additional-vcenter"})
return c
}(),
expected: `^platform.vsphere.vcenters: Forbidden: this field is protected by the VSphereMultiVCenters feature gate which must be enabled through either the TechPreviewNoUpgrade or CustomNoUpgrade feature set`,
},
{
name: "vSphere two vcenters is allowed with custom Feature Gate enabled",
installConfig: func() *types.InstallConfig {
c := validInstallConfig()
c.FeatureSet = v1.CustomNoUpgrade
c.FeatureGates = []string{"VSphereMultiVCenters=true"}
c.VSphere = validVSpherePlatform()
c.VSphere.VCenters = append(c.VSphere.VCenters, vsphere.VCenter{Server: "additional-vcenter"})
return c
Expand Down
1 change: 0 additions & 1 deletion pkg/types/vsphere/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ type Platform struct {
// of vsphere.
DiskType DiskType `json:"diskType,omitempty"`
// VCenters holds the connection details for services to communicate with vCenter.
// Currently only a single vCenter is supported.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxItems=3
// +kubebuilder:validation:MinItems=1
Expand Down
5 changes: 0 additions & 5 deletions pkg/types/vsphere/validation/featuregates.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ func GatedFeatures(c *types.InstallConfig) []featuregates.GatedInstallConfigFeat
Condition: len(v.Hosts) > 0,
Field: field.NewPath("platform", "vsphere", "hosts"),
},
{
FeatureGateName: features.FeatureGateVSphereMultiVCenters,
Condition: len(v.VCenters) > 1,
Field: field.NewPath("platform", "vsphere", "vcenters"),
},
{
FeatureGateName: features.FeatureGateVSphereMultiNetworks,
Condition: multiNetworksFound,
Expand Down