Skip to content

Commit 57c99ae

Browse files
authored
Merge pull request #6939 from sahithi/vcdClusterctl
🌱 Clusterctl support for VMware Cloud Director as Infrastructure Provider
2 parents 2fc8bcd + f6c996e commit 57c99ae

File tree

7 files changed

+62
-21
lines changed

7 files changed

+62
-21
lines changed

cmd/clusterctl/client/config/providers_client.go

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,27 @@ const (
3535

3636
// Infra providers.
3737
const (
38-
AWSProviderName = "aws"
39-
AzureProviderName = "azure"
40-
BYOHProviderName = "byoh"
41-
CloudStackProviderName = "cloudstack"
42-
DockerProviderName = "docker"
43-
DOProviderName = "digitalocean"
44-
GCPProviderName = "gcp"
45-
HetznerProviderName = "hetzner"
46-
IBMCloudProviderName = "ibmcloud"
47-
Metal3ProviderName = "metal3"
48-
NestedProviderName = "nested"
49-
NutanixProviderName = "nutanix"
50-
OCIProviderName = "oci"
51-
OpenStackProviderName = "openstack"
52-
PacketProviderName = "packet"
53-
SideroProviderName = "sidero"
54-
VSphereProviderName = "vsphere"
55-
MAASProviderName = "maas"
56-
KubevirtProviderName = "kubevirt"
57-
VclusterProviderName = "vcluster"
38+
AWSProviderName = "aws"
39+
AzureProviderName = "azure"
40+
BYOHProviderName = "byoh"
41+
CloudStackProviderName = "cloudstack"
42+
DockerProviderName = "docker"
43+
DOProviderName = "digitalocean"
44+
GCPProviderName = "gcp"
45+
HetznerProviderName = "hetzner"
46+
IBMCloudProviderName = "ibmcloud"
47+
Metal3ProviderName = "metal3"
48+
NestedProviderName = "nested"
49+
NutanixProviderName = "nutanix"
50+
OCIProviderName = "oci"
51+
OpenStackProviderName = "openstack"
52+
PacketProviderName = "packet"
53+
SideroProviderName = "sidero"
54+
VCloudDirectorProviderName = "vcd"
55+
VSphereProviderName = "vsphere"
56+
MAASProviderName = "maas"
57+
KubevirtProviderName = "kubevirt"
58+
VclusterProviderName = "vcluster"
5859
)
5960

6061
// Bootstrap providers.
@@ -178,6 +179,11 @@ func (p *providersClient) defaults() []Provider {
178179
url: "https://github.com/siderolabs/sidero/releases/latest/infrastructure-components.yaml",
179180
providerType: clusterctlv1.InfrastructureProviderType,
180181
},
182+
&provider{
183+
name: VCloudDirectorProviderName,
184+
url: "https://github.com/vmware/cluster-api-provider-cloud-director/releases/latest/infrastructure-components.yaml",
185+
providerType: clusterctlv1.InfrastructureProviderType,
186+
},
181187
&provider{
182188
name: VSphereProviderName,
183189
url: "https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/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
@@ -79,6 +79,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
7979
config.OpenStackProviderName,
8080
config.PacketProviderName,
8181
config.SideroProviderName,
82+
config.VCloudDirectorProviderName,
8283
config.VclusterProviderName,
8384
config.VSphereProviderName,
8485
},
@@ -116,6 +117,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
116117
config.OpenStackProviderName,
117118
config.PacketProviderName,
118119
config.SideroProviderName,
120+
config.VCloudDirectorProviderName,
119121
config.VclusterProviderName,
120122
config.VSphereProviderName,
121123
},

cmd/clusterctl/cmd/config_repositories_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ oci InfrastructureProvider https://github.com/oracle/cluster-a
126126
openstack InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/latest/ infrastructure-components.yaml
127127
packet InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-packet/releases/latest/ infrastructure-components.yaml
128128
sidero InfrastructureProvider https://github.com/siderolabs/sidero/releases/latest/ infrastructure-components.yaml
129+
vcd InfrastructureProvider https://github.com/vmware/cluster-api-provider-cloud-director/releases/latest/ infrastructure-components.yaml
129130
vcluster InfrastructureProvider https://github.com/loft-sh/cluster-api-provider-vcluster/releases/latest/ infrastructure-components.yaml
130131
vsphere InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/latest/ infrastructure-components.yaml
131132
`
@@ -234,6 +235,10 @@ var expectedOutputYaml = `- File: core_components.yaml
234235
Name: sidero
235236
ProviderType: InfrastructureProvider
236237
URL: https://github.com/siderolabs/sidero/releases/latest/
238+
- File: infrastructure-components.yaml
239+
Name: vcd
240+
ProviderType: InfrastructureProvider
241+
URL: https://github.com/vmware/cluster-api-provider-cloud-director/releases/latest/
237242
- File: infrastructure-components.yaml
238243
Name: vcluster
239244
ProviderType: InfrastructureProvider

