Skip to content

Commit

Permalink
Merge pull request #1413 from facchettos/k0s-dual-stack
Browse files Browse the repository at this point in the history
disabled dualstack for k0s
  • Loading branch information
FabianKramm authored Dec 15, 2023
2 parents 76aeeb6 + 9c1f8e5 commit 781155d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/vclusterctl/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,10 @@ func (cmd *CreateCmd) prepare(ctx context.Context, vClusterName string) error {
if warning != "" {
cmd.log.Debug(warning)
}
if cmd.Distro == "k0s" {
// there is currently a problem with dualstack when we use k0s
cidr = strings.Split(cidr, ",")[0]
}
cmd.CIDR = cidr
}

Expand Down
2 changes: 2 additions & 0 deletions docs/pages/deploying-vclusters/supported-distros.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ kubectl get ns

Behind the scenes a different helm chart will be deployed (`vcluster-k0s`), that holds specific configuration to support k0s. Check the [github repository](https://github.com/loft-sh/vcluster/tree/main/charts/k0s) for all available chart options.

Please note that dual stack networking is not supported with k0s, you will be able to deploy it on a dual stack host cluster, but it will not have all the dual stack features.

## Vanilla k8s

When choosing this option, vCluster will deploy a separate etcd cluster, kubernetes controller manager and api server alongside the vCluster hypervisor.
Expand Down
2 changes: 2 additions & 0 deletions pkg/util/servicecidr/servicecidr.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ func EnsureServiceCIDRInK0sSecret(
if warning != "" {
klog.Info(warning)
}
// only return the first cidr, because k0s don't accept coma separated ones
serviceCIDR = strings.Split(serviceCIDR, ",")[0]

// apply changes
originalObject := secret.DeepCopy()
Expand Down

0 comments on commit 781155d

Please sign in to comment.