Skip to content

Commit 6648582

Browse files
authored
Merge pull request #12387 from Tomy2e/scaleway-1.10
[release-1.10] 🌱 Add Scaleway infrastructure provider to clusterctl
2 parents 5b55c7b + b80e5f7 commit 6648582

File tree

7 files changed

+87
-3
lines changed

7 files changed

+87
-3
lines changed

cmd/clusterctl/client/config/providers_client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ const (
7373
IonosCloudProviderName = "ionoscloud-ionoscloud"
7474
VultrProviderName = "vultr-vultr"
7575
OpenNebulaProviderName = "opennebula"
76+
ScalewayProviderName = "scaleway"
7677
)
7778

7879
// Bootstrap providers.
@@ -339,6 +340,11 @@ func (p *providersClient) defaults() []Provider {
339340
url: "https://github.com/OpenNebula/cluster-api-provider-opennebula/releases/latest/infrastructure-components.yaml",
340341
providerType: clusterctlv1.InfrastructureProviderType,
341342
},
343+
&provider{
344+
name: ScalewayProviderName,
345+
url: "https://github.com/scaleway/cluster-api-provider-scaleway/releases/latest/infrastructure-components.yaml",
346+
providerType: clusterctlv1.InfrastructureProviderType,
347+
},
342348

