Skip to content

Commit

Permalink
Add Azure image to alpha/stable channel
Browse files Browse the repository at this point in the history
Remove the default image hard-coded in populate_instancegroup_spec.go.
  • Loading branch information
kenji-cloudnatix committed Apr 20, 2021
1 parent af9abb4 commit 7474f9f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions channels/alpha
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions channels/stable
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 2 additions & 5 deletions upup/pkg/fi/cloudup/populate_instancegroup_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ""
Expand Down

0 comments on commit 7474f9f

Please sign in to comment.