Skip to content

Commit

Permalink
Merge pull request #9991 from makhov/k0smotron-provider
Browse files Browse the repository at this point in the history
✨ Add k0smotron provider
  • Loading branch information
k8s-ci-robot committed Jan 24, 2024
2 parents 28f0335 + ca316ab commit 26fba0d
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 46 deletions.
18 changes: 18 additions & 0 deletions cmd/clusterctl/client/config/providers_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const (
VirtinkProviderName = "virtink"
CoxEdgeProviderName = "coxedge"
ProxmoxProviderName = "proxmox"
K0smotronProviderName = "k0sproject-k0smotron"
)

// Bootstrap providers.
Expand All @@ -74,6 +75,7 @@ const (
OracleCloudNativeBootstrapProviderName = "ocne"
KubeKeyK3sBootstrapProviderName = "kubekey-k3s"
RKE2BootstrapProviderName = "rke2"
K0smotronBootstrapProviderName = "k0sproject-k0smotron"
)

// ControlPlane providers.
Expand All @@ -86,6 +88,7 @@ const (
KubeKeyK3sControlPlaneProviderName = "kubekey-k3s"
KamajiControlPlaneProviderName = "kamaji"
RKE2ControlPlaneProviderName = "rke2"
K0smotronControlPlaneProviderName = "k0sproject-k0smotron"
)

// Add-on providers.
Expand Down Expand Up @@ -276,6 +279,11 @@ func (p *providersClient) defaults() []Provider {
url: "https://github.com/ionos-cloud/cluster-api-provider-proxmox/releases/latest/infrastructure-components.yaml",
providerType: clusterctlv1.InfrastructureProviderType,
},
&provider{
name: K0smotronProviderName,
url: "https://github.com/k0sproject/k0smotron/releases/latest/infrastructure-components.yaml",
providerType: clusterctlv1.InfrastructureProviderType,
},

// Bootstrap providers
&provider{
Expand Down Expand Up @@ -308,6 +316,11 @@ func (p *providersClient) defaults() []Provider {
url: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/latest/bootstrap-components.yaml",
providerType: clusterctlv1.BootstrapProviderType,
},
&provider{
name: K0smotronBootstrapProviderName,
url: "https://github.com/k0sproject/k0smotron/releases/latest/bootstrap-components.yaml",
providerType: clusterctlv1.BootstrapProviderType,
},

// ControlPlane providers
&provider{
Expand Down Expand Up @@ -350,6 +363,11 @@ func (p *providersClient) defaults() []Provider {
url: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/latest/control-plane-components.yaml",
providerType: clusterctlv1.ControlPlaneProviderType,
},
&provider{
name: K0smotronControlPlaneProviderName,
url: "https://github.com/k0sproject/k0smotron/releases/latest/control-plane-components.yaml",
providerType: clusterctlv1.ControlPlaneProviderType,
},

// Add-on providers
&provider{
Expand Down
6 changes: 6 additions & 0 deletions cmd/clusterctl/client/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
// note: these will be sorted by name by the Providers() call, so be sure they are in alphabetical order here too
wantProviders: []string{
config.ClusterAPIProviderName,
config.K0smotronBootstrapProviderName,
config.KubeadmBootstrapProviderName,
config.KubeKeyK3sBootstrapProviderName,
config.MicroK8sBootstrapProviderName,
config.OracleCloudNativeBootstrapProviderName,
config.RKE2BootstrapProviderName,
config.TalosBootstrapProviderName,
config.K0smotronControlPlaneProviderName,
config.KamajiControlPlaneProviderName,
config.KubeadmControlPlaneProviderName,
config.KubeKeyK3sControlPlaneProviderName,
Expand All @@ -82,6 +84,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
config.HetznerProviderName,
config.IBMCloudProviderName,
config.InMemoryProviderName,
config.K0smotronProviderName,
config.KubeKeyProviderName,
config.KubevirtProviderName,
config.MAASProviderName,
Expand Down Expand Up @@ -111,12 +114,14 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
wantProviders: []string{
config.ClusterAPIProviderName,
customProviderConfig.Name(),
config.K0smotronBootstrapProviderName,
config.KubeadmBootstrapProviderName,
config.KubeKeyK3sBootstrapProviderName,
config.MicroK8sBootstrapProviderName,
config.OracleCloudNativeBootstrapProviderName,
config.RKE2BootstrapProviderName,
config.TalosBootstrapProviderName,
config.K0smotronControlPlaneProviderName,
config.KamajiControlPlaneProviderName,
config.KubeadmControlPlaneProviderName,
config.KubeKeyK3sControlPlaneProviderName,
Expand All @@ -136,6 +141,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
config.HetznerProviderName,
config.IBMCloudProviderName,
config.InMemoryProviderName,
config.K0smotronProviderName,
config.KubeKeyProviderName,
config.KubevirtProviderName,
config.MAASProviderName,
Expand Down
Loading

0 comments on commit 26fba0d

Please sign in to comment.