343349
// Bootstrap providers
344350
&provider{

cmd/clusterctl/client/config_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
101101
config.OutscaleProviderName,
102102
config.PacketProviderName,
103103
config.ProxmoxProviderName,
104+
config.ScalewayProviderName,
104105
config.SideroProviderName,
105106
config.TinkerbellProviderName,
106107
config.VCloudDirectorProviderName,
@@ -169,6 +170,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
169170
config.OutscaleProviderName,
170171
config.PacketProviderName,
171172
config.ProxmoxProviderName,
173+
config.ScalewayProviderName,
172174
config.SideroProviderName,
173175
config.TinkerbellProviderName,
174176
config.VCloudDirectorProviderName,

cmd/clusterctl/cmd/config_repositories_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ openstack InfrastructureProvider https://github.com/kubernetes
149149
outscale InfrastructureProvider https://github.com/outscale/cluster-api-provider-outscale/releases/latest/ infrastructure-components.yaml
150150
packet InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-packet/releases/latest/ infrastructure-components.yaml
151151
proxmox InfrastructureProvider https://github.com/ionos-cloud/cluster-api-provider-proxmox/releases/latest/ infrastructure-components.yaml
152+
scaleway InfrastructureProvider https://github.com/scaleway/cluster-api-provider-scaleway/releases/latest/ infrastructure-components.yaml
152153
sidero InfrastructureProvider https://github.com/siderolabs/sidero/releases/latest/ infrastructure-components.yaml
153154
tinkerbell-tinkerbell InfrastructureProvider https://github.com/tinkerbell/cluster-api-provider-tinkerbell/releases/latest/ infrastructure-components.yaml
154155
vcd InfrastructureProvider https://github.com/vmware/cluster-api-provider-cloud-director/releases/latest/ infrastructure-components.yaml
@@ -351,6 +352,10 @@ var expectedOutputYaml = `- File: core_components.yaml
351352
Name: proxmox
352353
ProviderType: InfrastructureProvider
353354
URL: https://github.com/ionos-cloud/cluster-api-provider-proxmox/releases/latest/
355+
- File: infrastructure-components.yaml
356+
Name: scaleway
357+
ProviderType: InfrastructureProvider
358+
URL: https://github.com/scaleway/cluster-api-provider-scaleway/releases/latest/
354359
- File: infrastructure-components.yaml
355360
Name: sidero
356361
ProviderType: InfrastructureProvider

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ providers.
336336
| CAPO | cluster.x-k8s.io/provider=infrastructure-openstack |
337337
| CAPOCI | cluster.x-k8s.io/provider=infrastructure-oci |
338338
| CAPP | cluster.x-k8s.io/provider=infrastructure-packet |
339+
| CAPS | cluster.x-k8s.io/provider=infrastructure-scaleway |
339340
| CAPT | cluster.x-k8s.io/provider=infrastructure-tinkerbell |
340341
| CAPV | cluster.x-k8s.io/provider=infrastructure-vsphere |
341342
| CAPVC | cluster.x-k8s.io/provider=infrastructure-vcluster |

docs/book/src/reference/glossary.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ Cluster API Provider Outscale
9999
### CAPOCI
100100
Cluster API Provider Oracle Cloud Infrastructure (OCI)
101101

102+
### CAPS
103+
Cluster API Provider Scaleway
104+
102105
### CAPT
103106
Cluster API Provider Tinkerbell
104107

docs/book/src/reference/providers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ updated info about which API version they are supporting.
5555
- [OpenStack](https://github.com/kubernetes-sigs/cluster-api-provider-openstack)
5656
- [Outscale](https://github.com/outscale/cluster-api-provider-outscale)
5757
- [Proxmox](https://github.com/ionos-cloud/cluster-api-provider-proxmox)
58+
- [Scaleway](https://github.com/scaleway/cluster-api-provider-scaleway)
5859
- [Sidero](https://github.com/siderolabs/sidero)
5960
- [Tinkerbell](https://github.com/tinkerbell/cluster-api-provider-tinkerbell)
6061
- [vcluster](https://github.com/loft-sh/cluster-api-provider-vcluster)

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

Lines changed: 69 additions & 3 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,Huawei,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OCI,OpenNebula,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,OpenNebula,OpenStack,Outscale,Proxmox,Scaleway,VCD,vcluster,Virtink,vSphere,Vultr"}}
285285
{{#tab Akamai (Linode)}}
286286
287287
```bash
@@ -794,6 +794,15 @@ project][Proxmox getting started guide].
794794
795795
{{#/tab }}
796796
797+
{{#tab Scaleway}}
798+
799+
```bash
800+
# Initialize the management cluster
801+
clusterctl init --infrastructure scaleway
802+
```
803+
804+
{{#/tab }}
805+
797806
{{#tab VCD}}
798807
799808
Please follow the Cluster API Provider for [Cloud Director Getting Started Guide](https://github.com/vmware/cluster-api-provider-cloud-director/blob/main/README.md)
@@ -916,7 +925,7 @@ before configuring a cluster with Cluster API. Instructions are provided for com
916925
Otherwise, you can look at the `clusterctl generate cluster` [command][clusterctl generate cluster] documentation for details about how to
917926
discover the list of variables required by a cluster templates.
918927
919-
{{#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,OpenNebula,OpenStack,Outscale,Proxmox,Tinkerbell,VCD,vcluster,Virtink,vSphere,Vultr"}}
928+
{{#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,OpenNebula,OpenStack,Outscale,Proxmox,Scaleway,Tinkerbell,VCD,vcluster,Virtink,vSphere,Vultr"}}
920929
{{#tab Akamai (Linode)}}
921930
922931
```bash
@@ -1430,6 +1439,23 @@ export ALLOWED_NODES="[pve1,pve2,pve3]"
14301439
14311440
For more information about prerequisites and advanced setups for Proxmox, see the [Proxmox getting started guide].
14321441
1442+
{{#/tab }}
1443+
{{#tab Scaleway}}
1444+
1445+
```bash
1446+
# Scaleway credentials, project ID and region.
1447+
export SCW_ACCESS_KEY="<ACCESS_KEY>"
1448+
export SCW_SECRET_KEY="<SECRET_KEY>"
1449+
export SCW_PROJECT_ID="<PROJECT_ID>"
1450+
export SCW_REGION="fr-par"
1451+
1452+
# Scaleway Instance image names that will be used to provision servers.
1453+
export CONTROL_PLANE_MACHINE_IMAGE="<IMAGE_NAME>"
1454+
export WORKER_MACHINE_IMAGE="<IMAGE_NAME>"
1455+
```
1456+
1457+
For more information about prerequisites and advanced setups for CAPS, see the [CAPS getting started guide].
1458+
14331459
{{#/tab }}
14341460
{{#tab Tinkerbell}}
14351461
@@ -1715,7 +1741,7 @@ Note: To use the default clusterctl method to retrieve kubeconfig for a workload
17151741
17161742
The Kubernetes in-tree cloud provider implementations are being [removed](https://github.com/kubernetes/enhancements/tree/master/keps/sig-cloud-provider/2395-removing-in-tree-cloud-providers) in favor of external cloud providers (also referred to as "out-of-tree"). This requires deploying a new component called the cloud-controller-manager which is responsible for running all the cloud specific controllers that were previously run in the kube-controller-manager. To learn more, see [this blog post](https://kubernetes.io/blog/2019/04/17/the-future-of-cloud-providers-in-kubernetes/).
17171743
1718-
{{#tabs name:"tab-install-cloud-provider" tabs:"Azure,OpenStack"}}
1744+
{{#tabs name:"tab-install-cloud-provider" tabs:"Azure,OpenStack,Scaleway"}}
17191745
{{#tab Azure}}
17201746
17211747
Install the official cloud-provider-azure Helm chart on the workload cluster:
@@ -1761,6 +1787,45 @@ kubectl apply --kubeconfig=./capi-quickstart.kubeconfig -f https://raw.githubuse
17611787
17621788
Alternatively, refer to the [helm chart](https://github.com/kubernetes/cloud-provider-openstack/tree/master/charts/openstack-cloud-controller-manager).
17631789
1790+
{{#/tab }}
1791+
{{#tab Scaleway}}
1792+
1793+
Before deploying the Scaleway external cloud provider, you will need:
1794+
1795+
- Your Scaleway credentials (access key and secret key)
1796+
- Your Scaleway project ID
1797+
- The Scaleway region where your workload cluster is deployed
1798+
- The Private Network ID of your cluster (optional)
1799+
1800+
First, create the Secret named `scaleway-secret` in your workload cluster:
1801+
1802+
```bash
1803+
kubectl apply -f - <<EOF
1804+
apiVersion: v1
1805+
kind: Secret
1806+
metadata:
1807+
name: scaleway-secret
1808+
namespace: kube-system
1809+
type: Opaque
1810+
stringData:
1811+
SCW_ACCESS_KEY: "xxxxxxxxxxxxxxxx"
1812+
SCW_SECRET_KEY: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1813+
SCW_DEFAULT_PROJECT_ID: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
1814+
SCW_DEFAULT_REGION: "fr-par"
1815+
SCW_DEFAULT_ZONE: "fr-par-1"
1816+
PN_ID: "" # If your have a private network on your cluster, you may set its ID here.
1817+
EOF
1818+
```
1819+
1820+
Finally, you can deploy the `scaleway-cloud-controller-manager`:
1821+
1822+
```bash
1823+
kubectl apply -f https://raw.githubusercontent.com/scaleway/scaleway-cloud-controller-manager/master/examples/k8s-scaleway-ccm-latest.yml
1824+
```
1825+
1826+
For more detailed information on configuring and using the Scaleway external cloud
1827+
provider, see the [scaleway-cloud-controller-manager repository](https://github.com/scaleway/scaleway-cloud-controller-manager).
1828+
17641829
{{#/tab }}
17651830
{{#/tabs }}
17661831
@@ -2011,3 +2076,4 @@ kind delete cluster
20112076
[Proxmox getting started guide]: https://github.com/ionos-cloud/cluster-api-provider-proxmox/blob/main/docs/Usage.md
20122077
[Tinkerbell getting started guide]: https://github.com/tinkerbell/cluster-api-provider-tinkerbell/blob/main/docs/QUICK-START.md
20132078
[CAPONE Wiki]: https://github.com/OpenNebula/cluster-api-provider-opennebula/wiki
2079+
[CAPS getting started guide]: https://github.com/scaleway/cluster-api-provider-scaleway/blob/main/docs/getting-started.md

0 commit comments

Comments
 (0)