Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for old distros #12882

Merged
merged 5 commits into from
Dec 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions docs/releases/1.23-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion nodeup/pkg/model/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 0 additions & 7 deletions nodeup/pkg/model/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 0 additions & 9 deletions nodeup/pkg/model/sysctls.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 0 additions & 5 deletions util/pkg/distributions/distributions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
11 changes: 0 additions & 11 deletions util/pkg/distributions/identify.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -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
}
Expand Down
20 changes: 10 additions & 10 deletions util/pkg/distributions/identify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down