Skip to content

Commit 2b25999

Browse files
committed
Add Scaleway infrastructure provider to clusterctl
1 parent 393485e commit 2b25999

File tree

6 files changed

+84
-3
lines changed

6 files changed

+84
-3
lines changed

cmd/clusterctl/client/config/providers_client.go

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

7778
// Bootstrap providers.
@@ -333,6 +334,11 @@ func (p *providersClient) defaults() []Provider {
333334
url: "https://github.com/OpenNebula/cluster-api-provider-opennebula/releases/latest/infrastructure-components.yaml",
334335
providerType: clusterctlv1.InfrastructureProviderType,
335336
},
337+
&provider{
338+
name: ScalewayProviderName,
339+
url: "https://github.com/scaleway/cluster-api-provider-scaleway/releases/latest/infrastructure-components.yaml",
340+
providerType: clusterctlv1.InfrastructureProviderType,
341+
},
336342

337343
// Bootstrap providers
338344
&provider{

cmd/clusterctl/client/config_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
9999
config.OpenStackProviderName,
100100
config.OutscaleProviderName,
101101
config.ProxmoxProviderName,
102+
config.ScalewayProviderName,
102103
config.SideroProviderName,
103104
config.TinkerbellProviderName,
104105
config.VCloudDirectorProviderName,
@@ -166,6 +167,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
166167
config.OpenStackProviderName,
167168
config.OutscaleProviderName,
168169
config.ProxmoxProviderName,
170+
config.ScalewayProviderName,
169171
config.SideroProviderName,
170172
config.TinkerbellProviderName,
171173
config.VCloudDirectorProviderName,

cmd/clusterctl/cmd/config_repositories_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ opennebula InfrastructureProvider https://github.com/OpenNebula
145145
openstack InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/latest/ infrastructure-components.yaml
146146
outscale InfrastructureProvider https://github.com/outscale/cluster-api-provider-outscale/releases/latest/ infrastructure-components.yaml
147147
proxmox InfrastructureProvider https://github.com/ionos-cloud/cluster-api-provider-proxmox/releases/latest/ infrastructure-components.yaml
148+
scaleway InfrastructureProvider https://github.com/scaleway/cluster-api-provider-scaleway/releases/latest/ infrastructure-components.yaml
148149
sidero InfrastructureProvider https://github.com/siderolabs/sidero/releases/latest/ infrastructure-components.yaml
149150
tinkerbell-tinkerbell InfrastructureProvider https://github.com/tinkerbell/cluster-api-provider-tinkerbell/releases/latest/ infrastructure-components.yaml
150151
vcd InfrastructureProvider https://github.com/vmware/cluster-api-provider-cloud-director/releases/latest/ infrastructure-components.yaml
@@ -343,6 +344,10 @@ var expectedOutputYaml = `- File: core_components.yaml
343344
Name: proxmox
344345
ProviderType: InfrastructureProvider
345346
URL: https://github.com/ionos-cloud/cluster-api-provider-proxmox/releases/latest/
347+
- File: infrastructure-components.yaml
348+
Name: scaleway
349+
ProviderType: InfrastructureProvider
350+
URL: https://github.com/scaleway/cluster-api-provider-scaleway/releases/latest/
346351
- File: infrastructure-components.yaml
347352
Name: sidero
348353
ProviderType: InfrastructureProvider

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ providers.
350350
| CAPONE | cluster.x-k8s.io/provider=infrastructure-opennebula |
351351
| CAPO | cluster.x-k8s.io/provider=infrastructure-openstack |
352352
| CAPOCI | cluster.x-k8s.io/provider=infrastructure-oci |
353+
| CAPS | cluster.x-k8s.io/provider=infrastructure-scaleway |
353354
| CAPT | cluster.x-k8s.io/provider=infrastructure-tinkerbell |
354355
| CAPV | cluster.x-k8s.io/provider=infrastructure-vsphere |
355356
| CAPVC | cluster.x-k8s.io/provider=infrastructure-vcluster |

docs/book/src/reference/providers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ source of inspiration and ideas for others.
6666
- [OpenStack](https://github.com/kubernetes-sigs/cluster-api-provider-openstack)
6767
- [Outscale](https://github.com/outscale/cluster-api-provider-outscale)
6868
- [Proxmox](https://github.com/ionos-cloud/cluster-api-provider-proxmox)
69+
- [Scaleway](https://github.com/scaleway/cluster-api-provider-scaleway)
6970
- [Sidero](https://github.com/siderolabs/sidero)
7071
- [Tinkerbell](https://github.com/tinkerbell/cluster-api-provider-tinkerbell)
7172
- [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,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,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
@@ -780,6 +780,15 @@ project][Proxmox getting started guide].
780780
781781
{{#/tab }}
782782
783+
{{#tab Scaleway}}
784+
785+
```bash
786+
# Initialize the management cluster
787+
clusterctl init --infrastructure scaleway
788+
```
789+
790+
{{#/tab }}
791+
783792
{{#tab VCD}}
784793
785794
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)
@@ -902,7 +911,7 @@ before configuring a cluster with Cluster API. Instructions are provided for com
902911
Otherwise, you can look at the `clusterctl generate cluster` [command][clusterctl generate cluster] documentation for details about how to
903912
discover the list of variables required by a cluster templates.
904913
905-
{{#tabs name:"tab-configuration-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,GCP,Harvester,Huawei,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OpenNebula,OpenStack,Outscale,Proxmox,Tinkerbell,VCD,vcluster,Virtink,vSphere,Vultr"}}
914+
{{#tabs name:"tab-configuration-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,GCP,Harvester,Huawei,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OpenNebula,OpenStack,Outscale,Proxmox,Scaleway,Tinkerbell,VCD,vcluster,Virtink,vSphere,Vultr"}}
906915
{{#tab Akamai (Linode)}}
907916
908917
```bash
@@ -1387,6 +1396,23 @@ export ALLOWED_NODES="[pve1,pve2,pve3]"
13871396
13881397
For more information about prerequisites and advanced setups for Proxmox, see the [Proxmox getting started guide].
13891398
1399+
{{#/tab }}
1400+
{{#tab Scaleway}}
1401+
1402+
```bash
1403+
# Scaleway credentials, project ID and region.
1404+
export SCW_ACCESS_KEY="<ACCESS_KEY>"
1405+
export SCW_SECRET_KEY="<SECRET_KEY>"
1406+
export SCW_PROJECT_ID="<PROJECT_ID>"
1407+
export SCW_REGION="fr-par"
1408+
1409+
# Scaleway Instance image names that will be used to provision servers.
1410+
export CONTROL_PLANE_MACHINE_IMAGE="<IMAGE_NAME>"
1411+
export WORKER_MACHINE_IMAGE="<IMAGE_NAME>"
1412+
```
1413+
1414+
For more information about prerequisites and advanced setups for CAPS, see the [CAPS getting started guide].
1415+
13901416
{{#/tab }}
13911417
{{#tab Tinkerbell}}
13921418
@@ -1672,7 +1698,7 @@ Note: To use the default clusterctl method to retrieve kubeconfig for a workload
16721698
16731699
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/).
16741700
1675-
{{#tabs name:"tab-install-cloud-provider" tabs:"Azure,OpenStack"}}
1701+
{{#tabs name:"tab-install-cloud-provider" tabs:"Azure,OpenStack,Scaleway"}}
16761702
{{#tab Azure}}
16771703
16781704
Install the official cloud-provider-azure Helm chart on the workload cluster:
@@ -1718,6 +1744,45 @@ kubectl apply --kubeconfig=./capi-quickstart.kubeconfig -f https://raw.githubuse
17181744
17191745
Alternatively, refer to the [helm chart](https://github.com/kubernetes/cloud-provider-openstack/tree/master/charts/openstack-cloud-controller-manager).
17201746
1747+
{{#/tab }}
1748+
{{#tab Scaleway}}
1749+
1750+
Before deploying the Scaleway external cloud provider, you will need:
1751+
1752+
- Your Scaleway credentials (access key and secret key)
1753+
- Your Scaleway project ID
1754+
- The Scaleway region where your workload cluster is deployed
1755+
- The Private Network ID of your cluster (optional)
1756+
1757+
First, create the Secret named `scaleway-secret` in your workload cluster:
1758+
1759+
```bash
1760+
kubectl apply -f - <<EOF
1761+
apiVersion: v1
1762+
kind: Secret
1763+
metadata:
1764+
name: scaleway-secret
1765+
namespace: kube-system
1766+
type: Opaque
1767+
stringData:
1768+
SCW_ACCESS_KEY: "xxxxxxxxxxxxxxxx"
1769+
SCW_SECRET_KEY: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1770+
SCW_DEFAULT_PROJECT_ID: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
1771+
SCW_DEFAULT_REGION: "fr-par"
1772+
SCW_DEFAULT_ZONE: "fr-par-1"
1773+
PN_ID: "" # If your have a private network on your cluster, you may set its ID here.
1774+
EOF
1775+
```
1776+
1777+
Finally, you can deploy the `scaleway-cloud-controller-manager`:
1778+
1779+
```bash
1780+
kubectl apply -f https://raw.githubusercontent.com/scaleway/scaleway-cloud-controller-manager/master/examples/k8s-scaleway-ccm-latest.yml
1781+
```
1782+
1783+
For more detailed information on configuring and using the Scaleway external cloud
1784+
provider, see the [scaleway-cloud-controller-manager repository](https://github.com/scaleway/scaleway-cloud-controller-manager).
1785+
17211786
{{#/tab }}
17221787
{{#/tabs }}
17231788
@@ -1967,3 +2032,4 @@ kind delete cluster
19672032
[Proxmox getting started guide]: https://github.com/ionos-cloud/cluster-api-provider-proxmox/blob/main/docs/Usage.md
19682033
[Tinkerbell getting started guide]: https://github.com/tinkerbell/cluster-api-provider-tinkerbell/blob/main/docs/QUICK-START.md
19692034
[CAPONE Wiki]: https://github.com/OpenNebula/cluster-api-provider-opennebula/wiki
2035+
[CAPS getting started guide]: https://github.com/scaleway/cluster-api-provider-scaleway/blob/main/docs/getting-started.md

0 commit comments

Comments
 (0)