From c4ba378e8d656422d53ccee0eb090b7bdc592e21 Mon Sep 17 00:00:00 2001 From: Evan Johnson Date: Fri, 19 Apr 2024 12:51:51 -0400 Subject: [PATCH 1/2] add support for the akamai linode-linode infrastructure provider --- .../client/config/providers_client.go | 6 +++++ cmd/clusterctl/client/config_test.go | 2 ++ .../cmd/config_repositories_test.go | 5 ++++ docs/book/src/reference/glossary.md | 3 +++ docs/book/src/reference/providers.md | 1 + docs/book/src/user/quick-start.md | 26 +++++++++++++++++-- 6 files changed, 41 insertions(+), 2 deletions(-) diff --git a/cmd/clusterctl/client/config/providers_client.go b/cmd/clusterctl/client/config/providers_client.go index 476738e3d561..5ab8f364229a 100644 --- a/cmd/clusterctl/client/config/providers_client.go +++ b/cmd/clusterctl/client/config/providers_client.go @@ -37,6 +37,7 @@ const ( // Infra providers. const ( + AkamaiProviderName = "linode-linode" AWSProviderName = "aws" AzureProviderName = "azure" BYOHProviderName = "byoh" @@ -149,6 +150,11 @@ func (p *providersClient) defaults() []Provider { }, // Infrastructure providers + &provider{ + name: AkamaiProviderName, + url: "https://github.com/linode/cluster-api-provider-linode/releases/latest/infrastructure-components.yaml", + providerType: clusterctlv1.InfrastructureProviderType, + }, &provider{ name: AWSProviderName, url: "https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/latest/infrastructure-components.yaml", diff --git a/cmd/clusterctl/client/config_test.go b/cmd/clusterctl/client/config_test.go index 4ee7a56796a3..00d860f9f29a 100644 --- a/cmd/clusterctl/client/config_test.go +++ b/cmd/clusterctl/client/config_test.go @@ -88,6 +88,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) { config.K0smotronProviderName, config.KubeKeyProviderName, config.KubevirtProviderName, + config.AkamaiProviderName, config.MAASProviderName, config.Metal3ProviderName, config.NestedProviderName, @@ -147,6 +148,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) { config.K0smotronProviderName, config.KubeKeyProviderName, config.KubevirtProviderName, + config.AkamaiProviderName, config.MAASProviderName, config.Metal3ProviderName, config.NestedProviderName, diff --git a/cmd/clusterctl/cmd/config_repositories_test.go b/cmd/clusterctl/cmd/config_repositories_test.go index a5ef73c9b8f4..6e5fd708d1c6 100644 --- a/cmd/clusterctl/cmd/config_repositories_test.go +++ b/cmd/clusterctl/cmd/config_repositories_test.go @@ -136,6 +136,7 @@ in-memory InfrastructureProvider https://github.com/kubernetes-s k0sproject-k0smotron InfrastructureProvider https://github.com/k0sproject/k0smotron/releases/latest/ infrastructure-components.yaml kubekey InfrastructureProvider https://github.com/kubesphere/kubekey/releases/latest/ infrastructure-components.yaml kubevirt InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt/releases/latest/ infrastructure-components.yaml +linode-linode InfrastructureProvider https://github.com/linode/cluster-api-provider-linode/releases/latest/ infrastructure-components.yaml maas InfrastructureProvider https://github.com/spectrocloud/cluster-api-provider-maas/releases/latest/ infrastructure-components.yaml metal3 InfrastructureProvider https://github.com/metal3-io/cluster-api-provider-metal3/releases/latest/ infrastructure-components.yaml my-infra-provider InfrastructureProvider /home/.config/cluster-api/overrides/infrastructure-docker/latest/ infrastructure-components.yaml @@ -287,6 +288,10 @@ var expectedOutputYaml = `- File: core_components.yaml Name: kubevirt ProviderType: InfrastructureProvider URL: https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt/releases/latest/ +- File: infrastructure-components.yaml + Name: linode-linode + ProviderType: InfrastructureProvider + URL: https://github.com/linode/cluster-api-provider-linode/releases/latest/ - File: infrastructure-components.yaml Name: maas ProviderType: InfrastructureProvider diff --git a/docs/book/src/reference/glossary.md b/docs/book/src/reference/glossary.md index 2b6d7103049c..a16f9da6996c 100644 --- a/docs/book/src/reference/glossary.md +++ b/docs/book/src/reference/glossary.md @@ -75,6 +75,9 @@ Cluster API Provider IBM Cloud ### CAPIO Cluster API Operator +### CAPL +Cluster API Provider Akamai (Linode) + ### CAPM3 Cluster API Provider Metal3 diff --git a/docs/book/src/reference/providers.md b/docs/book/src/reference/providers.md index 7f368ae83ead..cd598ae10af2 100644 --- a/docs/book/src/reference/providers.md +++ b/docs/book/src/reference/providers.md @@ -25,6 +25,7 @@ updated info about which API version they are supporting. - [k0smotron/k0s](https://github.com/k0sproject/k0smotron) ## Infrastructure +- [Akamai (Linode)](https://linode.github.io/cluster-api-provider-linode/) - [AWS](https://cluster-api-aws.sigs.k8s.io/) - [Azure](https://github.com/kubernetes-sigs/cluster-api-provider-azure) - [Azure Stack HCI](https://github.com/microsoft/cluster-api-provider-azurestackhci) diff --git a/docs/book/src/user/quick-start.md b/docs/book/src/user/quick-start.md index 95595a4178e7..0db0da82e304 100644 --- a/docs/book/src/user/quick-start.md +++ b/docs/book/src/user/quick-start.md @@ -281,7 +281,16 @@ Additional documentation about experimental features can be found in [Experiment Depending on the infrastructure provider you are planning to use, some additional prerequisites should be satisfied before getting started with Cluster API. See below for the expected settings for common providers. -{{#tabs name:"tab-installation-infrastructure" tabs:"AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,Hetzner,Hivelocity,IBM Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OCI,OpenStack,Outscale,Proxmox,VCD,vcluster,Virtink,vSphere"}} +{{#tabs name:"tab-installation-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,Hetzner,Hivelocity,IBM Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OCI,OpenStack,Outscale,Proxmox,VCD,vcluster,Virtink,vSphere"}} +{{#tab Akamai (Linode)}} + +```bash +export LINODE_TOKEN= + +# Initialize the management cluster +clusterctl init --infrastructure linode-linode +``` +{{#/tab }} {{#tab AWS}} Download the latest binary of `clusterawsadm` from the [AWS provider releases]. The [clusterawsadm] command line utility assists with identity and access management (IAM) for [Cluster API Provider AWS][capa]. @@ -852,7 +861,19 @@ before configuring a cluster with Cluster API. Instructions are provided for com Otherwise, you can look at the `clusterctl generate cluster` [command][clusterctl generate cluster] documentation for details about how to discover the list of variables required by a cluster templates. -{{#tabs name:"tab-configuration-infrastructure" tabs:"AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,IBM Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OpenStack,Outscale,Proxmox,VCD,vcluster,Virtink,vSphere"}} +{{#tabs name:"tab-configuration-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,IBM Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OpenStack,Outscale,Proxmox,VCD,vcluster,Virtink,vSphere"}} +{{#tab Akamai (Linode)}} + +```bash +export LINODE_REGION=us-ord +export LINODE_TOKEN= +export LINODE_CONTROL_PLANE_MACHINE_TYPE=g6-standard-2 +export LINODE_MACHINE_TYPE=g6-standard-2 +``` + +See the [Akamai (Linode) provider] for more information. + +{{#/tab }} {{#tab AWS}} ```bash @@ -1706,6 +1727,7 @@ kind delete cluster [Experimental Features]: ../tasks/experimental-features/experimental-features.md +[Akamai (Linode) provider]: https://linode.github.io/cluster-api-provider-linode/introduction.html [AWS provider prerequisites]: https://cluster-api-aws.sigs.k8s.io/topics/using-clusterawsadm-to-fulfill-prerequisites.html [AWS provider releases]: https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases [Azure Provider Prerequisites]: https://capz.sigs.k8s.io/topics/getting-started.html#prerequisites From bcd3be992a8551b3b15c595fd43c74110a93a90d Mon Sep 17 00:00:00 2001 From: Evan Johnson Date: Tue, 23 Apr 2024 13:57:53 -0400 Subject: [PATCH 2/2] rename linode provider variable --- cmd/clusterctl/client/config/providers_client.go | 4 ++-- cmd/clusterctl/client/config_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/clusterctl/client/config/providers_client.go b/cmd/clusterctl/client/config/providers_client.go index 5ab8f364229a..4bead6ba9f24 100644 --- a/cmd/clusterctl/client/config/providers_client.go +++ b/cmd/clusterctl/client/config/providers_client.go @@ -37,7 +37,6 @@ const ( // Infra providers. const ( - AkamaiProviderName = "linode-linode" AWSProviderName = "aws" AzureProviderName = "azure" BYOHProviderName = "byoh" @@ -50,6 +49,7 @@ const ( OutscaleProviderName = "outscale" IBMCloudProviderName = "ibmcloud" InMemoryProviderName = "in-memory" + LinodeProviderName = "linode-linode" Metal3ProviderName = "metal3" NestedProviderName = "nested" NutanixProviderName = "nutanix" @@ -151,7 +151,7 @@ func (p *providersClient) defaults() []Provider { // Infrastructure providers &provider{ - name: AkamaiProviderName, + name: LinodeProviderName, url: "https://github.com/linode/cluster-api-provider-linode/releases/latest/infrastructure-components.yaml", providerType: clusterctlv1.InfrastructureProviderType, }, diff --git a/cmd/clusterctl/client/config_test.go b/cmd/clusterctl/client/config_test.go index 00d860f9f29a..791bae6f2812 100644 --- a/cmd/clusterctl/client/config_test.go +++ b/cmd/clusterctl/client/config_test.go @@ -88,7 +88,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) { config.K0smotronProviderName, config.KubeKeyProviderName, config.KubevirtProviderName, - config.AkamaiProviderName, + config.LinodeProviderName, config.MAASProviderName, config.Metal3ProviderName, config.NestedProviderName, @@ -148,7 +148,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) { config.K0smotronProviderName, config.KubeKeyProviderName, config.KubevirtProviderName, - config.AkamaiProviderName, + config.LinodeProviderName, config.MAASProviderName, config.Metal3ProviderName, config.NestedProviderName,