Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.6] ✨ Add k0smotron provider #10047

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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