Skip to content

Commit 222bf48

Browse files
authored
Merge pull request #7001 from carezkh/care-dev-add-virtink-infra-provider
✨ Add Virtink as infrastructure provider
2 parents 0b368a4 + 36e20a3 commit 222bf48

File tree

5 files changed

+56
-25
lines changed

5 files changed

+56
-25
lines changed

cmd/clusterctl/client/config/providers_client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ const (
5656
MAASProviderName = "maas"
5757
KubevirtProviderName = "kubevirt"
5858
VclusterProviderName = "vcluster"
59+
VirtinkProviderName = "virtink"
5960
)
6061

6162
// Bootstrap providers.
@@ -224,6 +225,11 @@ func (p *providersClient) defaults() []Provider {
224225
url: "https://github.com/loft-sh/cluster-api-provider-vcluster/releases/latest/infrastructure-components.yaml",
225226
providerType: clusterctlv1.InfrastructureProviderType,
226227
},
228+
&provider{
229+
name: VirtinkProviderName,
230+
url: "https://github.com/smartxworks/cluster-api-provider-virtink/releases/latest/infrastructure-components.yaml",
231+
providerType: clusterctlv1.InfrastructureProviderType,
232+
},
227233

228234
// Bootstrap providers
229235
&provider{

cmd/clusterctl/client/config_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
8181
config.SideroProviderName,
8282
config.VCloudDirectorProviderName,
8383
config.VclusterProviderName,
84+
config.VirtinkProviderName,
8485
config.VSphereProviderName,
8586
},
8687
wantErr: false,
@@ -119,6 +120,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
119120
config.SideroProviderName,
120121
config.VCloudDirectorProviderName,
121122
config.VclusterProviderName,
123+
config.VirtinkProviderName,
122124
config.VSphereProviderName,
123125
},
124126
wantErr: false,

cmd/clusterctl/cmd/config_repositories_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ packet InfrastructureProvider https://github.com/kubernetes-sigs/
128128
sidero InfrastructureProvider https://github.com/siderolabs/sidero/releases/latest/ infrastructure-components.yaml
129129
vcd InfrastructureProvider https://github.com/vmware/cluster-api-provider-cloud-director/releases/latest/ infrastructure-components.yaml
130130
vcluster InfrastructureProvider https://github.com/loft-sh/cluster-api-provider-vcluster/releases/latest/ infrastructure-components.yaml
131+
virtink InfrastructureProvider https://github.com/smartxworks/cluster-api-provider-virtink/releases/latest/ infrastructure-components.yaml
131132
vsphere InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/latest/ infrastructure-components.yaml
132133
`
133134

@@ -243,6 +244,10 @@ var expectedOutputYaml = `- File: core_components.yaml
243244
Name: vcluster
244245
ProviderType: InfrastructureProvider
245246
URL: https://github.com/loft-sh/cluster-api-provider-vcluster/releases/latest/
247+
- File: infrastructure-components.yaml
248+
Name: virtink
249+
ProviderType: InfrastructureProvider
250+
URL: https://github.com/smartxworks/cluster-api-provider-virtink/releases/latest/
246251
- File: infrastructure-components.yaml
247252
Name: vsphere
248253
ProviderType: InfrastructureProvider

docs/book/src/reference/providers.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,40 @@ are also sponsored by SIG Cluster Lifecycle. Check provider's documentation for
66
updated info about which API version they are supporting.
77

