From 7474f9f0db58f2800faeb466a0ec67b21754e379 Mon Sep 17 00:00:00 2001 From: Kenji Kaneda Date: Tue, 20 Apr 2021 09:09:58 -0700 Subject: [PATCH] Add Azure image to alpha/stable channel Remove the default image hard-coded in populate_instancegroup_spec.go. --- channels/alpha | 4 ++++ channels/stable | 4 ++++ upup/pkg/fi/cloudup/populate_instancegroup_spec.go | 7 ++----- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/channels/alpha b/channels/alpha index 0cbaef881ca1b..36ca1baed7821 100644 --- a/channels/alpha +++ b/channels/alpha @@ -78,6 +78,10 @@ spec: providerID: gce architectureID: amd64 kubernetesVersion: ">=1.18.0" + - name: "Canonical:UbuntuServer:20.04-LTS:latest" + providerID: azure + architectureID: amd64 + kubernetesVersion: ">=1.18.0" cluster: kubernetesVersion: v1.5.8 networking: diff --git a/channels/stable b/channels/stable index 3f73bc1d33cb5..1bf6bd592e5da 100644 --- a/channels/stable +++ b/channels/stable @@ -78,6 +78,10 @@ spec: providerID: gce architectureID: amd64 kubernetesVersion: ">=1.18.0" + - name: "Canonical:UbuntuServer:20.04-LTS:latest" + providerID: azure + architectureID: amd64 + kubernetesVersion: ">=1.18.0" cluster: kubernetesVersion: v1.5.8 networking: diff --git a/upup/pkg/fi/cloudup/populate_instancegroup_spec.go b/upup/pkg/fi/cloudup/populate_instancegroup_spec.go index e7628da7fbd2a..e3f53614725fd 100644 --- a/upup/pkg/fi/cloudup/populate_instancegroup_spec.go +++ b/upup/pkg/fi/cloudup/populate_instancegroup_spec.go @@ -49,9 +49,8 @@ const ( defaultMasterMachineTypeALI = "ecs.n2.medium" defaultMasterMachineTypeAzure = "Standard_B2ms" - defaultDONodeImage = "ubuntu-20-04-x64" - defaultALINodeImage = "centos_7_04_64_20G_alibase_201701015.vhd" - defaultAzureNodeImage = "Canonical:UbuntuServer:20.04-LTS:latest" + defaultDONodeImage = "ubuntu-20-04-x64" + defaultALINodeImage = "centos_7_04_64_20G_alibase_201701015.vhd" ) // TODO: this hardcoded list can be replaced with DescribeInstanceTypes' DedicatedHostsSupported field @@ -258,8 +257,6 @@ func defaultImage(cluster *kops.Cluster, channel *kops.Channel, architecture arc return defaultDONodeImage case kops.CloudProviderALI: return defaultALINodeImage - case kops.CloudProviderAzure: - return defaultAzureNodeImage } klog.Infof("Cannot set default Image for CloudProvider=%q", cluster.Spec.CloudProvider) return ""