Skip to content

Commit 55c2b96

Browse files
sk4zuzuk8s-infra-cherrypick-robot
authored andcommitted
Add OpenNebula infrastructure provider to clusterctl
1 parent a17ed63 commit 55c2b96

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
@@ -73,6 +73,7 @@ const (
7373
K0smotronProviderName = "k0sproject-k0smotron"
7474
IonosCloudProviderName = "ionoscloud-ionoscloud"
7575
VultrProviderName = "vultr-vultr"
76+
OpenNebulaProviderName = "opennebula"
7677
)
7778

7879
// Bootstrap providers.
@@ -339,6 +340,11 @@ func (p *providersClient) defaults() []Provider {
339340
url: "https://github.com/vultr/cluster-api-provider-vultr/releases/latest/infrastructure-components.yaml",
340341
providerType: clusterctlv1.InfrastructureProviderType,
341342
},
343+
&provider{
344+
name: OpenNebulaProviderName,
345+
url: "https://github.com/OpenNebula/cluster-api-provider-opennebula/releases/latest/infrastructure-components.yaml",
346+
providerType: clusterctlv1.InfrastructureProviderType,
347+
},
342348

343349
// Bootstrap providers
344350
&provider{

cmd/clusterctl/client/config_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
9797
config.NestedProviderName,
9898
config.NutanixProviderName,
9999
config.OCIProviderName,
100+
config.OpenNebulaProviderName,
100101
config.OpenStackProviderName,
101102
config.OutscaleProviderName,
102103
config.PacketProviderName,
@@ -165,6 +166,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
165166
config.NestedProviderName,
166167
config.NutanixProviderName,
167168
config.OCIProviderName,
169+
config.OpenNebulaProviderName,
168170
config.OpenStackProviderName,
169171
config.OutscaleProviderName,
170172
config.PacketProviderName,

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 @@ my-infra-provider InfrastructureProvider /home/.config/cluster-api/ove
145145
nested InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-nested/releases/latest/ infrastructure-components.yaml
146146
nutanix InfrastructureProvider https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/latest/ infrastructure-components.yaml
147147
oci InfrastructureProvider https://github.com/oracle/cluster-api-provider-oci/releases/latest/ infrastructure-components.yaml
148+
opennebula InfrastructureProvider https://github.com/OpenNebula/cluster-api-provider-opennebula/releases/latest/ infrastructure-components.yaml
148149
openstack InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/latest/ infrastructure-components.yaml
149150
outscale InfrastructureProvider https://github.com/outscale/cluster-api-provider-outscale/releases/latest/ infrastructure-components.yaml
150151
packet InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-packet/releases/latest/ infrastructure-components.yaml
@@ -335,6 +336,10 @@ var expectedOutputYaml = `- File: core_components.yaml
335336
Name: oci
336337
ProviderType: InfrastructureProvider
337338
URL: https://github.com/oracle/cluster-api-provider-oci/releases/latest/
339+
- File: infrastructure-components.yaml
340+
Name: opennebula
341+
ProviderType: InfrastructureProvider
342+
URL: https://github.com/OpenNebula/cluster-api-provider-opennebula/releases/latest/
338343
- File: infrastructure-components.yaml
339344
Name: openstack
340345
ProviderType: InfrastructureProvider

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ providers.
333333
| CAPK | cluster.x-k8s.io/provider=infrastructure-kubevirt |
334334
| CAPM3 | cluster.x-k8s.io/provider=infrastructure-metal3 |
335335
| CAPN | cluster.x-k8s.io/provider=infrastructure-nested |
336+
| CAPONE | cluster.x-k8s.io/provider=infrastructure-opennebula |
336337
| CAPO | cluster.x-k8s.io/provider=infrastructure-openstack |
337338
| CAPOCI | cluster.x-k8s.io/provider=infrastructure-oci |
338339
| 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
@@ -718,6 +718,16 @@ Please follow the Cluster API Provider for [Nutanix Getting Started Guide](https
718718
719719
Please follow the Cluster API Provider for [Oracle Cloud Infrastructure (OCI) Getting Started Guide][oci-provider]
720720
721+
{{#/tab }}
722+
{{#tab OpenNebula}}
723+
724+
```bash
725+
# Initialize the management cluster
726+
clusterctl init --infrastructure opennebula
727+
```
728+
729+
Please visit [OpenNebula Cluster API Provider Wiki][CAPONE Wiki].
730+
721731
{{#/tab }}
722732
{{#tab OpenStack}}
723733
@@ -895,7 +905,7 @@ before configuring a cluster with Cluster API. Instructions are provided for com
895905
Otherwise, you can look at the `clusterctl generate cluster` [command][clusterctl generate cluster] documentation for details about how to
896906
discover the list of variables required by a cluster templates.
897907
898-
{{#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"}}
908+
{{#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"}}
899909
{{#tab Akamai (Linode)}}
900910
901911
```bash
@@ -1268,6 +1278,35 @@ To see all required Nutanix environment variables execute:
12681278
clusterctl generate cluster --infrastructure nutanix --list-variables capi-quickstart
12691279
```
12701280
1281+
{{#/tab }}
1282+
{{#tab OpenNebula}}
1283+
1284+
```bash
1285+
# OpenNebula API endpoint and credentials
1286+
export ONE_XMLRPC='http://10.2.11.40:2633/RPC2'
1287+
export ONE_AUTH='oneadmin:opennebula'
1288+
1289+
# VM and VR templates to construct workload clusters from
1290+
export MACHINE_TEMPLATE_NAME='capone131'
1291+
export ROUTER_TEMPLATE_NAME='capone131-vr'
1292+
1293+
# VNs to deploy workload clusters into
1294+
export PUBLIC_NETWORK_NAME='service'
1295+
export PRIVATE_NETWORK_NAME='private'
1296+
1297+
# Name of the new workload cluster
1298+
export CLUSTER_NAME='one'
1299+
1300+
# Cloud-Provider image to deploy inside the new workload cluster
1301+
export CCM_IMG='ghcr.io/opennebula/cloud-provider-opennebula:latest'
1302+
1303+
# Initial size of the new workload cluster
1304+
export CONTROL_PLANE_MACHINE_COUNT='1'
1305+
export WORKER_MACHINE_COUNT='1'
1306+
```
1307+
1308+
Please visit [OpenNebula Cluster API Provider Wiki][CAPONE Wiki].
1309+
12711310
{{#/tab }}
12721311
{{#tab OpenStack}}
12731312
@@ -1937,3 +1976,4 @@ kind delete cluster
19371976
[CAPI Operator quickstart]: ./quick-start-operator.md
19381977
[Proxmox getting started guide]: https://github.com/ionos-cloud/cluster-api-provider-proxmox/blob/main/docs/Usage.md
19391978
[Tinkerbell getting started guide]: https://github.com/tinkerbell/cluster-api-provider-tinkerbell/blob/main/docs/QUICK-START.md
1979+
[CAPONE Wiki]: https://github.com/OpenNebula/cluster-api-provider-opennebula/wiki

0 commit comments

Comments
 (0)