mirror of https://github.com/kubernetes/kops.git
Merge pull request #12882 from hakman/remove_distros
Remove support for old distros
This commit is contained in:
commit
5c051a203a
|
@ -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 the Lyft CNI has been removed.
|
||||||
|
|
||||||
|
* Support for CentOS 7 has been removed.
|
||||||
|
|
||||||
* Support for CentOS 8 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.
|
* Cilium now has `disable-cnp-status-updates: true` by default. Set this to false if you rely on the CiliumNetworkPolicy status fields.
|
||||||
|
|
||||||
# Required actions
|
# 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 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).
|
* 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.
|
* 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.
|
||||||
|
|
|
@ -143,7 +143,7 @@ func runDockerBuilderTest(t *testing.T, key string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
nodeUpModelContext.Distribution = distributions.DistributionUbuntu1604
|
nodeUpModelContext.Distribution = distributions.DistributionUbuntu2004
|
||||||
|
|
||||||
if nodeUpModelContext.Cluster.Spec.Docker.SkipInstall == false {
|
if nodeUpModelContext.Cluster.Spec.Docker.SkipInstall == false {
|
||||||
if nodeUpModelContext.Cluster == nil || nodeUpModelContext.Cluster.Spec.Docker == nil || nodeUpModelContext.Cluster.Spec.Docker.Version == nil {
|
if nodeUpModelContext.Cluster == nil || nodeUpModelContext.Cluster.Spec.Docker == nil || nodeUpModelContext.Cluster.Spec.Docker.Version == nil {
|
||||||
|
|
|
@ -66,13 +66,6 @@ func (b *PackagesBuilder) Build(c *fi.ModelBuilderContext) error {
|
||||||
c.AddTask(&nodetasks.Package{Name: "util-linux"})
|
c.AddTask(&nodetasks.Package{Name: "util-linux"})
|
||||||
// Handle some packages differently for each distro
|
// Handle some packages differently for each distro
|
||||||
switch b.Distribution {
|
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:
|
case distributions.DistributionAmazonLinux2:
|
||||||
// Amazon Linux 2 doesn't have SELinux enabled by default
|
// Amazon Linux 2 doesn't have SELinux enabled by default
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -131,15 +131,6 @@ func (b *SysctlBuilder) Build(c *fi.ModelBuilderContext) error {
|
||||||
if proxyMode == "" {
|
if proxyMode == "" {
|
||||||
proxyMode = "iptables"
|
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) {
|
if b.Cluster.Spec.CloudProvider == string(kops.CloudProviderAWS) {
|
||||||
|
|
|
@ -37,19 +37,14 @@ type Distribution struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
DistributionDebian9 = Distribution{packageFormat: "deb", project: "debian", id: "stretch", version: 9}
|
|
||||||
DistributionDebian10 = Distribution{packageFormat: "deb", project: "debian", id: "buster", version: 10}
|
DistributionDebian10 = Distribution{packageFormat: "deb", project: "debian", id: "buster", version: 10}
|
||||||
DistributionDebian11 = Distribution{packageFormat: "deb", project: "debian", id: "bullseye", version: 11}
|
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}
|
DistributionUbuntu2004 = Distribution{packageFormat: "deb", project: "ubuntu", id: "focal", version: 20.04}
|
||||||
DistributionUbuntu2010 = Distribution{packageFormat: "deb", project: "ubuntu", id: "groovy", version: 20.10}
|
DistributionUbuntu2010 = Distribution{packageFormat: "deb", project: "ubuntu", id: "groovy", version: 20.10}
|
||||||
DistributionUbuntu2104 = Distribution{packageFormat: "deb", project: "ubuntu", id: "hirsute", version: 21.04}
|
DistributionUbuntu2104 = Distribution{packageFormat: "deb", project: "ubuntu", id: "hirsute", version: 21.04}
|
||||||
DistributionUbuntu2110 = Distribution{packageFormat: "deb", project: "ubuntu", id: "impish", version: 21.10}
|
DistributionUbuntu2110 = Distribution{packageFormat: "deb", project: "ubuntu", id: "impish", version: 21.10}
|
||||||
DistributionUbuntu2204 = Distribution{packageFormat: "deb", project: "ubuntu", id: "jammy", version: 22.04}
|
DistributionUbuntu2204 = Distribution{packageFormat: "deb", project: "ubuntu", id: "jammy", version: 22.04}
|
||||||
DistributionAmazonLinux2 = Distribution{packageFormat: "rpm", project: "amazonlinux2", id: "amazonlinux2", version: 0}
|
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}
|
DistributionRhel8 = Distribution{packageFormat: "rpm", project: "rhel", id: "rhel8", version: 8}
|
||||||
DistributionFlatcar = Distribution{packageFormat: "", project: "flatcar", id: "flatcar", version: 0}
|
DistributionFlatcar = Distribution{packageFormat: "", project: "flatcar", id: "flatcar", version: 0}
|
||||||
DistributionContainerOS = Distribution{packageFormat: "", project: "containeros", id: "containeros", version: 0}
|
DistributionContainerOS = Distribution{packageFormat: "", project: "containeros", id: "containeros", version: 0}
|
||||||
|
|
|
@ -50,18 +50,10 @@ func FindDistribution(rootfs string) (Distribution, error) {
|
||||||
switch distro {
|
switch distro {
|
||||||
case "amzn-2":
|
case "amzn-2":
|
||||||
return DistributionAmazonLinux2, nil
|
return DistributionAmazonLinux2, nil
|
||||||
case "centos-7":
|
|
||||||
return DistributionCentos7, nil
|
|
||||||
case "debian-9":
|
|
||||||
return DistributionDebian9, nil
|
|
||||||
case "debian-10":
|
case "debian-10":
|
||||||
return DistributionDebian10, nil
|
return DistributionDebian10, nil
|
||||||
case "debian-11":
|
case "debian-11":
|
||||||
return DistributionDebian11, nil
|
return DistributionDebian11, nil
|
||||||
case "ubuntu-16.04":
|
|
||||||
return DistributionUbuntu1604, nil
|
|
||||||
case "ubuntu-18.04":
|
|
||||||
return DistributionUbuntu1804, nil
|
|
||||||
case "ubuntu-20.04":
|
case "ubuntu-20.04":
|
||||||
return DistributionUbuntu2004, nil
|
return DistributionUbuntu2004, nil
|
||||||
case "ubuntu-20.10":
|
case "ubuntu-20.10":
|
||||||
|
@ -81,9 +73,6 @@ func FindDistribution(rootfs string) (Distribution, error) {
|
||||||
if strings.HasPrefix(distro, "flatcar-") {
|
if strings.HasPrefix(distro, "flatcar-") {
|
||||||
return DistributionFlatcar, nil
|
return DistributionFlatcar, nil
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(distro, "rhel-7.") {
|
|
||||||
return DistributionRhel7, nil
|
|
||||||
}
|
|
||||||
if strings.HasPrefix(distro, "rhel-8.") {
|
if strings.HasPrefix(distro, "rhel-8.") {
|
||||||
return DistributionRhel8, nil
|
return DistributionRhel8, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,8 +36,8 @@ func TestFindDistribution(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rootfs: "centos7",
|
rootfs: "centos7",
|
||||||
err: nil,
|
err: fmt.Errorf("unsupported distro: centos-7"),
|
||||||
expected: DistributionCentos7,
|
expected: Distribution{},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rootfs: "centos8",
|
rootfs: "centos8",
|
||||||
|
@ -61,8 +61,8 @@ func TestFindDistribution(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rootfs: "debian9",
|
rootfs: "debian9",
|
||||||
err: nil,
|
err: fmt.Errorf("unsupported distro: debian-9"),
|
||||||
expected: DistributionDebian9,
|
expected: Distribution{},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rootfs: "debian10",
|
rootfs: "debian10",
|
||||||
|
@ -81,8 +81,8 @@ func TestFindDistribution(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rootfs: "rhel7",
|
rootfs: "rhel7",
|
||||||
err: nil,
|
err: fmt.Errorf("unsupported distro: rhel-7.8"),
|
||||||
expected: DistributionRhel7,
|
expected: Distribution{},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rootfs: "rhel8",
|
rootfs: "rhel8",
|
||||||
|
@ -91,13 +91,13 @@ func TestFindDistribution(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rootfs: "ubuntu1604",
|
rootfs: "ubuntu1604",
|
||||||
err: nil,
|
err: fmt.Errorf("unsupported distro: ubuntu-16.04"),
|
||||||
expected: DistributionUbuntu1604,
|
expected: Distribution{},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rootfs: "ubuntu1804",
|
rootfs: "ubuntu1804",
|
||||||
err: nil,
|
err: fmt.Errorf("unsupported distro: ubuntu-18.04"),
|
||||||
expected: DistributionUbuntu1804,
|
expected: Distribution{},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rootfs: "ubuntu2004",
|
rootfs: "ubuntu2004",
|
||||||
|
|
Loading…
Reference in New Issue