Skip to content

Commit ad59622

Browse files
committed
changes associated with alibaba removal
This commit removes the ability to use the installer and the Alibaba platform. All references to alibaba are removed.
1 parent 784822a commit ad59622

File tree

26 files changed

+29
-478
lines changed

26 files changed

+29
-478
lines changed

cmd/openshift-install/destroy.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
quotaasset "github.com/openshift/installer/pkg/destroy/quota"
1717
"github.com/openshift/installer/pkg/metrics/timer"
1818

19-
_ "github.com/openshift/installer/pkg/destroy/alibabacloud"
2019
_ "github.com/openshift/installer/pkg/destroy/aws"
2120
_ "github.com/openshift/installer/pkg/destroy/azure"
2221
_ "github.com/openshift/installer/pkg/destroy/baremetal"

data/data/install.openshift.io_installconfigs.yaml

Lines changed: 1 addition & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -130,39 +130,6 @@ spec:
130130
description: Platform is configuration for machine pool specific
131131
to the platform.
132132
properties:
133-
alibabacloud:
134-
description: AlibabaCloud is the configuration used when installing
135-
on Alibaba Cloud.
136-
properties:
137-
imageID:
138-
description: ImageID is the Image ID that should be used
139-
to create ECS instance. If set, the ImageID should belong
140-
to the same region as the cluster.
141-
type: string
142-
instanceType:
143-
description: InstanceType defines the ECS instance type.
144-
eg. ecs.g6.large
145-
type: string
146-
systemDiskCategory:
147-
description: SystemDiskCategory defines the category of
148-
the system disk.
149-
enum:
150-
- ""
151-
- cloud_efficiency
152-
- cloud_essd
153-
type: string
154-
systemDiskSize:
155-
description: SystemDiskSize defines the size of the system
156-
disk in gibibytes (GiB).
157-
minimum: 120
158-
type: integer
159-
zones:
160-
description: Zones is list of availability zones that can
161-
be used. eg. ["cn-hangzhou-i", "cn-hangzhou-h", "cn-hangzhou-j"]
162-
items:
163-
type: string
164-
type: array
165-
type: object
166133
aws:
167134
description: AWS is the configuration used when installing on
168135
AWS.
@@ -1077,39 +1044,6 @@ spec:
10771044
description: Platform is configuration for machine pool specific to
10781045
the platform.
10791046
properties:
1080-
alibabacloud:
1081-
description: AlibabaCloud is the configuration used when installing
1082-
on Alibaba Cloud.
1083-
properties:
1084-
imageID:
1085-
description: ImageID is the Image ID that should be used to
1086-
create ECS instance. If set, the ImageID should belong to
1087-
the same region as the cluster.
1088-
type: string
1089-
instanceType:
1090-
description: InstanceType defines the ECS instance type. eg.
1091-
ecs.g6.large
1092-
type: string
1093-
systemDiskCategory:
1094-
description: SystemDiskCategory defines the category of the
1095-
system disk.
1096-
enum:
1097-
- ""
1098-
- cloud_efficiency
1099-
- cloud_essd
1100-
type: string
1101-
systemDiskSize:
1102-
description: SystemDiskSize defines the size of the system
1103-
disk in gibibytes (GiB).
1104-
minimum: 120
1105-
type: integer
1106-
zones:
1107-
description: Zones is list of availability zones that can
1108-
be used. eg. ["cn-hangzhou-i", "cn-hangzhou-h", "cn-hangzhou-j"]
1109-
items:
1110-
type: string
1111-
type: array
1112-
type: object
11131047
aws:
11141048
description: AWS is the configuration used when installing on
11151049
AWS.
@@ -2010,7 +1944,7 @@ spec:
20101944
values. For all other platforms, the field must not be set. AWS: \"Mint\",
20111945
\"Passthrough\", \"Manual\" Azure: \"Passthrough\", \"Manual\" AzureStack:
20121946
\"Manual\" GCP: \"Mint\", \"Passthrough\", \"Manual\" IBMCloud: \"Manual\"
2013-
AlibabaCloud: \"Manual\" PowerVS: \"Manual\" Nutanix: \"Manual\""
1947+
PowerVS: \"Manual\" Nutanix: \"Manual\""
20141948
enum:
20151949
- ""
20161950
- Mint
@@ -2218,84 +2152,6 @@ spec:
22182152
description: Platform is the configuration for the specific platform upon
22192153
which to perform the installation.
22202154
properties:
2221-
alibabacloud:
2222-
description: AlibabaCloud is the configuration used when installing
2223-
on Alibaba Cloud.
2224-
properties:
2225-
defaultMachinePlatform:
2226-
description: DefaultMachinePlatform is the default configuration
2227-
used when installing on Alibaba Cloud for machine pools which
2228-
do not define their own platform configuration.
2229-
properties:
2230-
imageID:
2231-
description: ImageID is the Image ID that should be used to
2232-
create ECS instance. If set, the ImageID should belong to
2233-
the same region as the cluster.
2234-
type: string
2235-
instanceType:
2236-
description: InstanceType defines the ECS instance type. eg.
2237-
ecs.g6.large
2238-
type: string
2239-
systemDiskCategory:
2240-
description: SystemDiskCategory defines the category of the
2241-
system disk.
2242-
enum:
2243-
- ""
2244-
- cloud_efficiency
2245-
- cloud_essd
2246-
type: string
2247-
systemDiskSize:
2248-
description: SystemDiskSize defines the size of the system
2249-
disk in gibibytes (GiB).
2250-
minimum: 120
2251-
type: integer
2252-
zones:
2253-
description: Zones is list of availability zones that can
2254-
be used. eg. ["cn-hangzhou-i", "cn-hangzhou-h", "cn-hangzhou-j"]
2255-
items:
2256-
type: string
2257-
type: array
2258-
type: object
2259-
privateZoneID:
2260-
description: PrivateZoneID is the ID of an existing private zone
2261-
into which to add DNS records for the cluster's internal API.
2262-
An existing private zone can only be used when also using existing
2263-
VPC. The private zone must be associated with the VPC containing
2264-
the subnets. Leave the private zone unset to have the installer
2265-
create the private zone on your behalf.
2266-
type: string
2267-
region:
2268-
description: Region specifies the Alibaba Cloud region where the
2269-
cluster will be created.
2270-
type: string
2271-
resourceGroupID:
2272-
description: ResourceGroupID is the ID of an already existing
2273-
resource group where the cluster should be installed. If empty,
2274-
the installer will create a new resource group for the cluster.
2275-
type: string
2276-
tags:
2277-
additionalProperties:
2278-
type: string
2279-
description: Tags additional keys and values that the installer
2280-
will add as tags to all resources that it creates. Resources
2281-
created by the cluster itself may not include these tags.
2282-
type: object
2283-
vpcID:
2284-
description: VpcID is the ID of an already existing VPC where
2285-
the cluster should be installed. If empty, the installer will
2286-
create a new VPC for the cluster.
2287-
type: string
2288-
vswitchIDs:
2289-
description: VSwitchIDs is the ID list of already existing VSwitches
2290-
where cluster resources will be created. The existing VSwitches
2291-
can only be used when also using existing VPC. If empty, the
2292-
installer will create new VSwitches for the cluster.
2293-
items:
2294-
type: string
2295-
type: array
2296-
required:
2297-
- region
2298-
type: object
22992155
aws:
23002156
description: AWS is the configuration used when installing on AWS.
23012157
properties:

pkg/asset/cluster/metadata.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
configv1 "github.com/openshift/api/config/v1"
1111
"github.com/openshift/installer/pkg/asset"
12-
"github.com/openshift/installer/pkg/asset/cluster/alibabacloud"
1312
"github.com/openshift/installer/pkg/asset/cluster/aws"
1413
"github.com/openshift/installer/pkg/asset/cluster/azure"
1514
"github.com/openshift/installer/pkg/asset/cluster/baremetal"
@@ -24,7 +23,6 @@ import (
2423
"github.com/openshift/installer/pkg/asset/ignition/bootstrap"
2524
"github.com/openshift/installer/pkg/asset/installconfig"
2625
"github.com/openshift/installer/pkg/types"
27-
alibabacloudtypes "github.com/openshift/installer/pkg/types/alibabacloud"
2826
awstypes "github.com/openshift/installer/pkg/types/aws"
2927
azuretypes "github.com/openshift/installer/pkg/types/azure"
3028
baremetaltypes "github.com/openshift/installer/pkg/types/baremetal"
@@ -106,8 +104,6 @@ func (m *Metadata) Generate(parents asset.Parents) (err error) {
106104
metadata.ClusterPlatformMetadata.Ovirt = ovirt.Metadata(installConfig.Config)
107105
case vspheretypes.Name:
108106
metadata.ClusterPlatformMetadata.VSphere = vsphere.Metadata(installConfig.Config)
109-
case alibabacloudtypes.Name:
110-
metadata.ClusterPlatformMetadata.AlibabaCloud = alibabacloud.Metadata(installConfig.Config)
111107
case powervstypes.Name:
112108
metadata.ClusterPlatformMetadata.PowerVS = powervs.Metadata(installConfig.Config, installConfig.PowerVS)
113109
case externaltypes.Name, nonetypes.Name:

pkg/asset/cluster/tfvars.go

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import (
4444
"github.com/openshift/installer/pkg/asset/rhcos"
4545
rhcospkg "github.com/openshift/installer/pkg/rhcos"
4646
"github.com/openshift/installer/pkg/tfvars"
47-
alibabacloudtfvars "github.com/openshift/installer/pkg/tfvars/alibabacloud"
4847
awstfvars "github.com/openshift/installer/pkg/tfvars/aws"
4948
azuretfvars "github.com/openshift/installer/pkg/tfvars/azure"
5049
baremetaltfvars "github.com/openshift/installer/pkg/tfvars/baremetal"
@@ -57,7 +56,6 @@ import (
5756
powervstfvars "github.com/openshift/installer/pkg/tfvars/powervs"
5857
vspheretfvars "github.com/openshift/installer/pkg/tfvars/vsphere"
5958
"github.com/openshift/installer/pkg/types"
60-
"github.com/openshift/installer/pkg/types/alibabacloud"
6159
"github.com/openshift/installer/pkg/types/aws"
6260
"github.com/openshift/installer/pkg/types/azure"
6361
"github.com/openshift/installer/pkg/types/baremetal"
@@ -1103,76 +1101,6 @@ func (t *TerraformVariables) Generate(parents asset.Parents) error {
11031101
Data: data,
11041102
})
11051103

1106-
case alibabacloud.Name:
1107-
client, err := installConfig.AlibabaCloud.Client()
1108-
if err != nil {
1109-
return errors.Wrapf(err, "failed to create new client use region %s", installConfig.Config.Platform.AlibabaCloud.Region)
1110-
}
1111-
bucket := fmt.Sprintf("%s-bootstrap", clusterID.InfraID)
1112-
object := "bootstrap.ign"
1113-
signURL, err := client.GetOSSObjectSignURL(bucket, object)
1114-
if err != nil {
1115-
return errors.Wrapf(err, "failed to get a presigned URL for OSS object %s", object)
1116-
}
1117-
1118-
auth := alibabacloudtfvars.Auth{
1119-
AccessKey: client.AccessKeyID,
1120-
SecretKey: client.AccessKeySecret,
1121-
}
1122-
1123-
masters, err := mastersAsset.Machines()
1124-
if err != nil {
1125-
return errors.Wrapf(err, "failed to get master machine info")
1126-
}
1127-
masterConfigs := make([]*machinev1.AlibabaCloudMachineProviderConfig, len(masters))
1128-
for i, m := range masters {
1129-
masterConfigs[i] = m.Spec.ProviderSpec.Value.Object.(*machinev1.AlibabaCloudMachineProviderConfig)
1130-
}
1131-
workers, err := workersAsset.MachineSets()
1132-
if err != nil {
1133-
return errors.Wrapf(err, "failed to get worker machine info")
1134-
}
1135-
workerConfigs := make([]*machinev1.AlibabaCloudMachineProviderConfig, len(workers))
1136-
for i, w := range workers {
1137-
workerConfigs[i] = w.Spec.Template.Spec.ProviderSpec.Value.Object.(*machinev1.AlibabaCloudMachineProviderConfig)
1138-
}
1139-
1140-
natGatewayZones, err := client.ListEnhanhcedNatGatewayAvailableZones()
1141-
if err != nil {
1142-
return errors.Wrapf(err, "failed to list available zones for NAT gateway")
1143-
}
1144-
natGatewayZoneID := natGatewayZones.Zones[0].ZoneId
1145-
1146-
vswitchIDs := []string{}
1147-
if len(installConfig.Config.AlibabaCloud.VSwitchIDs) > 0 {
1148-
vswitchIDs = installConfig.Config.AlibabaCloud.VSwitchIDs
1149-
}
1150-
data, err := alibabacloudtfvars.TFVars(
1151-
alibabacloudtfvars.TFVarsSources{
1152-
Auth: auth,
1153-
VpcID: installConfig.Config.AlibabaCloud.VpcID,
1154-
VSwitchIDs: vswitchIDs,
1155-
PrivateZoneID: installConfig.Config.AlibabaCloud.PrivateZoneID,
1156-
ResourceGroupID: installConfig.Config.AlibabaCloud.ResourceGroupID,
1157-
BaseDomain: installConfig.Config.BaseDomain,
1158-
NatGatewayZoneID: natGatewayZoneID,
1159-
MasterConfigs: masterConfigs,
1160-
WorkerConfigs: workerConfigs,
1161-
IgnitionBucket: bucket,
1162-
IgnitionPresignedURL: signURL,
1163-
AdditionalTrustBundle: installConfig.Config.AdditionalTrustBundle,
1164-
Architecture: installConfig.Config.ControlPlane.Architecture,
1165-
Publish: installConfig.Config.Publish,
1166-
Proxy: installConfig.Config.Proxy,
1167-
},
1168-
)
1169-
if err != nil {
1170-
return errors.Wrapf(err, "failed to get %s Terraform variables", platform)
1171-
}
1172-
t.FileList = append(t.FileList, &asset.File{
1173-
Filename: TfPlatformVarsFileName,
1174-
Data: data,
1175-
})
11761104
case nutanix.Name:
11771105
if rhcosImage == nil {
11781106
return errors.New("unable to retrieve rhcos image")

pkg/asset/installconfig/basedomain.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ import (
66
"github.com/pkg/errors"
77

88
"github.com/openshift/installer/pkg/asset"
9-
alibabacloudconfig "github.com/openshift/installer/pkg/asset/installconfig/alibabacloud"
109
awsconfig "github.com/openshift/installer/pkg/asset/installconfig/aws"
1110
azureconfig "github.com/openshift/installer/pkg/asset/installconfig/azure"
1211
gcpconfig "github.com/openshift/installer/pkg/asset/installconfig/gcp"
1312
ibmcloudconfig "github.com/openshift/installer/pkg/asset/installconfig/ibmcloud"
1413
powervsconfig "github.com/openshift/installer/pkg/asset/installconfig/powervs"
15-
"github.com/openshift/installer/pkg/types/alibabacloud"
1614
"github.com/openshift/installer/pkg/types/aws"
1715
"github.com/openshift/installer/pkg/types/azure"
1816
"github.com/openshift/installer/pkg/types/gcp"
@@ -41,12 +39,6 @@ func (a *baseDomain) Generate(parents asset.Parents) error {
4139

4240
var err error
4341
switch platform.CurrentName() {
44-
case alibabacloud.Name:
45-
a.BaseDomain, err = alibabacloudconfig.GetBaseDomain()
46-
if err != nil {
47-
return err
48-
}
49-
return nil
5042
case aws.Name:
5143
a.BaseDomain, err = awsconfig.GetBaseDomain()
5244
cause := errors.Cause(err)

pkg/asset/installconfig/installconfig.go

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"k8s.io/apimachinery/pkg/util/validation/field"
1010

1111
"github.com/openshift/installer/pkg/asset"
12-
"github.com/openshift/installer/pkg/asset/installconfig/alibabacloud"
1312
"github.com/openshift/installer/pkg/asset/installconfig/aws"
1413
icazure "github.com/openshift/installer/pkg/asset/installconfig/azure"
1514
icgcp "github.com/openshift/installer/pkg/asset/installconfig/gcp"
@@ -31,11 +30,10 @@ const (
3130
// InstallConfig generates the install-config.yaml file.
3231
type InstallConfig struct {
3332
AssetBase
34-
AWS *aws.Metadata `json:"aws,omitempty"`
35-
Azure *icazure.Metadata `json:"azure,omitempty"`
36-
IBMCloud *icibmcloud.Metadata `json:"ibmcloud,omitempty"`
37-
AlibabaCloud *alibabacloud.Metadata `json:"alibabacloud,omitempty"`
38-
PowerVS *icpowervs.Metadata `json:"powervs,omitempty"`
33+
AWS *aws.Metadata `json:"aws,omitempty"`
34+
Azure *icazure.Metadata `json:"azure,omitempty"`
35+
IBMCloud *icibmcloud.Metadata `json:"ibmcloud,omitempty"`
36+
PowerVS *icpowervs.Metadata `json:"powervs,omitempty"`
3937
}
4038

4139
var _ asset.WritableAsset = (*InstallConfig)(nil)
@@ -88,7 +86,6 @@ func (a *InstallConfig) Generate(parents asset.Parents) error {
8886
PullSecret: pullSecret.PullSecret,
8987
}
9088

91-
a.Config.AlibabaCloud = platform.AlibabaCloud
9289
a.Config.AWS = platform.AWS
9390
a.Config.Libvirt = platform.Libvirt
9491
a.Config.None = platform.None
@@ -146,9 +143,6 @@ func (a *InstallConfig) finish(filename string) error {
146143
return err
147144
}
148145
}
149-
if a.Config.AlibabaCloud != nil {
150-
a.AlibabaCloud = alibabacloud.NewMetadata(a.Config.AlibabaCloud.Region, a.Config.AlibabaCloud.VSwitchIDs)
151-
}
152146
if a.Config.Azure != nil {
153147
a.Azure = icazure.NewMetadata(a.Config.Azure.CloudName, a.Config.Azure.ARMEndpoint)
154148
}
@@ -177,13 +171,6 @@ func (a *InstallConfig) finish(filename string) error {
177171
// underlying platform. In some cases, platforms also duplicate validations
178172
// that have already been checked by validation.ValidateInstallConfig().
179173
func (a *InstallConfig) platformValidation() error {
180-
if a.Config.Platform.AlibabaCloud != nil {
181-
client, err := a.AlibabaCloud.Client()
182-
if err != nil {
183-
return err
184-
}
185-
return alibabacloud.Validate(client, a.Config)
186-
}
187174
if a.Config.Platform.Azure != nil {
188175
if a.Config.Platform.Azure.IsARO() {
189176
// ARO performs platform validation in the Resource Provider before

0 commit comments

Comments
 (0)