From e53e5ad62b380c205a88440f7b4e645468a6606a Mon Sep 17 00:00:00 2001 From: Lucian Petrut Date: Wed, 4 Dec 2024 14:36:18 +0000 Subject: [PATCH] Fix default k8s snap channel This commit ensures that the "-classic/edge" channel is used if no snap channel, revision or path is provided. We cannot use "stable" since we don't have a stable channel yet. --- pkg/cloudinit/common.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/cloudinit/common.go b/pkg/cloudinit/common.go index bd3320b8..e1e22ce0 100644 --- a/pkg/cloudinit/common.go +++ b/pkg/cloudinit/common.go @@ -73,10 +73,11 @@ func NewBaseCloudConfig(data BaseUserData) (CloudConfig, error) { snapInstall := data.SnapInstallData // Default to k8s version if snap install option is not set or empty. - if snapInstall == nil { + if snapInstall == nil || snapInstall.Option == "" { + // TODO: consider using "stable" once we'll have a stable channel. snapInstall = &SnapInstallData{ Option: InstallOptionChannel, - Value: fmt.Sprintf("%d.%d-classic/stable", kubernetesVersion.Major(), kubernetesVersion.Minor()), + Value: fmt.Sprintf("%d.%d-classic/edge", kubernetesVersion.Major(), kubernetesVersion.Minor()), } }