docs/book/src/clusterctl/provider-contract.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ providers.
254254
|CAPP | cluster.x-k8s.io/provider=infrastructure-packet |
255255
|CAPV | cluster.x-k8s.io/provider=infrastructure-vsphere |
256256
|CAPVC | cluster.x-k8s.io/provider=infrastructure-vcluster |
257+
|CAPVCD | cluster.x-k8s.io/provider=infrastructure-vcd |
257258
|CAPX | cluster.x-k8s.io/provider=infrastructure-nutanix |
258259
|CAPZ | cluster.x-k8s.io/provider=infrastructure-azure |
259260

docs/book/src/reference/glossary.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ Cluster API Provider vSphere
7777
### CAPVC
7878
Cluster API Provider vcluster
7979

80+
### CAPVCD
81+
Cluster API Provider VMware Cloud Director
82+
8083
### CAPZ
8184
Cluster API Provider Azure
8285

docs/book/src/reference/providers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ updated info about which API version they are supporting.
3131
- [Equinix Metal (formerly Packet)](https://github.com/kubernetes-sigs/cluster-api-provider-packet)
3232
- [Sidero](https://github.com/siderolabs/sidero)
3333
- [Tencent Cloud](https://github.com/TencentCloud/cluster-api-provider-tencent)
34+
- [VMware Cloud Director](https://github.com/vmware/cluster-api-provider-cloud-director)
3435
- [vSphere](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere)
3536
- [Microvm](https://github.com/weaveworks-liquidmetal/cluster-api-provider-microvm)
3637

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

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Additional documentation about experimental features can be found in [Experiment
202202
Depending on the infrastructure provider you are planning to use, some additional prerequisites should be satisfied
203203
before getting started with Cluster API. See below for the expected settings for common providers.
204204
205-
{{#tabs name:"tab-installation-infrastructure" tabs:"AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,Hetzner,IBM Cloud,Metal3,Nutanix,Kubevirt,OCI,OpenStack,vSphere"}}
205+
{{#tabs name:"tab-installation-infrastructure" tabs:"AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,Hetzner,IBM Cloud,Metal3,Nutanix,Kubevirt,OCI,OpenStack,VCD,vSphere"}}
206206
{{#tab AWS}}
207207
208208
Download the latest binary of `clusterawsadm` from the [AWS provider releases].
@@ -460,6 +460,17 @@ Please follow the Cluster API Provider for [Oracle Cloud Infrastructure (OCI) Ge
460460
clusterctl init --infrastructure openstack
461461
```
462462
463+
{{#/tab }}
464+
{{#tab VCD}}
465+
466+
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)
467+
468+
EXP_CLUSTER_RESOURCE_SET: "true"
469+
```bash
470+
# Initialize the management cluster
471+
clusterctl init --infrastructure vcd
472+
```
473+
463474
{{#/tab }}
464475
{{#tab vSphere}}
465476
@@ -831,6 +842,18 @@ export OPENSTACK_EXTERNAL_NETWORK_ID=<external network ID>
831842
832843
A full configuration reference can be found in [configuration.md](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/master/docs/book/src/clusteropenstack/configuration.md).
833844
845+
{{#/tab }}
846+
{{#tab VCD}}
847+
848+
A ClusterAPI compatible image must be available in your VCD catalog. For instructions on how to build and upload a compatible image
849+
see [CAPVCD](https://github.com/vmware/cluster-api-provider-cloud-director)
850+
851+
To see all required VCD environment variables execute:
852+
```bash
853+
clusterctl generate cluster --infrastructure vcd --list-variables capi-quickstart
854+
``
855+
856+
834857
{{#/tab }}
835858
{{#tab vSphere}}
836859

0 commit comments

Comments
 (0)