From a992450ef68ea78fa56d274ec562aab64a3284ed Mon Sep 17 00:00:00 2001 From: Lucian Petrut Date: Thu, 5 Dec 2024 13:48:17 +0000 Subject: [PATCH] Switch back to "stable" by default A stable release of k8s-snap is expected to come out soon, so we'll stick to using "stable" by default instead of "edge". --- pkg/cloudinit/common.go | 3 +-- pkg/cloudinit/controlplane_init_test.go | 2 +- pkg/cloudinit/controlplane_join_test.go | 2 +- pkg/cloudinit/worker_join_test.go | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/cloudinit/common.go b/pkg/cloudinit/common.go index e1e22ce0..88d0e108 100644 --- a/pkg/cloudinit/common.go +++ b/pkg/cloudinit/common.go @@ -74,10 +74,9 @@ 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 || snapInstall.Option == "" { - // TODO: consider using "stable" once we'll have a stable channel. snapInstall = &SnapInstallData{ Option: InstallOptionChannel, - Value: fmt.Sprintf("%d.%d-classic/edge", kubernetesVersion.Major(), kubernetesVersion.Minor()), + Value: fmt.Sprintf("%d.%d-classic/stable", kubernetesVersion.Major(), kubernetesVersion.Minor()), } } diff --git a/pkg/cloudinit/controlplane_init_test.go b/pkg/cloudinit/controlplane_init_test.go index d46b66a3..676fe9ae 100644 --- a/pkg/cloudinit/controlplane_init_test.go +++ b/pkg/cloudinit/controlplane_init_test.go @@ -246,7 +246,7 @@ func TestNewInitControlPlaneSnapInstall(t *testing.T) { g.Expect(err).NotTo(HaveOccurred()) g.Expect(config.WriteFiles).To(ContainElement(gstruct.MatchFields(gstruct.IgnoreExtras, gstruct.Fields{ "Path": Equal(fmt.Sprintf("/capi/etc/snap-%s", cloudinit.InstallOptionChannel)), - "Content": Equal("1.30-classic/edge"), + "Content": Equal("1.30-classic/stable"), }))) g.Expect(config.WriteFiles).ToNot(ContainElement(HaveField("Path", fmt.Sprintf("/capi/etc/snap-%s", cloudinit.InstallOptionRevision)))) g.Expect(config.WriteFiles).ToNot(ContainElement(HaveField("Path", fmt.Sprintf("/capi/etc/snap-%s", cloudinit.InstallOptionLocalPath)))) diff --git a/pkg/cloudinit/controlplane_join_test.go b/pkg/cloudinit/controlplane_join_test.go index cd4afb72..57eca5c5 100644 --- a/pkg/cloudinit/controlplane_join_test.go +++ b/pkg/cloudinit/controlplane_join_test.go @@ -202,7 +202,7 @@ func TestNewJoinControlPlaneSnapInstall(t *testing.T) { g.Expect(err).NotTo(HaveOccurred()) g.Expect(config.WriteFiles).To(ContainElement(gstruct.MatchFields(gstruct.IgnoreExtras, gstruct.Fields{ "Path": Equal(fmt.Sprintf("/capi/etc/snap-%s", cloudinit.InstallOptionChannel)), - "Content": Equal("1.30-classic/edge"), + "Content": Equal("1.30-classic/stable"), }))) g.Expect(config.WriteFiles).ToNot(ContainElement(HaveField("Path", fmt.Sprintf("/capi/etc/snap-%s", cloudinit.InstallOptionRevision)))) g.Expect(config.WriteFiles).ToNot(ContainElement(HaveField("Path", fmt.Sprintf("/capi/etc/snap-%s", cloudinit.InstallOptionLocalPath)))) diff --git a/pkg/cloudinit/worker_join_test.go b/pkg/cloudinit/worker_join_test.go index 5667997e..3fbd06f6 100644 --- a/pkg/cloudinit/worker_join_test.go +++ b/pkg/cloudinit/worker_join_test.go @@ -203,7 +203,7 @@ func TestNewJoinWorkerSnapInstall(t *testing.T) { g.Expect(err).NotTo(HaveOccurred()) g.Expect(config.WriteFiles).To(ContainElement(gstruct.MatchFields(gstruct.IgnoreExtras, gstruct.Fields{ "Path": Equal(fmt.Sprintf("/capi/etc/snap-%s", cloudinit.InstallOptionChannel)), - "Content": Equal("1.30-classic/edge"), + "Content": Equal("1.30-classic/stable"), }))) g.Expect(config.WriteFiles).ToNot(ContainElement(HaveField("Path", fmt.Sprintf("/capi/etc/snap-%s", cloudinit.InstallOptionRevision)))) g.Expect(config.WriteFiles).ToNot(ContainElement(HaveField("Path", fmt.Sprintf("/capi/etc/snap-%s", cloudinit.InstallOptionLocalPath))))