Skip to content

Commit

Permalink
[release/v1.54] Support for Ubuntu 22.04 (#1441)
Browse files Browse the repository at this point in the history
* Add support for Ubuntu 22.04

Signed-off-by: Waleed Malik <[email protected]>

* Use containerd v1.5 as default when docker is selected

Signed-off-by: Waleed Malik <[email protected]>

Signed-off-by: Waleed Malik <[email protected]>
Co-authored-by: Waleed Malik <[email protected]>
  • Loading branch information
kubermatic-bot and ahmedwaleedmalik authored Sep 26, 2022
1 parent 76ef02f commit abd0793
Show file tree
Hide file tree
Showing 48 changed files with 64 additions and 51 deletions.
2 changes: 1 addition & 1 deletion docs/operating-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ Machine controller may work with other OS versions that are not listed in the ta
| RHEL | 8.x |
| Rocky Linux | 8.5 |
| SLES | SLES 15 SP3 |
| Ubuntu | 20.04 LTS |
| Ubuntu | 20.04 LTS, 22.04 LTS |
2 changes: 1 addition & 1 deletion pkg/cloudprovider/provider/alibaba/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import (
const (
machineUIDTag = "machine_uid"
centosImageName = "CentOS 7.9 64 bit"
ubuntuImageName = "Ubuntu 20.04 64 bit"
ubuntuImageName = "Ubuntu 22.04 64 bit"

finalizerInstance = "kubermatic.io/cleanup-alibaba-instance"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/cloudprovider/provider/aws/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ var (
providerconfigtypes.OperatingSystemUbuntu: {
awstypes.CPUArchitectureX86_64: {
// Be as precise as possible - otherwise we might get a nightly dev build
description: "Canonical, Ubuntu, 20.04 LTS, amd64 focal image build on ????-??-??",
description: "Canonical, Ubuntu, 22.04 LTS, amd64 jammy image build on ????-??-??",
// The AWS marketplace ID from Canonical
owner: "099720109477",
},
awstypes.CPUArchitectureARM64: {
// Be as precise as possible - otherwise we might get a nightly dev build
description: "Canonical, Ubuntu, 20.04 LTS, arm64 focal image build on ????-??-??",
description: "Canonical, Ubuntu, 22.04 LTS, arm64 jammy image build on ????-??-??",
// The AWS marketplace ID from Canonical
owner: "099720109477",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/cloudprovider/provider/azure/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ var imageReferences = map[providerconfigtypes.OperatingSystem]compute.ImageRefer
},
providerconfigtypes.OperatingSystemUbuntu: {
Publisher: to.StringPtr("Canonical"),
Offer: to.StringPtr("0001-com-ubuntu-server-focal"),
Sku: to.StringPtr("20_04-lts"),
Offer: to.StringPtr("0001-com-ubuntu-server-jammy"),
Sku: to.StringPtr("22_04-lts"),
Version: to.StringPtr("latest"),
},
providerconfigtypes.OperatingSystemRHEL: {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudprovider/provider/digitalocean/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (t *TokenSource) Token() (*oauth2.Token, error) {
func getSlugForOS(os providerconfigtypes.OperatingSystem) (string, error) {
switch os {
case providerconfigtypes.OperatingSystemUbuntu:
return "ubuntu-20-04-x64", nil
return "ubuntu-22-04-x64", nil
case providerconfigtypes.OperatingSystemCentOS:
return "centos-7-x64", nil
case providerconfigtypes.OperatingSystemRockyLinux:
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudprovider/provider/equinixmetal/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ func getDeviceByTag(client *packngo.Client, projectID, tag string) (*packngo.Dev
func getNameForOS(os providerconfigtypes.OperatingSystem) (string, error) {
switch os {
case providerconfigtypes.OperatingSystemUbuntu:
return "ubuntu_20_04", nil
return "ubuntu_22_04", nil
case providerconfigtypes.OperatingSystemCentOS:
return "centos_7", nil
case providerconfigtypes.OperatingSystemFlatcar:
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudprovider/provider/gce/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var imageProjects = map[providerconfigtypes.OperatingSystem]string{

// imageFamilies maps the OS to the Google Cloud image projects.
var imageFamilies = map[providerconfigtypes.OperatingSystem]string{
providerconfigtypes.OperatingSystemUbuntu: "ubuntu-2004-lts",
providerconfigtypes.OperatingSystemUbuntu: "ubuntu-2204-lts",
}

// diskTypes are the disk types of the Google Cloud. Map is used for
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudprovider/provider/hetzner/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type Config struct {
func getNameForOS(os providerconfigtypes.OperatingSystem) (string, error) {
switch os {
case providerconfigtypes.OperatingSystemUbuntu:
return "ubuntu-20.04", nil
return "ubuntu-22.04", nil
case providerconfigtypes.OperatingSystemCentOS:
return "centos-7", nil
case providerconfigtypes.OperatingSystemRockyLinux:
Expand Down
4 changes: 3 additions & 1 deletion pkg/containerruntime/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import (
)

const (
DefaultDockerContainerdVersion = "1.4"
LegacyDockerContainerdVersion = "1.4"
DefaultDockerContainerdVersion = "1.5"
DefaultDockerVersion = "20.10"
LegacyDockerVersion = "19.03"
)
Expand Down Expand Up @@ -89,6 +90,7 @@ func (eng *Docker) ScriptFor(os types.OperatingSystem) (string, error) {

switch os {
case types.OperatingSystemAmazonLinux2:
args.ContainerdVersion = LegacyDockerContainerdVersion
err := dockerAmazonTemplate.Execute(&buf, args)
return buf.String(), err
case types.OperatingSystemCentOS, types.OperatingSystemRHEL, types.OperatingSystemRockyLinux:
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/centos/testdata/kubelet-v1.22-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/centos/testdata/kubelet-v1.23-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/centos/testdata/kubelet-v1.23-nutanix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/centos/testdata/kubelet-v1.23-vsphere.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/rhel/testdata/kubelet-v1.22-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/rhel/testdata/kubelet-v1.22-nutanix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/rhel/testdata/kubelet-v1.23-aws-external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/rhel/testdata/kubelet-v1.23-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/rhel/testdata/pod-cidr-azure-rhel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/rockylinux/testdata/kubelet-v1.22-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/rockylinux/testdata/kubelet-v1.23-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ write_files:
yum install -y \
docker-ce-cli-20.10* \
containerd.io-1.4* \
containerd.io-1.5* \
docker-ce-20.10* \
yum-plugin-versionlock
yum versionlock add docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/ubuntu/testdata/digitalocean-dualstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_files:
EOF
apt-get install --allow-downgrades -y \
containerd.io=1.4* \
containerd.io=1.5* \
docker-ce-cli=5:20.10* \
docker-ce=5:20.10*
apt-mark hold docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/ubuntu/testdata/dist-upgrade-on-boot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ write_files:
EOF
apt-get install --allow-downgrades -y \
containerd.io=1.4* \
containerd.io=1.5* \
docker-ce-cli=5:20.10* \
docker-ce=5:20.10*
apt-mark hold docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/ubuntu/testdata/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ write_files:
EOF
apt-get install --allow-downgrades -y \
containerd.io=1.4* \
containerd.io=1.5* \
docker-ce-cli=5:20.10* \
docker-ce=5:20.10*
apt-mark hold docker-ce* containerd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_files:
EOF
apt-get install --allow-downgrades -y \
containerd.io=1.4* \
containerd.io=1.5* \
docker-ce-cli=5:20.10* \
docker-ce=5:20.10*
apt-mark hold docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/ubuntu/testdata/multiple-dns-servers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_files:
EOF
apt-get install --allow-downgrades -y \
containerd.io=1.4* \
containerd.io=1.5* \
docker-ce-cli=5:20.10* \
docker-ce=5:20.10*
apt-mark hold docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/ubuntu/testdata/multiple-ssh-keys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ write_files:
EOF
apt-get install --allow-downgrades -y \
containerd.io=1.4* \
containerd.io=1.5* \
docker-ce-cli=5:20.10* \
docker-ce=5:20.10*
apt-mark hold docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/ubuntu/testdata/nutanix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ write_files:
EOF
apt-get install --allow-downgrades -y \
containerd.io=1.4* \
containerd.io=1.5* \
docker-ce-cli=5:20.10* \
docker-ce=5:20.10*
apt-mark hold docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/ubuntu/testdata/openstack-dualstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_files:
EOF
apt-get install --allow-downgrades -y \
containerd.io=1.4* \
containerd.io=1.5* \
docker-ce-cli=5:20.10* \
docker-ce=5:20.10*
apt-mark hold docker-ce* containerd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_files:
EOF
apt-get install --allow-downgrades -y \
containerd.io=1.4* \
containerd.io=1.5* \
docker-ce-cli=5:20.10* \
docker-ce=5:20.10*
apt-mark hold docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/ubuntu/testdata/openstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_files:
EOF
apt-get install --allow-downgrades -y \
containerd.io=1.4* \
containerd.io=1.5* \
docker-ce-cli=5:20.10* \
docker-ce=5:20.10*
apt-mark hold docker-ce* containerd.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/userdata/ubuntu/testdata/version-1.22.7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_files:
EOF
apt-get install --allow-downgrades -y \
containerd.io=1.4* \
containerd.io=1.5* \
docker-ce-cli=5:20.10* \
docker-ce=5:20.10*
apt-mark hold docker-ce* containerd.io
Expand Down
Loading

0 comments on commit abd0793

Please sign in to comment.