mirror of https://github.com/kubernetes/kops.git
Merge pull request #11327 from hakman/ubuntu-21.04
Recognize Ubuntu 21.04
This commit is contained in:
commit
5207933bca
|
|
@ -43,6 +43,7 @@ var (
|
|||
DistributionUbuntu1804 = Distribution{packageFormat: "deb", project: "ubuntu", id: "bionic", version: 18.04}
|
||||
DistributionUbuntu2004 = Distribution{packageFormat: "deb", project: "ubuntu", id: "focal", version: 20.04}
|
||||
DistributionUbuntu2010 = Distribution{packageFormat: "deb", project: "ubuntu", id: "groovy", version: 20.10}
|
||||
DistributionUbuntu2104 = Distribution{packageFormat: "deb", project: "ubuntu", id: "hirsute", version: 21.04}
|
||||
DistributionAmazonLinux2 = Distribution{packageFormat: "rpm", project: "amazonlinux2", id: "amazonlinux2", version: 0}
|
||||
DistributionRhel7 = Distribution{packageFormat: "rpm", project: "rhel", id: "rhel7", version: 7}
|
||||
DistributionCentos7 = Distribution{packageFormat: "rpm", project: "centos", id: "centos7", version: 7}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ func FindDistribution(rootfs string) (Distribution, error) {
|
|||
return DistributionUbuntu2004, nil
|
||||
case "ubuntu-20.10":
|
||||
return DistributionUbuntu2010, nil
|
||||
case "ubuntu-21.04":
|
||||
return DistributionUbuntu2104, nil
|
||||
}
|
||||
|
||||
// Some distros have a more verbose VERSION_ID
|
||||
|
|
|
|||
|
|
@ -104,6 +104,11 @@ func TestFindDistribution(t *testing.T) {
|
|||
err: nil,
|
||||
expected: DistributionUbuntu2010,
|
||||
},
|
||||
{
|
||||
rootfs: "ubuntu2104",
|
||||
err: nil,
|
||||
expected: DistributionUbuntu2104,
|
||||
},
|
||||
{
|
||||
rootfs: "notfound",
|
||||
err: fmt.Errorf("reading /etc/os-release: open tests/notfound/etc/os-release: no such file or directory"),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
NAME="Ubuntu"
|
||||
VERSION="21.04 (Hirsute Hippo)"
|
||||
ID=ubuntu
|
||||
ID_LIKE=debian
|
||||
PRETTY_NAME="Ubuntu 21.04"
|
||||
VERSION_ID="21.04"
|
||||
HOME_URL="https://www.ubuntu.com/"
|
||||
SUPPORT_URL="https://help.ubuntu.com/"
|
||||
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
|
||||
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
|
||||
VERSION_CODENAME=hirsute
|
||||
UBUNTU_CODENAME=hirsute
|
||||
Loading…
Reference in New Issue