Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.8] 🌱 Add vultr infrastructure provider #11217

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmd/clusterctl/client/config/providers_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const (
ProxmoxProviderName = "proxmox"
K0smotronProviderName = "k0sproject-k0smotron"
IonosCloudProviderName = "ionoscloud-ionoscloud"
VultrProviderName = "vultr-vultr"
)

// Bootstrap providers.
Expand Down Expand Up @@ -313,6 +314,11 @@ func (p *providersClient) defaults() []Provider {
url: "https://github.com/ionos-cloud/cluster-api-provider-ionoscloud/releases/latest/infrastructure-components.yaml",
providerType: clusterctlv1.InfrastructureProviderType,
},
&provider{
name: VultrProviderName,
url: "https://github.com/vultr/cluster-api-provider-vultr/releases/latest/infrastructure-components.yaml",
providerType: clusterctlv1.InfrastructureProviderType,
},

// Bootstrap providers
&provider{
Expand Down
2 changes: 2 additions & 0 deletions cmd/clusterctl/client/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
config.VclusterProviderName,
config.VirtinkProviderName,
config.VSphereProviderName,
config.VultrProviderName,
config.InClusterIPAMProviderName,
config.HelmAddonProviderName,
},
Expand Down Expand Up @@ -167,6 +168,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
config.VclusterProviderName,
config.VirtinkProviderName,
config.VSphereProviderName,
config.VultrProviderName,
config.InClusterIPAMProviderName,
config.HelmAddonProviderName,
},
Expand Down
5 changes: 5 additions & 0 deletions cmd/clusterctl/cmd/config_repositories_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ vcd InfrastructureProvider https://github.com/vmware/clust
vcluster InfrastructureProvider https://github.com/loft-sh/cluster-api-provider-vcluster/releases/latest/ infrastructure-components.yaml
virtink InfrastructureProvider https://github.com/smartxworks/cluster-api-provider-virtink/releases/latest/ infrastructure-components.yaml
vsphere InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/latest/ infrastructure-components.yaml
vultr-vultr InfrastructureProvider https://github.com/vultr/cluster-api-provider-vultr/releases/latest/ infrastructure-components.yaml
in-cluster IPAMProvider https://github.com/kubernetes-sigs/cluster-api-ipam-provider-in-cluster/releases/latest/ ipam-components.yaml
helm AddonProvider https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm/releases/latest/ addon-components.yaml
`
Expand Down Expand Up @@ -362,6 +363,10 @@ var expectedOutputYaml = `- File: core_components.yaml
Name: vsphere
ProviderType: InfrastructureProvider
URL: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/latest/
- File: infrastructure-components.yaml
Name: vultr-vultr
ProviderType: InfrastructureProvider
URL: https://github.com/vultr/cluster-api-provider-vultr/releases/latest/
- File: ipam-components.yaml
Name: in-cluster
ProviderType: IPAMProvider
Expand Down
1 change: 1 addition & 0 deletions docs/book/src/reference/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ updated info about which API version they are supporting.
- [Virtink](https://github.com/smartxworks/cluster-api-provider-virtink)
- [VMware Cloud Director](https://github.com/vmware/cluster-api-provider-cloud-director)
- [vSphere](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere)
- [Vultr](https://github.com/vultr/cluster-api-provider-vultr)
- [k0smotron RemoteMachine (SSH)](https://github.com/k0sproject/k0smotron)

## IP Address Management (IPAM)
Expand Down
32 changes: 30 additions & 2 deletions docs/book/src/user/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ 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:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,Hetzner,Hivelocity,IBM Cloud,IONOS 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,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OCI,OpenStack,Outscale,Proxmox,VCD,vcluster,Virtink,vSphere,Vultr"}}
{{#tab Akamai (Linode)}}

```bash
Expand Down Expand Up @@ -793,6 +793,15 @@ clusterctl init --infrastructure vsphere
For more information about prerequisites, credentials management, or permissions for vSphere, see the [vSphere
project][vSphere getting started guide].

{{#/tab }}
{{#tab Vultr}}

```bash
export VULTR_API_KEY=<your_api_key>

# initialize the management cluster
clusterctl init --infrastructure vultr
```
{{#/tab }}
{{#/tabs }}

Expand Down Expand Up @@ -862,7 +871,7 @@ 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:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OpenStack,Outscale,Proxmox,Tinkerbell,VCD,vcluster,Virtink,vSphere"}}
{{#tabs name:"tab-configuration-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OpenStack,Outscale,Proxmox,Tinkerbell,VCD,vcluster,Virtink,vSphere,Vultr"}}
{{#tab Akamai (Linode)}}

```bash
Expand Down Expand Up @@ -1339,6 +1348,25 @@ export CONTROL_PLANE_ENDPOINT_IP="1.2.3.4"

For more information about prerequisites, credentials management, or permissions for vSphere, see the [vSphere getting started guide].

{{#/tab }}
{{#tab Vultr}}

A Cluster API compatible image must be available in your Vultr account. For instructions on how to build a compatible image see image-builder for [Vultr](https://github.com/vultr/cluster-api-provider-vultr/blob/main/docs/getting-started.md)

```bash
export CLUSTER_NAME=<clustername>
export KUBERNETES_VERSION=v1.28.9
export CONTROL_PLANE_MACHINE_COUNT=1
export CONTROL_PLANE_PLANID=<plan_id>
export WORKER_MACHINE_COUNT=1
export WORKER_PLANID=<plan_id>
export MACHINE_IMAGE=<snapshot_id>
export REGION=<region>
export PLANID=<plan_id>
export VPCID=<vpc_id>
export SSHKEY_ID=<sshKey_id>
```

{{#/tab }}
{{#/tabs }}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/apis/core/exp/v1alpha3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/apis/core/exp/v1alpha4/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading