Merge pull request #12882 from hakman/remove_distros

Remove support for old distros
This commit is contained in:
Kubernetes Prow Robot 2021-12-03 19:36:32 -08:00 committed by GitHub
commit 5c051a203a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 51 deletions

View File

@ -14,8 +14,18 @@ This is a document to gather the release notes prior to the release.
* Support for the Lyft CNI has been removed.
* Support for CentOS 7 has been removed.
* Support for CentOS 8 has been removed.
* Support for Debian 9 has been removed.
* Support for RHEL 7 is has been removed.
* Support for Ubuntu 16.04 (Xenial) has been removed.
* Support for Ubuntu 18.04 (Bionic) has been removed.
* Cilium now has `disable-cnp-status-updates: true` by default. Set this to false if you rely on the CiliumNetworkPolicy status fields.
# Required actions
@ -26,14 +36,6 @@ This is a document to gather the release notes prior to the release.
* Support for Kubernetes version 1.19 is deprecated and will be removed in kOps 1.25.
* Support for CentOS 7 is deprecated and will be removed in future versions of kOps.
* Support for Debian 9 (Stretch) is deprecated and will be removed in future versions of kOps.
* Support for RHEL 7 is deprecated and will be removed in future versions of kOps.
* Support for Ubuntu 18.04 (Bionic) is deprecated and will be removed in future versions of kOps.
* All legacy addons are deprecated in favor of managed addons, including the [metrics server addon](https://github.com/kubernetes/kops/tree/master/addons/metrics-server) and the [autoscaler addon](https://github.com/kubernetes/kops/tree/master/addons/cluster-autoscaler).
* The `node-role.kubernetes.io/master` and `kubernetes.io/role` labels are deprecated and might be removed from control plane nodes in future versions of kOps.

View File

@ -143,7 +143,7 @@ func runDockerBuilderTest(t *testing.T, key string) {
return
}
nodeUpModelContext.Distribution = distributions.DistributionUbuntu1604
nodeUpModelContext.Distribution = distributions.DistributionUbuntu2004
if nodeUpModelContext.Cluster.Spec.Docker.SkipInstall == false {
if nodeUpModelContext.Cluster == nil || nodeUpModelContext.Cluster.Spec.Docker == nil || nodeUpModelContext.Cluster.Spec.Docker.Version == nil {

View File

@ -66,13 +66,6 @@ func (b *PackagesBuilder) Build(c *fi.ModelBuilderContext) error {
c.AddTask(&nodetasks.Package{Name: "util-linux"})
// Handle some packages differently for each distro
switch b.Distribution {
case distributions.DistributionRhel7:
// Easier to install container-selinux from CentOS than extras
c.AddTask(&nodetasks.Package{
Name: "container-selinux",
Source: s("http://vault.centos.org/7.6.1810/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm"),
Hash: s("7de4211fa0dfd240d8827b93763e1eb5f0d56411"),
})
case distributions.DistributionAmazonLinux2:
// Amazon Linux 2 doesn't have SELinux enabled by default
default:

View File

@ -131,15 +131,6 @@ func (b *SysctlBuilder) Build(c *fi.ModelBuilderContext) error {
if proxyMode == "" {
proxyMode = "iptables"
}
if proxyMode == "iptables" && (b.Distribution == distributions.DistributionCentos7 || b.Distribution == distributions.DistributionRhel7) {
sysctls = append(sysctls,
"# Flannel settings on CentOS 7",
"# Issue https://github.com/coreos/flannel/issues/902",
"net.bridge.bridge-nf-call-ip6tables=1",
"net.bridge.bridge-nf-call-iptables=1",
"")
}
}
if b.Cluster.Spec.CloudProvider == string(kops.CloudProviderAWS) {

View File

@ -37,19 +37,14 @@ type Distribution struct {
}
var (
DistributionDebian9 = Distribution{packageFormat: "deb", project: "debian", id: "stretch", version: 9}
DistributionDebian10 = Distribution{packageFormat: "deb", project: "debian", id: "buster", version: 10}
DistributionDebian11 = Distribution{packageFormat: "deb", project: "debian", id: "bullseye", version: 11}
DistributionUbuntu1604 = Distribution{packageFormat: "deb", project: "ubuntu", id: "xenial", version: 16.04}
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}
DistributionUbuntu2110 = Distribution{packageFormat: "deb", project: "ubuntu", id: "impish", version: 21.10}
DistributionUbuntu2204 = Distribution{packageFormat: "deb", project: "ubuntu", id: "jammy", version: 22.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}
DistributionRhel8 = Distribution{packageFormat: "rpm", project: "rhel", id: "rhel8", version: 8}
DistributionFlatcar = Distribution{packageFormat: "", project: "flatcar", id: "flatcar", version: 0}
DistributionContainerOS = Distribution{packageFormat: "", project: "containeros", id: "containeros", version: 0}

View File

@ -50,18 +50,10 @@ func FindDistribution(rootfs string) (Distribution, error) {
switch distro {
case "amzn-2":
return DistributionAmazonLinux2, nil
case "centos-7":
return DistributionCentos7, nil
case "debian-9":
return DistributionDebian9, nil
case "debian-10":
return DistributionDebian10, nil
case "debian-11":
return DistributionDebian11, nil
case "ubuntu-16.04":
return DistributionUbuntu1604, nil
case "ubuntu-18.04":
return DistributionUbuntu1804, nil
case "ubuntu-20.04":
return DistributionUbuntu2004, nil
case "ubuntu-20.10":
@ -81,9 +73,6 @@ func FindDistribution(rootfs string) (Distribution, error) {
if strings.HasPrefix(distro, "flatcar-") {
return DistributionFlatcar, nil
}
if strings.HasPrefix(distro, "rhel-7.") {
return DistributionRhel7, nil
}
if strings.HasPrefix(distro, "rhel-8.") {
return DistributionRhel8, nil
}

View File

@ -36,8 +36,8 @@ func TestFindDistribution(t *testing.T) {
},
{
rootfs: "centos7",
err: nil,
expected: DistributionCentos7,
err: fmt.Errorf("unsupported distro: centos-7"),
expected: Distribution{},
},
{
rootfs: "centos8",
@ -61,8 +61,8 @@ func TestFindDistribution(t *testing.T) {
},
{
rootfs: "debian9",
err: nil,
expected: DistributionDebian9,
err: fmt.Errorf("unsupported distro: debian-9"),
expected: Distribution{},
},
{
rootfs: "debian10",
@ -81,8 +81,8 @@ func TestFindDistribution(t *testing.T) {
},
{
rootfs: "rhel7",
err: nil,
expected: DistributionRhel7,
err: fmt.Errorf("unsupported distro: rhel-7.8"),
expected: Distribution{},
},
{
rootfs: "rhel8",
@ -91,13 +91,13 @@ func TestFindDistribution(t *testing.T) {
},
{
rootfs: "ubuntu1604",
err: nil,
expected: DistributionUbuntu1604,
err: fmt.Errorf("unsupported distro: ubuntu-16.04"),
expected: Distribution{},
},
{
rootfs: "ubuntu1804",
err: nil,
expected: DistributionUbuntu1804,
err: fmt.Errorf("unsupported distro: ubuntu-18.04"),
expected: Distribution{},
},
{
rootfs: "ubuntu2004",