Skip to content

Commit 841c5be

Browse files
committed
Add HuaweiCloud to the providers list
Signed-off-by: bo.jiang <[email protected]>
1 parent 4bef23c commit 841c5be

File tree

7 files changed

+58
-2
lines changed

7 files changed

+58
-2
lines changed

cmd/clusterctl/client/config/providers_client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const (
4848
HarvesterProviderName = "harvester-harvester"
4949
HetznerProviderName = "hetzner"
5050
HivelocityProviderName = "hivelocity-hivelocity"
51+
HuaweiProviderName = "huawei"
5152
OutscaleProviderName = "outscale"
5253
IBMCloudProviderName = "ibmcloud"
5354
InMemoryProviderName = "in-memory"
@@ -273,6 +274,11 @@ func (p *providersClient) defaults() []Provider {
273274
url: "https://github.com/hivelocity/cluster-api-provider-hivelocity/releases/latest/infrastructure-components.yaml",
274275
providerType: clusterctlv1.InfrastructureProviderType,
275276
},
277+
&provider{
278+
name: HuaweiProviderName,
279+
url: "https://github.com/HuaweiCloudDeveloper/cluster-api-provider-huawei/releases/latest/infrastructure-components.yaml",
280+
providerType: clusterctlv1.InfrastructureProviderType,
281+
},
276282
&provider{
277283
name: OutscaleProviderName,
278284
url: "https://github.com/outscale/cluster-api-provider-outscale/releases/latest/infrastructure-components.yaml",

cmd/clusterctl/client/config_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
8484
config.HarvesterProviderName,
8585
config.HetznerProviderName,
8686
config.HivelocityProviderName,
87+
config.HuaweiProviderName,
8788
config.IBMCloudProviderName,
8889
config.InMemoryProviderName,
8990
config.IonosCloudProviderName,
@@ -151,6 +152,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
151152
config.HarvesterProviderName,
152153
config.HetznerProviderName,
153154
config.HivelocityProviderName,
155+
config.HuaweiProviderName,
154156
config.IBMCloudProviderName,
155157
config.InMemoryProviderName,
156158
config.IonosCloudProviderName,

cmd/clusterctl/cmd/config_repositories_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ gcp InfrastructureProvider https://github.com/kubernetes
131131
harvester-harvester InfrastructureProvider https://github.com/rancher-sandbox/cluster-api-provider-harvester/releases/latest/ infrastructure-components.yaml
132132
hetzner InfrastructureProvider https://github.com/syself/cluster-api-provider-hetzner/releases/latest/ infrastructure-components.yaml
133133
hivelocity-hivelocity InfrastructureProvider https://github.com/hivelocity/cluster-api-provider-hivelocity/releases/latest/ infrastructure-components.yaml
134+
huawei InfrastructureProvider https://github.com/HuaweiCloudDeveloper/cluster-api-provider-huawei/releases/latest/ infrastructure-components.yaml
134135
ibmcloud InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/releases/latest/ infrastructure-components.yaml
135136
in-memory InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api/releases/latest/ infrastructure-components-in-memory-development.yaml
136137
ionoscloud-ionoscloud InfrastructureProvider https://github.com/ionos-cloud/cluster-api-provider-ionoscloud/releases/latest/ infrastructure-components.yaml
@@ -278,6 +279,10 @@ var expectedOutputYaml = `- File: core_components.yaml
278279
Name: hivelocity-hivelocity
279280
ProviderType: InfrastructureProvider
280281
URL: https://github.com/hivelocity/cluster-api-provider-hivelocity/releases/latest/
282+
- File: infrastructure-components.yaml
283+
Name: huawei
284+
ProviderType: InfrastructureProvider
285+
URL: https://github.com/HuaweiCloudDeveloper/cluster-api-provider-huawei/releases/latest/
281286
- File: infrastructure-components.yaml
282287
Name: ibmcloud
283288
ProviderType: InfrastructureProvider

docs/book/src/developer/providers/contracts/clusterctl.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ providers.
327327
| CAPG | cluster.x-k8s.io/provider=infrastructure-gcp |
328328
| CAPH | cluster.x-k8s.io/provider=infrastructure-hetzner |
329329
| CAPHV | cluster.x-k8s.io/provider=infrastructure-hivelocity |
330+
| CAPHW | cluster.x-k8s.io/provider=infrastructure-huawei |
330331
| CAPIBM | cluster.x-k8s.io/provider=infrastructure-ibmcloud |
331332
| CAPKK | cluster.x-k8s.io/provider=infrastructure-kubekey |
332333
| CAPK | cluster.x-k8s.io/provider=infrastructure-kubevirt |

docs/book/src/reference/glossary.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ Cluster API Provider Hetzner
6363
### CAPHV
6464
Cluster API Provider Hivelocity
6565

66+
### CAPHW
67+
Cluster API Provider Huawei
68+
6669
### CAPIBM
6770
Cluster API Provider IBM Cloud
6871

docs/book/src/reference/providers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ updated info about which API version they are supporting.
3939
- [Google Cloud Platform (GCP)](https://cluster-api-gcp.sigs.k8s.io/)
4040
- [Hetzner](https://github.com/syself/cluster-api-provider-hetzner)
4141
- [Hivelocity](https://github.com/hivelocity/cluster-api-provider-hivelocity)
42+
- [Huawei Cloud](https://github.com/HuaweiCloudDeveloper/cluster-api-provider-huawei)
4243
- [IBM Cloud](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud)
4344
- [IONOS Cloud](https://github.com/ionos-cloud/cluster-api-provider-ionoscloud)
4445
- [KubeKey](https://github.com/kubesphere/kubekey)

docs/book/src/user/quick-start.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ Additional documentation about experimental features can be found in [Experiment
281281
Depending on the infrastructure provider you are planning to use, some additional prerequisites should be satisfied
282282
before getting started with Cluster API. See below for the expected settings for common providers.
283283
284-
{{#tabs name:"tab-installation-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,Harvester,Hetzner,Hivelocity,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OCI,OpenStack,Outscale,Proxmox,VCD,vcluster,Virtink,vSphere,Vultr"}}
284+
{{#tabs name:"tab-installation-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,Harvester,Hetzner,Hivelocity,Huawei,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OCI,OpenStack,Outscale,Proxmox,VCD,vcluster,Virtink,vSphere,Vultr"}}
285285
{{#tab Akamai (Linode)}}
286286
287287
```bash
@@ -592,6 +592,18 @@ Please visit the [Hetzner project][Hetzner provider].
592592
593593
Please visit the [Hivelocity project][Hivelocity provider].
594594
595+
{{#/tab }}
596+
{{#tab Huawei}}
597+
598+
```bash
599+
# Please ensure that the values for `CLOUD_SDK_AK` and `CLOUD_SDK_SK` are base64 encoded.
600+
export CLOUD_SDK_AK=$( echo $AccessKey | base64 | tr -d '\n' )
601+
export CLOUD_SDK_SK=$( echo $SecretKey | base64 | tr -d '\n' )
602+
603+
# Finally, initialize the management cluster
604+
clusterctl init --infrastructure huawei
605+
```
606+
595607
{{#/tab }}
596608
{{#tab IBM Cloud}}
597609
@@ -894,7 +906,7 @@ before configuring a cluster with Cluster API. Instructions are provided for com
894906
Otherwise, you can look at the `clusterctl generate cluster` [command][clusterctl generate cluster] documentation for details about how to
895907
discover the list of variables required by a cluster templates.
896908
897-
{{#tabs name:"tab-configuration-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,Harvester,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OpenStack,Outscale,Proxmox,Tinkerbell,VCD,vcluster,Virtink,vSphere,Vultr"}}
909+
{{#tabs name:"tab-configuration-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,Harvester,Huawei,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OpenStack,Outscale,Proxmox,Tinkerbell,VCD,vcluster,Virtink,vSphere,Vultr"}}
898910
{{#tab Akamai (Linode)}}
899911
900912
```bash
@@ -1113,6 +1125,31 @@ export WORKER_MACHINE_COUNT=2
11131125
11141126
See the [Harvester provider] for more information.
11151127
1128+
{{#/tab }}
1129+
{{#tab Huawei}}
1130+
1131+
1132+
```bash
1133+
# huawei cloud region
1134+
export HC_REGION="cn-east-1"
1135+
# ECS SSH key name
1136+
export HC_SSH_KEY_NAME="default"
1137+
# kubernetes version
1138+
export KUBERNETES_VERSION="1.32.0"
1139+
# number of control plane machines
1140+
export CONTROL_PLANE_MACHINE_COUNT="1"
1141+
# number of worker machines
1142+
export WORKER_MACHINE_COUNT="1"
1143+
# control plane machine type
1144+
export HC_CONTROL_PLANE_MACHINE_TYPE="x1e.2u.4g"
1145+
# worker node machine type
1146+
export HC_NODE_MACHINE_TYPE="x1e.2u.4g"
1147+
# ECS image ID
1148+
export ECS_IMAGE_ID="218ca5t7-bxf3-5dg0-852p-y703c9fe1a52"
1149+
```
1150+
1151+
See the [Huawei Cloud provider] for more information.
1152+
11161153
{{#/tab }}
11171154
{{#tab IBM Cloud}}
11181155
@@ -1908,6 +1945,7 @@ kind delete cluster
19081945
[Harvester provider]: https://github.com/rancher-sandbox/cluster-api-provider-harvester
19091946
[Hetzner provider]: https://github.com/syself/cluster-api-provider-hetzner
19101947
[Hivelocity provider]: https://github.com/hivelocity/cluster-api-provider-hivelocity
1948+
[Huawei Cloud provider]: https://github.com/HuaweiCloudDeveloper/cluster-api-provider-huawei
19111949
[IBM Cloud provider]: https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud
19121950
[infrastructure provider]: ../reference/glossary.md#infrastructure-provider
19131951
[ionoscloud provider]: https://github.com/ionos-cloud/cluster-api-provider-ionoscloud

0 commit comments

Comments
 (0)