Skip to content

Commit

Permalink
Switch back to "stable" by default
Browse files Browse the repository at this point in the history
A stable release of k8s-snap is expected to come out soon, so we'll
stick to using "stable" by default instead of "edge".
  • Loading branch information
petrutlucian94 committed Dec 5, 2024
1 parent c59f679 commit a992450
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions pkg/cloudinit/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudinit/controlplane_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudinit/controlplane_join_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudinit/worker_join_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
Expand Down

0 comments on commit a992450

Please sign in to comment.