Skip to content

Commit a321715

Browse files
committed
Add OpenNebula infrastructure provider to clusterctl
1 parent acfdc09 commit a321715

File tree

6 files changed

+57
-2
lines changed

6 files changed

+57
-2
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
K0smotronProviderName = "k0sproject-k0smotron"
7373
IonosCloudProviderName = "ionoscloud-ionoscloud"
7474
VultrProviderName = "vultr-vultr"
75+
OpenNebulaProviderName = "opennebula"
7576
)
7677

7778
// Bootstrap providers.
@@ -333,6 +334,11 @@ func (p *providersClient) defaults() []Provider {
333334
url: "https://github.com/vultr/cluster-api-provider-vultr/releases/latest/infrastructure-components.yaml",
334335
providerType: clusterctlv1.InfrastructureProviderType,
335336
},
337+
&provider{
338+
name: OpenNebulaProviderName,
339+
url: "https://github.com/OpenNebula/cluster-api-provider-opennebula/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
@@ -96,6 +96,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
9696
config.NestedProviderName,
9797
config.NutanixProviderName,
9898
config.OCIProviderName,
99+
config.OpenNebulaProviderName,
99100
config.OpenStackProviderName,
100101
config.OutscaleProviderName,
101102
config.PacketProviderName,
@@ -163,6 +164,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
163164
config.NestedProviderName,
164165
config.NutanixProviderName,
165166
config.OCIProviderName,
167+
config.OpenNebulaProviderName,
166168
config.OpenStackProviderName,
167169
config.OutscaleProviderName,
168170
config.PacketProviderName,

cmd/clusterctl/cmd/config_repositories_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ my-infra-provider InfrastructureProvider /home/.config/cluster-api/ove
144144
nested InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-nested/releases/latest/ infrastructure-components.yaml
145145
nutanix InfrastructureProvider https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/latest/ infrastructure-components.yaml
146146
oci InfrastructureProvider https://github.com/oracle/cluster-api-provider-oci/releases/latest/ infrastructure-components.yaml
147+
opennebula InfrastructureProvider https://github.com/OpenNebula/cluster-api-provider-opennebula/releases/latest/ infrastructure-components.yaml
147148
openstack InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/latest/ infrastructure-components.yaml
148149
outscale InfrastructureProvider https://github.com/outscale/cluster-api-provider-outscale/releases/latest/ infrastructure-components.yaml
149150
packet InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-packet/releases/latest/ infrastructure-components.yaml
@@ -330,6 +331,10 @@ var expectedOutputYaml = `- File: core_components.yaml
330331
Name: oci
331332
ProviderType: InfrastructureProvider
332333
URL: https://github.com/oracle/cluster-api-provider-oci/releases/latest/
334+
- File: infrastructure-components.yaml
335+
Name: opennebula
336+
ProviderType: InfrastructureProvider
337+
URL: https://github.com/OpenNebula/cluster-api-provider-opennebula/releases/latest/
333338
- File: infrastructure-components.yaml
334339
Name: openstack
335340
ProviderType: InfrastructureProvider

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ providers.
332332
| CAPK | cluster.x-k8s.io/provider=infrastructure-kubevirt |
333333
| CAPM3 | cluster.x-k8s.io/provider=infrastructure-metal3 |
334334
| CAPN | cluster.x-k8s.io/provider=infrastructure-nested |
335+
| CAPONE | cluster.x-k8s.io/provider=infrastructure-opennebula |
335336
| CAPO | cluster.x-k8s.io/provider=infrastructure-openstack |
336337
| CAPOCI | cluster.x-k8s.io/provider=infrastructure-oci |
337338
| CAPP | cluster.x-k8s.io/provider=infrastructure-packet |

docs/book/src/reference/providers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ updated info about which API version they are supporting.
5151
- [Nested](https://github.com/kubernetes-sigs/cluster-api-provider-nested)
5252
- [Nutanix](https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix)
5353
- [Oracle Cloud Infrastructure (OCI)](https://github.com/oracle/cluster-api-provider-oci)
54+
- [OpenNebula](https://github.com/OpenNebula/cluster-api-provider-opennebula)
5455
- [OpenStack](https://github.com/kubernetes-sigs/cluster-api-provider-openstack)
5556
- [Outscale](https://github.com/outscale/cluster-api-provider-outscale)
5657
- [Proxmox](https://github.com/ionos-cloud/cluster-api-provider-proxmox)

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

Lines changed: 42 additions & 2 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,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,VCD,vcluster,Virtink,vSphere,Vultr"}}
285285
{{#tab Akamai (Linode)}}
286286
287287
```bash
@@ -729,6 +729,16 @@ Please follow the Cluster API Provider for [Nutanix Getting Started Guide](https
729729
730730
Please follow the Cluster API Provider for [Oracle Cloud Infrastructure (OCI) Getting Started Guide][oci-provider]
731731
732+
{{#/tab }}
733+
{{#tab OpenNebula}}
734+
735+
```bash
736+
# Initialize the management cluster
737+
clusterctl init --infrastructure opennebula
738+
```
739+
740+
Please visit [OpenNebula Cluster API Provider Wiki][CAPONE Wiki].
741+
732742
{{#/tab }}
733743
{{#tab OpenStack}}
734744
@@ -906,7 +916,7 @@ before configuring a cluster with Cluster API. Instructions are provided for com
906916
Otherwise, you can look at the `clusterctl generate cluster` [command][clusterctl generate cluster] documentation for details about how to
907917
discover the list of variables required by a cluster templates.
908918
909-
{{#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,OpenStack,Outscale,Proxmox,Tinkerbell,VCD,vcluster,Virtink,vSphere,Vultr"}}
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"}}
910920
{{#tab Akamai (Linode)}}
911921
912922
```bash
@@ -1292,6 +1302,35 @@ To see all required Nutanix environment variables execute:
12921302
clusterctl generate cluster --infrastructure nutanix --list-variables capi-quickstart
12931303
```
12941304
1305+
{{#/tab }}
1306+
{{#tab OpenNebula}}
1307+
1308+
```bash
1309+
# OpenNebula API endpoint and credentials
1310+
export ONE_XMLRPC='http://10.2.11.40:2633/RPC2'
1311+
export ONE_AUTH='oneadmin:opennebula'
1312+
1313+
# VM and VR templates to construct workload clusters from
1314+
export MACHINE_TEMPLATE_NAME='capone131'
1315+
export ROUTER_TEMPLATE_NAME='capone131-vr'
1316+
1317+
# VNs to deploy workload clusters into
1318+
export PUBLIC_NETWORK_NAME='service'
1319+
export PRIVATE_NETWORK_NAME='private'
1320+
1321+
# Name of the new workload cluster
1322+
export CLUSTER_NAME='one'
1323+
1324+
# Cloud-Provider image to deploy inside the new workload cluster
1325+
export CCM_IMG='ghcr.io/opennebula/cloud-provider-opennebula:latest'
1326+
1327+
# Initial size of the new workload cluster
1328+
export CONTROL_PLANE_MACHINE_COUNT='1'
1329+
export WORKER_MACHINE_COUNT='1'
1330+
```
1331+
1332+
Please visit [OpenNebula Cluster API Provider Wiki][CAPONE Wiki].
1333+
12951334
{{#/tab }}
12961335
{{#tab OpenStack}}
12971336
@@ -1969,3 +2008,4 @@ kind delete cluster
19692008
[CAPI Operator quickstart]: ./quick-start-operator.md
19702009
[Proxmox getting started guide]: https://github.com/ionos-cloud/cluster-api-provider-proxmox/blob/main/docs/Usage.md
19712010
[Tinkerbell getting started guide]: https://github.com/tinkerbell/cluster-api-provider-tinkerbell/blob/main/docs/QUICK-START.md
2011+
[CAPONE Wiki]: https://github.com/OpenNebula/cluster-api-provider-opennebula/wiki

0 commit comments

Comments
 (0)