88
## Bootstrap
9+
- [EKS](https://github.com/kubernetes-sigs/cluster-api-provider-aws/tree/main/bootstrap/eks)
910
- [Kubeadm](https://github.com/kubernetes-sigs/cluster-api/tree/main/bootstrap/kubeadm)
1011
- [Talos](https://github.com/siderolabs/cluster-api-bootstrap-provider-talos)
11-
- [EKS](https://github.com/kubernetes-sigs/cluster-api-provider-aws/tree/main/bootstrap/eks)
1212

1313
## Infrastructure
1414
- [AWS](https://cluster-api-aws.sigs.k8s.io/)
1515
- [Azure](https://github.com/kubernetes-sigs/cluster-api-provider-azure)
1616
- [Azure Stack HCI](https://github.com/microsoft/cluster-api-provider-azurestackhci)
1717
- [BYOH](https://github.com/vmware-tanzu/cluster-api-provider-bringyourownhost)
1818
- [CloudStack](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack)
19-
- [Metal3](https://github.com/metal3-io/cluster-api-provider-metal3)
2019
- [DigitalOcean](https://github.com/kubernetes-sigs/cluster-api-provider-digitalocean)
20+
- [Equinix Metal (formerly Packet)](https://github.com/kubernetes-sigs/cluster-api-provider-packet)
2121
- [GCP](https://github.com/kubernetes-sigs/cluster-api-provider-gcp)
2222
- [Hetzner](https://github.com/syself/cluster-api-provider-hetzner)
2323
- [IBM Cloud](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud)
2424
- [KubeVirt](https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt)
2525
- [MAAS](https://github.com/spectrocloud/cluster-api-provider-maas)
26-
- [vcluster](https://github.com/loft-sh/cluster-api-provider-vcluster)
26+
- [Metal3](https://github.com/metal3-io/cluster-api-provider-metal3)
27+
- [Microvm](https://github.com/weaveworks-liquidmetal/cluster-api-provider-microvm)
2728
- [Nested](https://github.com/kubernetes-sigs/cluster-api-provider-nested)
2829
- [Nutanix](https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix)
2930
- [OCI](https://github.com/oracle/cluster-api-provider-oci)
3031
- [OpenStack](https://github.com/kubernetes-sigs/cluster-api-provider-openstack)
31-
- [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+
- [vcluster](https://github.com/loft-sh/cluster-api-provider-vcluster)
35+
- [Virtink](https://github.com/smartxworks/cluster-api-provider-virtink)
3436
- [VMware Cloud Director](https://github.com/vmware/cluster-api-provider-cloud-director)
3537
- [vSphere](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere)
36-
- [Microvm](https://github.com/weaveworks-liquidmetal/cluster-api-provider-microvm)
3738

3839
## API Adopters
3940

4041
Following are the implementations managed by third-parties adopting the standard cluster-api and/or machine-api being developed here.
4142

43+
* [Gardener Machine controller manager](https://github.com/gardener/machine-controller-manager/tree/cluster-api)
4244
* [Kubermatic machine controller](https://github.com/kubermatic/machine-controller)
4345
* [OpenShift Machine API Operator](https://github.com/openshift/machine-api-operator)
44-
* [Gardener Machine controller manager](https://github.com/gardener/machine-controller-manager/tree/cluster-api)

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

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ Additional documentation about experimental features can be found in [Experiment
206206
Depending on the infrastructure provider you are planning to use, some additional prerequisites should be satisfied
207207
before getting started with Cluster API. See below for the expected settings for common providers.
208208
209-
{{#tabs name:"tab-installation-infrastructure" tabs:"AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,Hetzner,IBM Cloud,Metal3,Nutanix,Kubevirt,OCI,OpenStack,VCD,vcluster,vSphere"}}
209+
{{#tabs name:"tab-installation-infrastructure" tabs:"AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,Hetzner,IBM Cloud,Kubevirt,Metal3,Nutanix,OCI,OpenStack,VCD,vcluster,Virtink,vSphere"}}
210210
{{#tab AWS}}
211211
212212
Download the latest binary of `clusterawsadm` from the [AWS provider releases].
@@ -436,6 +436,11 @@ export IBMCLOUD_API_KEY=<you_api_key>
436436
clusterctl init --infrastructure ibmcloud
437437
```
438438
439+
{{#/tab }}
440+
{{#tab Kubevirt}}
441+
442+
Please visit the [Kubevirt project][Kubevirt provider].
443+
439444
{{#/tab }}
440445
{{#tab Metal3}}
441446
@@ -446,11 +451,6 @@ Please visit the [Metal3 project][Metal3 provider].
446451
447452
Please follow the Cluster API Provider for [Nutanix Getting Started Guide](https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/blob/main/docs/getting_started.md)
448453
449-
{{#/tab }}
450-
{{#tab Kubevirt}}
451-
452-
Please visit the [Kubevirt project][Kubevirt provider].
453-
454454
{{#/tab }}
455455
{{#tab OCI}}
456456
@@ -484,6 +484,14 @@ clusterctl init --infrastructure vcluster
484484
485485
Please follow the Cluster API Provider for [vcluster Quick Start Guide](https://github.com/loft-sh/cluster-api-provider-vcluster/blob/main/docs/quick-start.md)
486486
487+
{{#/tab }}
488+
{{#tab Virtink}}
489+
490+
```bash
491+
# Initialize the management cluster
492+
clusterctl init --infrastructure virtink
493+
```
494+
487495
{{#/tab }}
488496
{{#tab vSphere}}
489497
@@ -571,7 +579,7 @@ before configuring a cluster with Cluster API. Instructions are provided for com
571579
Otherwise, you can look at the `clusterctl generate cluster` [command][clusterctl generate cluster] documentation for details about how to
572580
discover the list of variables required by a cluster templates.
573581
574-
{{#tabs name:"tab-configuration-infrastructure" tabs:"AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,IBM Cloud,Metal3,Nutanix,Kubevirt,OpenStack,VCD,vcluster,vSphere"}}
582+
{{#tabs name:"tab-configuration-infrastructure" tabs:"AWS,Azure,CloudStack,DigitalOcean,Docker,Equinix Metal,GCP,IBM Cloud,Kubevirt,Metal3,Nutanix,OpenStack,VCD,vcluster,Virtink,vSphere"}}
575583
{{#tab AWS}}
576584
577585
```bash
@@ -762,6 +770,17 @@ export IBMPOWERVS_NETWORK_NAME=<your-capi-network-name>
762770
763771
Please visit the [IBM Cloud provider] for more information.
764772
773+
{{#/tab }}
774+
{{#tab Kubevirt}}
775+
776+
A ClusterAPI compatible image must be available in your Kubevirt image library. For instructions on how to build a compatible image
777+
see [image-builder](https://image-builder.sigs.k8s.io/capi/capi.html).
778+
779+
To see all required Kubevirt environment variables execute:
780+
```bash
781+
clusterctl generate cluster --infrastructure kubevirt --list-variables capi-quickstart
782+
```
783+
765784
{{#/tab }}
766785
{{#tab Metal3}}
767786
@@ -802,18 +821,6 @@ To see all required Nutanix environment variables execute:
802821
clusterctl generate cluster --infrastructure nutanix --list-variables capi-quickstart
803822
```
804823
805-
{{#/tab }}
806-
{{#tab Kubevirt}}
807-
808-
A ClusterAPI compatible image must be available in your Kubevirt image library. For instructions on how to build a compatible image
809-
see [image-builder](https://image-builder.sigs.k8s.io/capi/capi.html).
810-
811-
To see all required Kubevirt environment variables execute:
812-
```bash
813-
clusterctl generate cluster --infrastructure kubevirt --list-variables capi-quickstart
814-
```
815-
816-
817824
{{#/tab }}
818825
{{#tab OpenStack}}
819826
@@ -879,6 +886,16 @@ export HELM_VALUES="service:\n type: NodePort"
879886
880887
Please see the [vcluster installation instructions](https://github.com/loft-sh/cluster-api-provider-vcluster#installation-instructions) for more details.
881888
889+
{{#/tab }}
890+
{{#tab Virtink}}
891+
892+
To see all required Virtink environment variables execute:
893+
```bash
894+
clusterctl generate cluster --infrastructure virtink --list-variables capi-quickstart
895+
```
896+
897+
See the [Virtink provider](https://github.com/smartxworks/cluster-api-provider-virtink) document for more details.
898+
882899
{{#/tab }}
883900
{{#tab vSphere}}
884901

0 commit comments

Comments
 (0)