Skip to content

Commit

Permalink
Fix default k8s snap channel
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
petrutlucian94 committed Dec 4, 2024
1 parent da28413 commit e53e5ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/cloudinit/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
}
}

Expand Down

0 comments on commit e53e5ad

Please sign in to comment.