From da5293e4dfd9faafbe45a4cd763aff287b0f25c6 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Thu, 5 Jan 2023 12:17:28 +0000 Subject: [PATCH] Remove kubernetes 1.21 variants This removes the 1.21 k8s variants. This version of Kubernetes has gone end of life and we will no longer support it. Docs and other references to 1.21 have been updated to refer to more current versions. Signed-off-by: Sean McGinnis --- .github/workflows/build.yml | 18 +- BUILDING.md | 6 +- QUICKSTART-VMWARE.md | 2 +- README.md | 12 +- TESTING.md | 6 +- ...lude-IPv6-addresses-in-NodeAddresses.patch | 202 ------------------ ...address-before-comparing-with-node-I.patch | 35 --- packages/kubernetes-1.21/Cargo.toml | 33 --- packages/kubernetes-1.21/build.rs | 9 - packages/kubernetes-1.21/clarify.toml | 62 ------ .../credential-provider-config-yaml | 25 --- .../etc-kubernetes-pki-private.mount | 16 -- .../kubelet-bootstrap-kubeconfig | 22 -- packages/kubernetes-1.21/kubelet-config | 133 ------------ packages/kubernetes-1.21/kubelet-env | 4 - .../kubernetes-1.21/kubelet-exec-start-conf | 32 --- packages/kubernetes-1.21/kubelet-kubeconfig | 39 ---- packages/kubernetes-1.21/kubelet-server-crt | 3 - packages/kubernetes-1.21/kubelet-server-key | 3 - packages/kubernetes-1.21/kubelet-sysctl.conf | 2 - packages/kubernetes-1.21/kubelet.service | 26 --- packages/kubernetes-1.21/kubernetes-1.21.spec | 154 ------------- packages/kubernetes-1.21/kubernetes-ca-crt | 3 - .../kubernetes-1.21/kubernetes-tmpfiles.conf | 5 - .../kubernetes-1.21/load-ipvs-modules.conf | 3 - .../kubernetes-1.21/make-kubelet-dirs.conf | 5 - packages/kubernetes-1.21/pkg.rs | 1 - .../prepare-var-lib-kubelet.service | 23 -- .../prestart-pull-pause-ctr.conf | 9 - sources/bottlerocket-variant/src/lib.rs | 34 +-- .../conf/logdog.aws-k8s-1.21-nvidia.conf | 1 - sources/logdog/conf/logdog.aws-k8s-1.21.conf | 1 - .../logdog/conf/logdog.metal-k8s-1.21.conf | 1 - .../logdog/conf/logdog.vmware-k8s-1.21.conf | 1 - sources/models/README.md | 20 -- sources/models/src/aws-k8s-1.21 | 1 - sources/models/src/aws-k8s-1.21-nvidia | 1 - sources/models/src/lib.rs | 20 -- sources/models/src/metal-k8s-1.21 | 1 - sources/models/src/vmware-k8s-1.21 | 1 - tools/testsys/Test.toml.example | 4 +- variants/Cargo.lock | 59 ----- variants/Cargo.toml | 4 - variants/README.md | 57 +++-- variants/aws-k8s-1.21-nvidia/Cargo.toml | 47 ---- variants/aws-k8s-1.21-nvidia/build.rs | 9 - variants/aws-k8s-1.21-nvidia/lib.rs | 1 - variants/aws-k8s-1.21/Cargo.toml | 38 ---- variants/aws-k8s-1.21/build.rs | 9 - variants/aws-k8s-1.21/lib.rs | 1 - variants/metal-k8s-1.21/Cargo.toml | 42 ---- variants/metal-k8s-1.21/build.rs | 9 - variants/metal-k8s-1.21/lib.rs | 1 - variants/vmware-k8s-1.21/Cargo.toml | 41 ---- variants/vmware-k8s-1.21/build.rs | 9 - variants/vmware-k8s-1.21/lib.rs | 1 - variants/vmware-k8s-1.21/template.ovf | 1 - 57 files changed, 56 insertions(+), 1252 deletions(-) delete mode 100644 packages/kubernetes-1.21/0001-AWS-Include-IPv6-addresses-in-NodeAddresses.patch delete mode 100644 packages/kubernetes-1.21/0002-IPv6-node-address-before-comparing-with-node-I.patch delete mode 100644 packages/kubernetes-1.21/Cargo.toml delete mode 100644 packages/kubernetes-1.21/build.rs delete mode 100644 packages/kubernetes-1.21/clarify.toml delete mode 100644 packages/kubernetes-1.21/credential-provider-config-yaml delete mode 100644 packages/kubernetes-1.21/etc-kubernetes-pki-private.mount delete mode 100644 packages/kubernetes-1.21/kubelet-bootstrap-kubeconfig delete mode 100644 packages/kubernetes-1.21/kubelet-config delete mode 100644 packages/kubernetes-1.21/kubelet-env delete mode 100644 packages/kubernetes-1.21/kubelet-exec-start-conf delete mode 100644 packages/kubernetes-1.21/kubelet-kubeconfig delete mode 100644 packages/kubernetes-1.21/kubelet-server-crt delete mode 100644 packages/kubernetes-1.21/kubelet-server-key delete mode 100644 packages/kubernetes-1.21/kubelet-sysctl.conf delete mode 100644 packages/kubernetes-1.21/kubelet.service delete mode 100644 packages/kubernetes-1.21/kubernetes-1.21.spec delete mode 100644 packages/kubernetes-1.21/kubernetes-ca-crt delete mode 100644 packages/kubernetes-1.21/kubernetes-tmpfiles.conf delete mode 100644 packages/kubernetes-1.21/load-ipvs-modules.conf delete mode 100644 packages/kubernetes-1.21/make-kubelet-dirs.conf delete mode 100644 packages/kubernetes-1.21/pkg.rs delete mode 100644 packages/kubernetes-1.21/prepare-var-lib-kubelet.service delete mode 100644 packages/kubernetes-1.21/prestart-pull-pause-ctr.conf delete mode 120000 sources/logdog/conf/logdog.aws-k8s-1.21-nvidia.conf delete mode 120000 sources/logdog/conf/logdog.aws-k8s-1.21.conf delete mode 120000 sources/logdog/conf/logdog.metal-k8s-1.21.conf delete mode 120000 sources/logdog/conf/logdog.vmware-k8s-1.21.conf delete mode 120000 sources/models/src/aws-k8s-1.21 delete mode 120000 sources/models/src/aws-k8s-1.21-nvidia delete mode 120000 sources/models/src/metal-k8s-1.21 delete mode 120000 sources/models/src/vmware-k8s-1.21 delete mode 100644 variants/aws-k8s-1.21-nvidia/Cargo.toml delete mode 100644 variants/aws-k8s-1.21-nvidia/build.rs delete mode 100644 variants/aws-k8s-1.21-nvidia/lib.rs delete mode 100644 variants/aws-k8s-1.21/Cargo.toml delete mode 100644 variants/aws-k8s-1.21/build.rs delete mode 100644 variants/aws-k8s-1.21/lib.rs delete mode 100644 variants/metal-k8s-1.21/Cargo.toml delete mode 100644 variants/metal-k8s-1.21/build.rs delete mode 100644 variants/metal-k8s-1.21/lib.rs delete mode 100644 variants/vmware-k8s-1.21/Cargo.toml delete mode 100644 variants/vmware-k8s-1.21/build.rs delete mode 100644 variants/vmware-k8s-1.21/lib.rs delete mode 120000 variants/vmware-k8s-1.21/template.ovf diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bbc5222a5c0..c67c685d178 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: continue-on-error: ${{ matrix.supported }} strategy: matrix: - variant: [aws-k8s-1.21, aws-k8s-1.22, aws-k8s-1.23, aws-k8s-1.24, aws-k8s-1.25, aws-ecs-1] + variant: [aws-k8s-1.22, aws-k8s-1.23, aws-k8s-1.24, aws-k8s-1.25, aws-ecs-1] arch: [x86_64, aarch64] supported: [true] fetch-upstream: ["false"] @@ -47,10 +47,6 @@ jobs: arch: x86_64 supported: false fetch-upstream: "false" - - variant: metal-k8s-1.21 - arch: x86_64 - supported: false - fetch-upstream: "false" - variant: metal-k8s-1.22 arch: x86_64 supported: false @@ -67,10 +63,6 @@ jobs: arch: x86_64 supported: false fetch-upstream: "false" - - variant: vmware-k8s-1.21 - arch: x86_64 - supported: true - fetch-upstream: "false" - variant: vmware-k8s-1.22 arch: x86_64 supported: true @@ -87,14 +79,6 @@ jobs: arch: x86_64 supported: true fetch-upstream: "false" - - variant: aws-k8s-1.21-nvidia - arch: x86_64 - supported: true - fetch-upstream: "true" - - variant: aws-k8s-1.21-nvidia - arch: aarch64 - supported: true - fetch-upstream: "true" - variant: aws-k8s-1.22-nvidia arch: x86_64 supported: true diff --git a/BUILDING.md b/BUILDING.md index 44af8ca9396..c79b8c6f0dc 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -203,7 +203,7 @@ The specifics of building an out-of-tree module will vary by project, but the fi ### Downloading the kmod kit kmod kits are included in the official Bottlerocket repos starting with Bottlerocket v1.0.6. -Let's say you want to download the kit for building x86_64 modules for v1.7.0 and variant aws-k8s-1.21. +Let's say you want to download the kit for building x86_64 modules for v1.11.0 and variant aws-k8s-1.24. First, you need tuftool: ```shell @@ -220,8 +220,8 @@ sha512sum -c <<<"b81af4d8eb86743539fbc4709d33ada7b118d9f929f0c2f6c04e1d41f46241e Next, set your desired parameters, and download the kmod kit: ```shell ARCH=x86_64 -VERSION=v1.7.0 -VARIANT=aws-k8s-1.21 +VERSION=v1.11.0 +VARIANT=aws-k8s-1.24 OUTDIR="${VARIANT}-${VERSION}" tuftool download "${OUTDIR}" --target-name ${VARIANT}-${ARCH}-kmod-kit-${VERSION}.tar.xz \ diff --git a/QUICKSTART-VMWARE.md b/QUICKSTART-VMWARE.md index 9831911d3d8..aca51075e0d 100644 --- a/QUICKSTART-VMWARE.md +++ b/QUICKSTART-VMWARE.md @@ -46,7 +46,7 @@ Next, set your desired version and variant, and download the OVA: ```shell VERSION="v1.6.1" -VARIANT="vmware-k8s-1.21" +VARIANT="vmware-k8s-1.24" OVA="bottlerocket-${VARIANT}-x86_64-${VERSION}.ova" OUTDIR="${VARIANT}-${VERSION}" diff --git a/README.md b/README.md index aaab1841035..f805759fdfe 100644 --- a/README.md +++ b/README.md @@ -60,12 +60,10 @@ For example, an `x86_64` build of the `aws-k8s-1.24` variant will produce an ima The following variants support EKS, as described above: -* `aws-k8s-1.21` * `aws-k8s-1.22` * `aws-k8s-1.23` * `aws-k8s-1.24` * `aws-k8s-1.25` -* `aws-k8s-1.21-nvidia` * `aws-k8s-1.22-nvidia` * `aws-k8s-1.23-nvidia` * `aws-k8s-1.24-nvidia` @@ -78,7 +76,6 @@ The following variants support ECS: We also have variants that are designed to be Kubernetes worker nodes in VMware: -* `vmware-k8s-1.21` * `vmware-k8s-1.22` * `vmware-k8s-1.23` * `vmware-k8s-1.24` @@ -86,7 +83,6 @@ We also have variants that are designed to be Kubernetes worker nodes in VMware: The following variants are designed to be Kubernetes worker nodes on bare metal: -* `metal-k8s-1.21` * `metal-k8s-1.22` * `metal-k8s-1.23` * `metal-k8s-1.24` @@ -94,13 +90,7 @@ The following variants are designed to be Kubernetes worker nodes on bare metal: The following variants are no longer supported: -* `aws-k8s-1.15` -* `aws-k8s-1.16` -* `aws-k8s-1.17` -* `aws-k8s-1.18` -* `aws-k8s-1.19` -* `aws-k8s-1.20` -* `vmware-k8s-1.20` +* All Kubernetes variants using Kubernetes 1.21 and earlier We recommend users replace nodes running these variants with the [latest variant compatible with their cluster](variants/). diff --git a/TESTING.md b/TESTING.md index c914f62a526..eea1447eaf5 100644 --- a/TESTING.md +++ b/TESTING.md @@ -198,18 +198,18 @@ You will need to delete the EKS cluster manually when you are done using it. ```shell cargo make \ - -e BUILDSYS_VARIANT="aws-k8s-1.21" \ + -e BUILDSYS_VARIANT="aws-k8s-1.24" \ -e BUILDSYS_ARCH="x86_64" \ build cargo make \ - -e BUILDSYS_VARIANT="aws-k8s-1.21" \ + -e BUILDSYS_VARIANT="aws-k8s-1.24" \ -e BUILDSYS_ARCH="x86_64" \ -e PUBLISH_REGIONS="us-west-2" ami cargo make \ - -e BUILDSYS_VARIANT="aws-k8s-1.21" \ + -e BUILDSYS_VARIANT="aws-k8s-1.24" \ -e BUILDSYS_ARCH="x86_64" \ test ``` diff --git a/packages/kubernetes-1.21/0001-AWS-Include-IPv6-addresses-in-NodeAddresses.patch b/packages/kubernetes-1.21/0001-AWS-Include-IPv6-addresses-in-NodeAddresses.patch deleted file mode 100644 index 94e3c497c8d..00000000000 --- a/packages/kubernetes-1.21/0001-AWS-Include-IPv6-addresses-in-NodeAddresses.patch +++ /dev/null @@ -1,202 +0,0 @@ -From f8ea814e2d459a900bfb5e6f613dbe521b31515b Mon Sep 17 00:00:00 2001 -From: Angus Lees -Date: Thu, 19 Nov 2020 17:34:07 +1100 -Subject: [PATCH] AWS: Include IPv6 addresses in NodeAddresses - ---- - .../k8s.io/legacy-cloud-providers/aws/aws.go | 52 +++++++++++++++++++ - .../legacy-cloud-providers/aws/aws_fakes.go | 8 +++ - .../legacy-cloud-providers/aws/aws_test.go | 24 ++++++--- - 3 files changed, 78 insertions(+), 6 deletions(-) - -diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws.go -index c74eef1199f..ee773f063cb 100644 ---- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws.go -+++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws.go -@@ -24,6 +24,7 @@ import ( - "fmt" - "io" - "net" -+ "net/http" - "path" - "regexp" - "sort" -@@ -1439,6 +1440,17 @@ func (c *Cloud) HasClusterID() bool { - return len(c.tagging.clusterID()) > 0 - } - -+// isAWSNotFound returns true if the error was caused by an AWS API 404 response. -+func isAWSNotFound(err error) bool { -+ if err != nil { -+ var aerr awserr.RequestFailure -+ if errors.As(err, &aerr) { -+ return aerr.StatusCode() == http.StatusNotFound -+ } -+ } -+ return false -+} -+ - // NodeAddresses is an implementation of Instances.NodeAddresses. - func (c *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error) { - if c.selfAWSInstance.nodeName == name || len(name) == 0 { -@@ -1493,6 +1505,27 @@ func (c *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.No - } - } - -+ // IPv6. Ordered after IPv4 addresses, so legacy code can continue to just use the "first" address in a dual-stack cluster. -+ for _, macID := range macIDs { -+ ipPath := path.Join("network/interfaces/macs/", macID, "ipv6s") -+ ips, err := c.metadata.GetMetadata(ipPath) -+ if err != nil { -+ if isAWSNotFound(err) { -+ // No IPv6 configured. Not an error, just a disappointment. -+ continue -+ } -+ return nil, fmt.Errorf("error querying AWS metadata for %q: %q", ipPath, err) -+ } -+ -+ for _, ip := range strings.Split(ips, "\n") { -+ if ip == "" { -+ continue -+ } -+ // NB: "Internal" is actually about intra-cluster reachability, and not public vs private. -+ addresses = append(addresses, v1.NodeAddress{Type: v1.NodeInternalIP, Address: ip}) -+ } -+ } -+ - externalIP, err := c.metadata.GetMetadata("public-ipv4") - if err != nil { - //TODO: It would be nice to be able to determine the reason for the failure, -@@ -1582,6 +1615,25 @@ func extractNodeAddresses(instance *ec2.Instance) ([]v1.NodeAddress, error) { - } - } - -+ // IPv6. Ordered after IPv4 addresses, so legacy code can continue to just use the "first" address. -+ for _, networkInterface := range instance.NetworkInterfaces { -+ // skip network interfaces that are not currently in use -+ if aws.StringValue(networkInterface.Status) != ec2.NetworkInterfaceStatusInUse { -+ continue -+ } -+ -+ for _, addr6 := range networkInterface.Ipv6Addresses { -+ if ipAddress := aws.StringValue(addr6.Ipv6Address); ipAddress != "" { -+ ip := net.ParseIP(ipAddress) -+ if ip == nil { -+ return nil, fmt.Errorf("EC2 instance had invalid IPv6 address: %s (%q)", aws.StringValue(instance.InstanceId), ipAddress) -+ } -+ // NB: "Internal" is actually about intra-cluster reachability, and not public vs private. -+ addresses = append(addresses, v1.NodeAddress{Type: v1.NodeInternalIP, Address: ip.String()}) -+ } -+ } -+ } -+ - // TODO: Other IP addresses (multiple ips)? - publicIPAddress := aws.StringValue(instance.PublicIpAddress) - if publicIPAddress != "" { -diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_fakes.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_fakes.go -index 0113c55554f..500a81a696a 100644 ---- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_fakes.go -+++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_fakes.go -@@ -39,6 +39,7 @@ type FakeAWSServices struct { - selfInstance *ec2.Instance - networkInterfacesMacs []string - networkInterfacesPrivateIPs [][]string -+ networkInterfacesIPv6s [][]string - networkInterfacesVpcIDs []string - - ec2 FakeEC2 -@@ -374,6 +375,13 @@ func (m *FakeMetadata) GetMetadata(key string) (string, error) { - } - } - } -+ if len(keySplit) == 5 && keySplit[4] == "ipv6s" { -+ for i, macElem := range m.aws.networkInterfacesMacs { -+ if macParam == macElem { -+ return strings.Join(m.aws.networkInterfacesIPv6s[i], "/\n"), nil -+ } -+ } -+ } - - return "", nil - } -diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_test.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_test.go -index 56fd43dd12c..40c570d7bf6 100644 ---- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_test.go -+++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_test.go -@@ -583,7 +583,7 @@ func testHasNodeAddress(t *testing.T, addrs []v1.NodeAddress, addressType v1.Nod - t.Errorf("Did not find expected address: %s:%s in %v", addressType, address, addrs) - } - --func makeInstance(num int, privateIP, publicIP, privateDNSName, publicDNSName string, setNetInterface bool) ec2.Instance { -+func makeInstance(num int, privateIP, publicIP, ipv6IP, privateDNSName, publicDNSName string, setNetInterface bool) ec2.Instance { - var tag ec2.Tag - tag.Key = aws.String(TagNameKubernetesClusterLegacy) - tag.Value = aws.String(TestClusterID) -@@ -613,6 +613,14 @@ func makeInstance(num int, privateIP, publicIP, privateDNSName, publicDNSName st - }, - }, - } -+ -+ if ipv6IP != "" { -+ instance.NetworkInterfaces[0].Ipv6Addresses = []*ec2.InstanceIpv6Address{ -+ { -+ Ipv6Address: aws.String(ipv6IP), -+ }, -+ } -+ } - } - return instance - } -@@ -620,9 +628,9 @@ func makeInstance(num int, privateIP, publicIP, privateDNSName, publicDNSName st - func TestNodeAddresses(t *testing.T) { - // Note instance0 and instance1 have the same name - // (we test that this produces an error) -- instance0 := makeInstance(0, "192.168.0.1", "1.2.3.4", "instance-same.ec2.internal", "instance-same.ec2.external", true) -- instance1 := makeInstance(1, "192.168.0.2", "", "instance-same.ec2.internal", "", false) -- instance2 := makeInstance(2, "192.168.0.1", "1.2.3.4", "instance-other.ec2.internal", "", false) -+ instance0 := makeInstance(0, "192.168.0.1", "1.2.3.4", "2001:db8::1", "instance-same.ec2.internal", "instance-same.ec2.external", true) -+ instance1 := makeInstance(1, "192.168.0.2", "", "", "instance-same.ec2.internal", "", false) -+ instance2 := makeInstance(2, "192.168.0.1", "1.2.3.4", "", "instance-other.ec2.internal", "", false) - instances := []*ec2.Instance{&instance0, &instance1, &instance2} - - aws1, _ := mockInstancesResp(&instance0, []*ec2.Instance{&instance0}) -@@ -644,23 +652,25 @@ func TestNodeAddresses(t *testing.T) { - if err3 != nil { - t.Errorf("Should not error when instance found") - } -- if len(addrs3) != 5 { -+ if len(addrs3) != 6 { - t.Errorf("Should return exactly 5 NodeAddresses") - } - testHasNodeAddress(t, addrs3, v1.NodeInternalIP, "192.168.0.1") - testHasNodeAddress(t, addrs3, v1.NodeExternalIP, "1.2.3.4") -+ testHasNodeAddress(t, addrs3, v1.NodeInternalIP, "2001:db8::1") - testHasNodeAddress(t, addrs3, v1.NodeExternalDNS, "instance-same.ec2.external") - testHasNodeAddress(t, addrs3, v1.NodeInternalDNS, "instance-same.ec2.internal") - testHasNodeAddress(t, addrs3, v1.NodeHostName, "instance-same.ec2.internal") - } - - func TestNodeAddressesWithMetadata(t *testing.T) { -- instance := makeInstance(0, "", "2.3.4.5", "instance.ec2.internal", "", false) -+ instance := makeInstance(0, "", "2.3.4.5", "", "instance.ec2.internal", "", false) - instances := []*ec2.Instance{&instance} - awsCloud, awsServices := mockInstancesResp(&instance, instances) - - awsServices.networkInterfacesMacs = []string{"0a:77:89:f3:9c:f6", "0a:26:64:c4:6a:48"} - awsServices.networkInterfacesPrivateIPs = [][]string{{"192.168.0.1"}, {"192.168.0.2"}} -+ awsServices.networkInterfacesIPv6s = [][]string{{"2001:db8:1::1"}, {"2001:db8:1::2"}} - addrs, err := awsCloud.NodeAddresses(context.TODO(), "") - if err != nil { - t.Errorf("unexpected error: %v", err) -@@ -668,6 +678,8 @@ func TestNodeAddressesWithMetadata(t *testing.T) { - testHasNodeAddress(t, addrs, v1.NodeInternalIP, "192.168.0.1") - testHasNodeAddress(t, addrs, v1.NodeInternalIP, "192.168.0.2") - testHasNodeAddress(t, addrs, v1.NodeExternalIP, "2.3.4.5") -+ testHasNodeAddress(t, addrs, v1.NodeInternalIP, "2001:db8:1::1") -+ testHasNodeAddress(t, addrs, v1.NodeInternalIP, "2001:db8:1::2") - var index1, index2 int - for i, addr := range addrs { - if addr.Type == v1.NodeInternalIP && addr.Address == "192.168.0.1" { --- -2.17.1 - diff --git a/packages/kubernetes-1.21/0002-IPv6-node-address-before-comparing-with-node-I.patch b/packages/kubernetes-1.21/0002-IPv6-node-address-before-comparing-with-node-I.patch deleted file mode 100644 index 741fd67406f..00000000000 --- a/packages/kubernetes-1.21/0002-IPv6-node-address-before-comparing-with-node-I.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 5798f636260c14be4b14936d576a7dc2ccd2f88c Mon Sep 17 00:00:00 2001 -From: Erikson Tung -Date: Fri, 28 Jan 2022 18:26:29 -0800 -Subject: [PATCH] parse IPv6 node address before comparing with node IP - -IPv6 formatting might differ between `node-ip` being provided to kubelet -and the node address being provided by the cloud provider. Need to parse -node address before comparison. - -See https://github.com/kubernetes/kubernetes/pull/107736/ for the -equivalent fix for newer version of K8s (i.e. >v1.23) - -The change here does not use forked golang parsers because K8s v1.21.6 -does not have changes from https://github.com/kubernetes/kubernetes/commit/0cd75e8fec62a2531637e80bb950ac9983cac1b0 -and would be otherwise too cumbersome to carry as a patch. ---- - pkg/kubelet/nodestatus/setters.go | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pkg/kubelet/nodestatus/setters.go b/pkg/kubelet/nodestatus/setters.go -index 52f12178b66..cedf60eb951 100644 ---- a/pkg/kubelet/nodestatus/setters.go -+++ b/pkg/kubelet/nodestatus/setters.go -@@ -125,7 +125,7 @@ func NodeAddress(nodeIPs []net.IP, // typically Kubelet.nodeIPs - - nodeIPTypes := make(map[v1.NodeAddressType]bool) - for _, nodeAddress := range cloudNodeAddresses { -- if nodeAddress.Address == nodeIP.String() { -+ if net.ParseIP(nodeAddress.Address).Equal(nodeIP) { - enforcedNodeAddresses = append(enforcedNodeAddresses, v1.NodeAddress{Type: nodeAddress.Type, Address: nodeAddress.Address}) - nodeIPTypes[nodeAddress.Type] = true - } --- -2.17.1 - diff --git a/packages/kubernetes-1.21/Cargo.toml b/packages/kubernetes-1.21/Cargo.toml deleted file mode 100644 index 79ea91a8d76..00000000000 --- a/packages/kubernetes-1.21/Cargo.toml +++ /dev/null @@ -1,33 +0,0 @@ -[package] -# "." is not allowed in crate names, but we want a friendlier name for the -# directory and spec file, so we override it below. -name = "kubernetes-1_21" -version = "0.1.0" -edition = "2018" -publish = false -build = "build.rs" - -[lib] -path = "pkg.rs" - -[package.metadata.build-package] -package-name = "kubernetes-1.21" -releases-url = "https://github.com/kubernetes/kubernetes/releases" - -[[package.metadata.build-package.external-files]] -url = "https://github.com/kubernetes/kubernetes/archive/v1.21.14/kubernetes-1.21.14.tar.gz" -sha512 = "76e222413c4d5193ec2768cae23116f29e0e8c0fe4147c6cb567a1b6932cd5a8c9471fb926d447e5af798ce1cfeffeb46e8c4c890ee19d4f89a76a9a53e245b6" - -# RPM BuildRequires -[build-dependencies] -glibc = { path = "../glibc" } - -# RPM Requires -[dependencies] -aws-signing-helper = { path = "../aws-signing-helper" } -ecr-credential-provider = { path = "../ecr-credential-provider" } -# `conntrack-tools`, `containerd` and `findutils` are only needed at runtime, -# and are pulled in by `release`. -# conntrack-tools = { path = "../conntrack-tools" } -# containerd = { path = "../containerd" } -# findutils = { path = "../findutils" } diff --git a/packages/kubernetes-1.21/build.rs b/packages/kubernetes-1.21/build.rs deleted file mode 100644 index cad8999af53..00000000000 --- a/packages/kubernetes-1.21/build.rs +++ /dev/null @@ -1,9 +0,0 @@ -use std::process::{exit, Command}; - -fn main() -> Result<(), std::io::Error> { - let ret = Command::new("buildsys").arg("build-package").status()?; - if !ret.success() { - exit(1); - } - Ok(()) -} diff --git a/packages/kubernetes-1.21/clarify.toml b/packages/kubernetes-1.21/clarify.toml deleted file mode 100644 index 5b6e8b60967..00000000000 --- a/packages/kubernetes-1.21/clarify.toml +++ /dev/null @@ -1,62 +0,0 @@ -[clarify."github.com/JeffAshton/win_pdh"] -expression = "BSD-3-Clause" -license-files = [ - { path = "LICENSE", hash = 0xb221dcc9 }, -] - -[clarify."github.com/daviddengcn/go-colortext"] -expression = "BSD-3-Clause AND MIT" -license-files = [ - { path = "LICENSE", hash = 0x9769fae1 }, -] - -[clarify."github.com/ghodss/yaml"] -expression = "MIT AND BSD-3-Clause" -license-files = [ - { path = "LICENSE", hash = 0xcdf3ae00 }, -] - -[clarify."github.com/heketi/heketi"] -# kubernetes only uses code that is under LGPLv3+/Apache 2.0, not the code that is GPLv2+/LGPLv3+ -expression = "LGPL-3.0-or-later OR Apache-2.0" -license-files = [ - { path = "LICENSE", hash = 0x3c4b96d1 }, - { path = "LICENSE-APACHE2", hash = 0x438c8616 }, - { path = "COPYING-LGPLV3", hash = 0xf0bccb3a }, -] -skip-files = [ "COPYING-GPLV2" ] - -[clarify."github.com/go-bindata/go-bindata"] -expression = "CC0-1.0" -license-files = [ - { path = "LICENSE", hash = 0x393fafd6 }, -] - -[clarify."github.com/miekg/dns"] -expression = "BSD-3-Clause" -license-files = [ - { path = "COPYRIGHT", hash = 0xe41dd36c }, - { path = "LICENSE", hash = 0xfc8f12ff }, -] - -[clarify."sigs.k8s.io/yaml"] -expression = "MIT AND BSD-3-Clause" -license-files = [ - { path = "LICENSE", hash = 0xcdf3ae00 }, -] - -[clarify."honnef.co/go/tools"] -expression = "MIT AND BSD-3-Clause AND Apache-2.0" -license-files = [ - { path = "LICENSE", hash = 0xad378ed2 }, - { path = "LICENSE-THIRD-PARTY", hash = 0x546425eb }, - { path = "lint/LICENSE", hash = 0xc6b58232 }, - { path = "ssa/LICENSE", hash = 0xe656fb62 }, -] - -[clarify."github.com/storageos/go-api"] -expression = "MIT AND BSD-2-Clause" -license-files = [ - { path = "LICENCE", hash = 0x67a6861e }, -] -skip-files = ["licence.go", "types/licence.go"] diff --git a/packages/kubernetes-1.21/credential-provider-config-yaml b/packages/kubernetes-1.21/credential-provider-config-yaml deleted file mode 100644 index f089930a244..00000000000 --- a/packages/kubernetes-1.21/credential-provider-config-yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: kubelet.config.k8s.io/v1alpha1 -kind: CredentialProviderConfig -providers: -{{#if settings.kubernetes.credential-providers}} -{{#each settings.kubernetes.credential-providers}} -{{#if this.enabled}} - - name: {{@key}} - matchImages: -{{#each this.image-patterns}} - - "{{this}}" -{{/each}} - defaultCacheDuration: "{{default "12h" this.cache-duration}}" - apiVersion: credentialprovider.kubelet.k8s.io/v1alpha1 -{{#if (eq @key "ecr-credential-provider")}} - env: - - name: HOME - value: /root -{{#if settings.aws.profile}} - - name: AWS_PROFILE - value: {{settings.aws.profile}} -{{/if}} -{{/if}} -{{/if}} -{{/each}} -{{/if}} diff --git a/packages/kubernetes-1.21/etc-kubernetes-pki-private.mount b/packages/kubernetes-1.21/etc-kubernetes-pki-private.mount deleted file mode 100644 index 584e61475d1..00000000000 --- a/packages/kubernetes-1.21/etc-kubernetes-pki-private.mount +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Kubernetes PKI private directory (/etc/kubernetes/pki/private) -DefaultDependencies=no -Conflicts=umount.target -Before=local-fs.target umount.target -After=selinux-policy-files.service -Wants=selinux-policy-files.service - -[Mount] -What=tmpfs -Where=/etc/kubernetes/pki/private -Type=tmpfs -Options=nosuid,nodev,noexec,noatime,context=system_u:object_r:secret_t:s0,mode=0700 - -[Install] -WantedBy=preconfigured.target diff --git a/packages/kubernetes-1.21/kubelet-bootstrap-kubeconfig b/packages/kubernetes-1.21/kubelet-bootstrap-kubeconfig deleted file mode 100644 index 09e58523196..00000000000 --- a/packages/kubernetes-1.21/kubelet-bootstrap-kubeconfig +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: v1 -kind: Config -clusters: -- cluster: -{{#if settings.kubernetes.api-server}} - certificate-authority: "/etc/kubernetes/pki/ca.crt" - server: "{{settings.kubernetes.api-server}}" -{{/if}} - name: kubernetes -contexts: -- context: - cluster: kubernetes - user: kubelet - name: kubelet -current-context: kubelet -users: -- name: kubelet -{{#if settings.kubernetes.bootstrap-token}} - user: - token: "{{settings.kubernetes.bootstrap-token}}" -{{/if}} diff --git a/packages/kubernetes-1.21/kubelet-config b/packages/kubernetes-1.21/kubelet-config deleted file mode 100644 index 5eb37d113f8..00000000000 --- a/packages/kubernetes-1.21/kubelet-config +++ /dev/null @@ -1,133 +0,0 @@ ---- -kind: KubeletConfiguration -apiVersion: kubelet.config.k8s.io/v1beta1 -{{#if settings.kubernetes.standalone-mode}} -address: 127.0.0.1 -authentication: - anonymous: - enabled: true - webhook: - enabled: false -authorization: - mode: AlwaysAllow -{{else}} -address: 0.0.0.0 -authentication: - anonymous: - enabled: false - webhook: - cacheTTL: 2m0s - enabled: true - x509: - clientCAFile: "/etc/kubernetes/pki/ca.crt" -authorization: - mode: Webhook - webhook: - cacheAuthorizedTTL: 5m0s - cacheUnauthorizedTTL: 30s -{{/if}} -clusterDomain: {{settings.kubernetes.cluster-domain}} -{{#if settings.kubernetes.cluster-dns-ip}} -clusterDNS: -{{#each settings.kubernetes.cluster-dns-ip}} -- {{this}} -{{else}} -- {{settings.kubernetes.cluster-dns-ip}} -{{/each}} -{{/if}} -{{#if settings.kubernetes.eviction-hard}} -evictionHard: - {{#each settings.kubernetes.eviction-hard}} - {{@key}}: "{{this}}" - {{/each}} -{{/if}} -{{#if settings.kubernetes.allowed-unsafe-sysctls}} -allowedUnsafeSysctls: {{settings.kubernetes.allowed-unsafe-sysctls}} -{{/if}} -{{#if settings.kubernetes.registry-qps includeZero=true}} -registryPullQPS: {{settings.kubernetes.registry-qps}} -{{/if}} -{{#if settings.kubernetes.registry-burst includeZero=true}} -registryBurst: {{settings.kubernetes.registry-burst}} -{{/if}} -{{#if settings.kubernetes.event-qps includeZero=true}} -eventRecordQPS: {{settings.kubernetes.event-qps}} -{{/if}} -{{#if settings.kubernetes.event-burst includeZero=true}} -eventBurst: {{settings.kubernetes.event-burst}} -{{/if}} -{{#if settings.kubernetes.kube-api-qps includeZero=true}} -kubeAPIQPS: {{settings.kubernetes.kube-api-qps}} -{{/if}} -{{#if settings.kubernetes.kube-api-burst includeZero=true}} -kubeAPIBurst: {{settings.kubernetes.kube-api-burst}} -{{/if}} -kubeReserved: - cpu: "{{kube_reserve_cpu settings.kubernetes.kube-reserved.cpu}}" - {{#if settings.kubernetes.kube-reserved.memory}} - memory: "{{settings.kubernetes.kube-reserved.memory}}" - {{else}} - {{#if settings.kubernetes.max-pods}} - memory: "{{kube_reserve_memory settings.kubernetes.max-pods settings.kubernetes.kube-reserved.memory}}" - {{/if}} - {{/if}} - ephemeral-storage: "{{default "1Gi" settings.kubernetes.kube-reserved.ephemeral-storage}}" -kubeReservedCgroup: "/runtime" -{{#if settings.kubernetes.system-reserved}} -systemReserved: - {{#each settings.kubernetes.system-reserved}} - {{@key}}: "{{this}}" - {{/each}} -systemReservedCgroup: "/system" -{{/if}} -cpuManagerPolicy: {{default "none" settings.kubernetes.cpu-manager-policy}} -{{#if settings.kubernetes.cpu-manager-reconcile-period}} -cpuManagerReconcilePeriod: {{settings.kubernetes.cpu-manager-reconcile-period}} -{{/if}} -{{#if settings.kubernetes.topology-manager-scope}} -topologyManagerScope: {{settings.kubernetes.topology-manager-scope}} -{{/if}} -{{#if settings.kubernetes.topology-manager-policy}} -topologyManagerPolicy: {{settings.kubernetes.topology-manager-policy}} -{{/if}} -{{#if settings.kubernetes.pod-pids-limit includeZero=true}} -podPidsLimit: {{settings.kubernetes.pod-pids-limit}} -{{/if}} -{{#if settings.kubernetes.image-gc-high-threshold-percent includeZero=true}} -imageGCHighThresholdPercent: {{settings.kubernetes.image-gc-high-threshold-percent}} -{{/if}} -{{#if settings.kubernetes.image-gc-low-threshold-percent includeZero=true}} -imageGCLowThresholdPercent: {{settings.kubernetes.image-gc-low-threshold-percent}} -{{/if}} -{{#if settings.kubernetes.provider-id}} -providerID: {{settings.kubernetes.provider-id}} -{{/if}} -resolvConf: "/etc/resolv.conf" -hairpinMode: hairpin-veth -readOnlyPort: 0 -cgroupDriver: systemd -cgroupRoot: "/" -runtimeRequestTimeout: 15m -featureGates: - RotateKubeletServerCertificate: true - CSIMigration: false - KubeletCredentialProviders: true -protectKernelDefaults: true -serializeImagePulls: false -{{#if (and (default "" settings.kubernetes.server-certificate) (default "" settings.kubernetes.server-key))}} -tlsCertFile: "/etc/kubernetes/pki/kubelet-server.crt" -tlsPrivateKeyFile: "/etc/kubernetes/pki/private/kubelet-server.key" -{{else}} -serverTLSBootstrap: {{settings.kubernetes.server-tls-bootstrap}} -{{/if}} -tlsCipherSuites: -- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 -volumePluginDir: "/var/lib/kubelet/plugins/volume/exec" -maxPods: {{default 110 settings.kubernetes.max-pods}} -staticPodPath: "/etc/kubernetes/static-pods/" -{{#if settings.kubernetes.container-log-max-size includeZero=true}} -containerLogMaxSize: {{settings.kubernetes.container-log-max-size}} -{{/if}} -{{#if settings.kubernetes.container-log-max-files includeZero=true}} -containerLogMaxFiles: {{settings.kubernetes.container-log-max-files}} -{{/if}} diff --git a/packages/kubernetes-1.21/kubelet-env b/packages/kubernetes-1.21/kubelet-env deleted file mode 100644 index 681726d0176..00000000000 --- a/packages/kubernetes-1.21/kubelet-env +++ /dev/null @@ -1,4 +0,0 @@ -NODE_IP={{settings.kubernetes.node-ip}} -NODE_LABELS={{join_map "=" "," "no-fail-if-missing" settings.kubernetes.node-labels}} -NODE_TAINTS={{join_node_taints settings.kubernetes.node-taints}} -POD_INFRA_CONTAINER_IMAGE={{settings.kubernetes.pod-infra-container-image}} diff --git a/packages/kubernetes-1.21/kubelet-exec-start-conf b/packages/kubernetes-1.21/kubelet-exec-start-conf deleted file mode 100644 index fbaf7cbb76b..00000000000 --- a/packages/kubernetes-1.21/kubelet-exec-start-conf +++ /dev/null @@ -1,32 +0,0 @@ -[Service] -ExecStart= -ExecStart=/usr/bin/kubelet \ -{{#unless settings.kubernetes.standalone-mode}} - --cloud-provider {{default "external" settings.kubernetes.cloud-provider}} \ - --kubeconfig /etc/kubernetes/kubelet/kubeconfig \ -{{#if (eq settings.kubernetes.authentication-mode "tls")}} - --bootstrap-kubeconfig /etc/kubernetes/kubelet/bootstrap-kubeconfig \ -{{/if}} -{{else}} - --cloud-provider "" \ -{{/unless}} - --config /etc/kubernetes/kubelet/config \ - --container-runtime=remote \ - --container-runtime-endpoint=unix:///run/dockershim.sock \ - --containerd=/run/dockershim.sock \ - --network-plugin cni \ - --root-dir /var/lib/kubelet \ - --cert-dir /var/lib/kubelet/pki \ -{{#if settings.kubernetes.credential-providers}} -{{#if (any_enabled settings.kubernetes.credential-providers)}} - --image-credential-provider-bin-dir /usr/libexec/kubernetes/kubelet/plugins \ - --image-credential-provider-config /etc/kubernetes/kubelet/credential-provider-config.yaml \ -{{/if}} -{{/if}} - --node-ip ${NODE_IP} \ - --node-labels "${NODE_LABELS}" \ - --register-with-taints "${NODE_TAINTS}" \ -{{#if settings.kubernetes.log-level includeZero=true}} - -v {{settings.kubernetes.log-level}} \ -{{/if}} - --pod-infra-container-image ${POD_INFRA_CONTAINER_IMAGE} diff --git a/packages/kubernetes-1.21/kubelet-kubeconfig b/packages/kubernetes-1.21/kubelet-kubeconfig deleted file mode 100644 index f39de0e6a8a..00000000000 --- a/packages/kubernetes-1.21/kubelet-kubeconfig +++ /dev/null @@ -1,39 +0,0 @@ ---- -apiVersion: v1 -kind: Config -clusters: -- cluster: -{{#if settings.kubernetes.api-server}} - certificate-authority: "/etc/kubernetes/pki/ca.crt" - server: "{{settings.kubernetes.api-server}}" -{{/if}} - name: kubernetes -contexts: -- context: - cluster: kubernetes - user: kubelet - name: kubelet -current-context: kubelet -users: -- name: kubelet -{{#if (eq settings.kubernetes.authentication-mode "aws")}} -{{#if settings.kubernetes.cluster-name}} - user: - exec: - apiVersion: client.authentication.k8s.io/v1beta1 - command: "/usr/bin/aws-iam-authenticator" - args: - - token - - "-i" - - "{{settings.kubernetes.cluster-name}}" - {{#if settings.aws.region}} - - "--region" - - "{{settings.aws.region}}" - {{/if}} -{{/if}} -{{/if}} -{{#if (eq settings.kubernetes.authentication-mode "tls")}} - user: - client-certificate: "/var/lib/kubelet/pki/kubelet-client-current.pem" - client-key: "/var/lib/kubelet/pki/kubelet-client-current.pem" -{{/if}} diff --git a/packages/kubernetes-1.21/kubelet-server-crt b/packages/kubernetes-1.21/kubelet-server-crt deleted file mode 100644 index 21af4222ea2..00000000000 --- a/packages/kubernetes-1.21/kubelet-server-crt +++ /dev/null @@ -1,3 +0,0 @@ -{{~#if settings.kubernetes.server-certificate~}} -{{base64_decode settings.kubernetes.server-certificate}} -{{~/if~}} diff --git a/packages/kubernetes-1.21/kubelet-server-key b/packages/kubernetes-1.21/kubelet-server-key deleted file mode 100644 index 0310e76ddd8..00000000000 --- a/packages/kubernetes-1.21/kubelet-server-key +++ /dev/null @@ -1,3 +0,0 @@ -{{~#if settings.kubernetes.server-key~}} -{{base64_decode settings.kubernetes.server-key}} -{{~/if~}} diff --git a/packages/kubernetes-1.21/kubelet-sysctl.conf b/packages/kubernetes-1.21/kubelet-sysctl.conf deleted file mode 100644 index ed68c7e197f..00000000000 --- a/packages/kubernetes-1.21/kubelet-sysctl.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Overcommit handling mode - 1: Always overcommit -vm.overcommit_memory = 1 diff --git a/packages/kubernetes-1.21/kubelet.service b/packages/kubernetes-1.21/kubelet.service deleted file mode 100644 index 1285853f2d1..00000000000 --- a/packages/kubernetes-1.21/kubelet.service +++ /dev/null @@ -1,26 +0,0 @@ -[Unit] -Description=Kubelet -Documentation=https://github.com/kubernetes/kubernetes -After=containerd.service configured.target -Wants=configured.target -BindsTo=containerd.service - -[Service] -Slice=runtime.slice -Type=notify -EnvironmentFile=/etc/network/proxy.env -EnvironmentFile=/etc/kubernetes/kubelet/env -ExecStartPre=/sbin/iptables -P FORWARD ACCEPT -# Must be overridden by a drop-in file or `kubelet` won't start -ExecStart=/usr/bin/false - -Restart=always -RestartForceExitStatus=SIGPIPE -RestartSec=5 -Delegate=yes -KillMode=process -CPUAccounting=true -MemoryAccounting=true - -[Install] -WantedBy=multi-user.target diff --git a/packages/kubernetes-1.21/kubernetes-1.21.spec b/packages/kubernetes-1.21/kubernetes-1.21.spec deleted file mode 100644 index 032b8d281e5..00000000000 --- a/packages/kubernetes-1.21/kubernetes-1.21.spec +++ /dev/null @@ -1,154 +0,0 @@ -%global goproject github.com/kubernetes -%global gorepo kubernetes -%global goimport %{goproject}/%{gorepo} - -%global gover 1.21.14 -%global rpmver %{gover} - -%global _dwz_low_mem_die_limit 0 - -# The kubernetes build process expects the cross-compiler to be specified via `KUBE_*_CC` -# Here we generate that variable to use bottlerocket-specific compile aliases -# Examples of the generated variable: -# KUBE_LINUX_AMD64_CC=x86_64-bottlerocket-linux-gnu-gcc -# KUBE_LINUX_ARM64_CC=aarch64-bottlerocket-linux-gnu-gcc -%global kube_cc %{shrink: \ - %{lua: print(string.upper( \ - rpm.expand("KUBE_%{_cross_go_os}_%{_cross_go_arch}_CC=")) .. \ - rpm.expand("%{_cross_target}-gcc")) }} - -Name: %{_cross_os}%{gorepo} -Version: %{rpmver} -Release: 1%{?dist} -Summary: Container cluster management -# base Apache-2.0, third_party Apache-2.0 AND BSD-3-Clause -License: Apache-2.0 AND BSD-3-Clause -URL: https://%{goimport} -Source0: https://%{goimport}/archive/v%{gover}/%{gorepo}-%{gover}.tar.gz -Source1: kubelet.service -Source2: kubelet-env -Source3: kubelet-config -Source4: kubelet-kubeconfig -Source5: kubernetes-ca-crt -Source6: kubelet-exec-start-conf -Source7: kubelet-bootstrap-kubeconfig -Source8: kubernetes-tmpfiles.conf -Source9: kubelet-sysctl.conf -Source10: prepare-var-lib-kubelet.service -Source11: kubelet-server-crt -Source12: kubelet-server-key -Source13: etc-kubernetes-pki-private.mount -Source14: credential-provider-config-yaml - -# ExecStartPre drop-ins -Source20: prestart-pull-pause-ctr.conf -Source21: make-kubelet-dirs.conf -Source22: load-ipvs-modules.conf - -Source1000: clarify.toml - -Patch0001: 0001-AWS-Include-IPv6-addresses-in-NodeAddresses.patch -Patch0002: 0002-IPv6-node-address-before-comparing-with-node-I.patch - -BuildRequires: git -BuildRequires: rsync -BuildRequires: %{_cross_os}glibc-devel - -%description -%{summary}. - -%package -n %{_cross_os}kubelet-1.21 -Summary: Container cluster node agent -Requires: %{_cross_os}conntrack-tools -Requires: %{_cross_os}containerd -Requires: %{_cross_os}findutils -Requires: %{_cross_os}ecr-credential-provider -Requires: %{_cross_os}aws-signing-helper - -%description -n %{_cross_os}kubelet-1.21 -%{summary}. - -%prep -%autosetup -Sgit -n %{gorepo}-%{gover} -p1 - -# third_party licenses -# multiarch/qemu-user-static ignored, we're not using it -cp third_party/forked/gonum/graph/LICENSE LICENSE.gonum.graph -cp third_party/forked/shell2junit/LICENSE LICENSE.shell2junit -cp third_party/forked/golang/LICENSE LICENSE.golang -cp third_party/forked/golang/PATENTS PATENTS.golang - -%build -# Build codegen programs with the host toolchain. -make generated_files - -# Build kubelet with the target toolchain. -export KUBE_BUILD_PLATFORMS="linux/%{_cross_go_arch}" -export %{kube_cc} -export GOFLAGS='-tags=dockerless' -export GOLDFLAGS="-buildmode=pie -linkmode=external -compressdwarf=false" -make WHAT="cmd/kubelet" - -%install -output="./_output/local/bin/linux/%{_cross_go_arch}" -install -d %{buildroot}%{_cross_bindir} -install -p -m 0755 ${output}/kubelet %{buildroot}%{_cross_bindir} - -install -d %{buildroot}%{_cross_unitdir} -install -p -m 0644 %{S:1} %{S:10} %{S:13} %{buildroot}%{_cross_unitdir} - -install -d %{buildroot}%{_cross_unitdir}/kubelet.service.d -install -p -m 0644 %{S:20} %{S:21} %{S:22} %{buildroot}%{_cross_unitdir}/kubelet.service.d - -mkdir -p %{buildroot}%{_cross_templatedir} -install -m 0644 %{S:2} %{buildroot}%{_cross_templatedir}/kubelet-env -install -m 0644 %{S:3} %{buildroot}%{_cross_templatedir}/kubelet-config -install -m 0644 %{S:4} %{buildroot}%{_cross_templatedir}/kubelet-kubeconfig -install -m 0644 %{S:5} %{buildroot}%{_cross_templatedir}/kubernetes-ca-crt -install -m 0644 %{S:6} %{buildroot}%{_cross_templatedir}/kubelet-exec-start-conf -install -m 0644 %{S:7} %{buildroot}%{_cross_templatedir}/kubelet-bootstrap-kubeconfig -install -m 0644 %{S:11} %{buildroot}%{_cross_templatedir}/kubelet-server-crt -install -m 0644 %{S:12} %{buildroot}%{_cross_templatedir}/kubelet-server-key -install -m 0644 %{S:14} %{buildroot}%{_cross_templatedir}/credential-provider-config-yaml - -install -d %{buildroot}%{_cross_tmpfilesdir} -install -p -m 0644 %{S:8} %{buildroot}%{_cross_tmpfilesdir}/kubernetes.conf - -install -d %{buildroot}%{_cross_sysctldir} -install -p -m 0644 %{S:9} %{buildroot}%{_cross_sysctldir}/90-kubelet.conf - -install -d %{buildroot}%{_cross_libexecdir}/kubernetes -ln -rs \ - %{buildroot}%{_sharedstatedir}/kubelet/plugins \ - %{buildroot}%{_cross_libexecdir}/kubernetes/kubelet-plugins - -%cross_scan_attribution --clarify %{S:1000} go-vendor vendor - -%files -n %{_cross_os}kubelet-1.21 -%license LICENSE LICENSE.gonum.graph LICENSE.shell2junit LICENSE.golang PATENTS.golang -%{_cross_attribution_file} -%{_cross_attribution_vendor_dir} -%{_cross_bindir}/kubelet -%{_cross_unitdir}/kubelet.service -%{_cross_unitdir}/prepare-var-lib-kubelet.service -%{_cross_unitdir}/etc-kubernetes-pki-private.mount -%dir %{_cross_unitdir}/kubelet.service.d -%{_cross_unitdir}/kubelet.service.d/prestart-pull-pause-ctr.conf -%{_cross_unitdir}/kubelet.service.d/make-kubelet-dirs.conf -%{_cross_unitdir}/kubelet.service.d/load-ipvs-modules.conf -%dir %{_cross_templatedir} -%{_cross_templatedir}/kubelet-env -%{_cross_templatedir}/kubelet-config -%{_cross_templatedir}/kubelet-kubeconfig -%{_cross_templatedir}/kubelet-bootstrap-kubeconfig -%{_cross_templatedir}/kubelet-exec-start-conf -%{_cross_templatedir}/kubernetes-ca-crt -%{_cross_templatedir}/kubelet-server-crt -%{_cross_templatedir}/kubelet-server-key -%{_cross_templatedir}/credential-provider-config-yaml -%{_cross_tmpfilesdir}/kubernetes.conf -%{_cross_sysctldir}/90-kubelet.conf -%dir %{_cross_libexecdir}/kubernetes -%{_cross_libexecdir}/kubernetes/kubelet-plugins - -%changelog diff --git a/packages/kubernetes-1.21/kubernetes-ca-crt b/packages/kubernetes-1.21/kubernetes-ca-crt deleted file mode 100644 index ab82c485f56..00000000000 --- a/packages/kubernetes-1.21/kubernetes-ca-crt +++ /dev/null @@ -1,3 +0,0 @@ -{{~#if settings.kubernetes.cluster-certificate~}} -{{base64_decode settings.kubernetes.cluster-certificate}} -{{~/if~}} diff --git a/packages/kubernetes-1.21/kubernetes-tmpfiles.conf b/packages/kubernetes-1.21/kubernetes-tmpfiles.conf deleted file mode 100644 index 15c1deec646..00000000000 --- a/packages/kubernetes-1.21/kubernetes-tmpfiles.conf +++ /dev/null @@ -1,5 +0,0 @@ -d /etc/kubernetes/static-pods - - - - -L /etc/kubernetes/manifests - - - - static-pods -L /etc/kubernetes/secrets-store-csi-providers - - - - /var/lib/kubelet/providers/secrets-store -r! /var/lib/kubelet/cpu_manager_state -L /etc/kubernetes/node-feature-discovery/features.d - - - - /var/lib/kubelet/node-feature-discovery/features.d diff --git a/packages/kubernetes-1.21/load-ipvs-modules.conf b/packages/kubernetes-1.21/load-ipvs-modules.conf deleted file mode 100644 index e895782bdfb..00000000000 --- a/packages/kubernetes-1.21/load-ipvs-modules.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Unit] -Wants=modprobe@ip_vs_sh.service modprobe@ip_vs_rr.service modprobe@ip_vs_wrr.service -After=modprobe@ip_vs_sh.service modprobe@ip_vs_rr.service modprobe@ip_vs_wrr.service diff --git a/packages/kubernetes-1.21/make-kubelet-dirs.conf b/packages/kubernetes-1.21/make-kubelet-dirs.conf deleted file mode 100644 index a7249c9ac3f..00000000000 --- a/packages/kubernetes-1.21/make-kubelet-dirs.conf +++ /dev/null @@ -1,5 +0,0 @@ -[Service] -# Create the backing directories for symlinks in /etc -ExecStartPre=/usr/bin/mkdir -p \ - /var/lib/kubelet/providers/secrets-store \ - /var/lib/kubelet/node-feature-discovery/features.d diff --git a/packages/kubernetes-1.21/pkg.rs b/packages/kubernetes-1.21/pkg.rs deleted file mode 100644 index d799fb2d44c..00000000000 --- a/packages/kubernetes-1.21/pkg.rs +++ /dev/null @@ -1 +0,0 @@ -// not used diff --git a/packages/kubernetes-1.21/prepare-var-lib-kubelet.service b/packages/kubernetes-1.21/prepare-var-lib-kubelet.service deleted file mode 100644 index 1b8c6207aa4..00000000000 --- a/packages/kubernetes-1.21/prepare-var-lib-kubelet.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=Prepare Kubelet Directory (/var/lib/kubelet) -DefaultDependencies=no -RequiresMountsFor=/var -RefuseManualStart=true -RefuseManualStop=true - -[Service] -Type=oneshot - -# Remove an existing symlink, if present. Intentionally not recursive! -ExecStartPre=-/usr/bin/rm -f /var/lib/kubelet - -# Create /var/lib/kubelet so it is available for bind mounts. -ExecStart=/usr/bin/mkdir -p /var/lib/kubelet - -# Suppress warning if directory exists. -StandardError=null - -RemainAfterExit=true - -[Install] -WantedBy=local-fs.target diff --git a/packages/kubernetes-1.21/prestart-pull-pause-ctr.conf b/packages/kubernetes-1.21/prestart-pull-pause-ctr.conf deleted file mode 100644 index 309a23c3c5b..00000000000 --- a/packages/kubernetes-1.21/prestart-pull-pause-ctr.conf +++ /dev/null @@ -1,9 +0,0 @@ -[Service] -# Pull the pause container image before starting `kubelet` so `containerd/cri` wouldn't have to -ExecStartPre=/usr/bin/host-ctr \ - --containerd-socket=/run/dockershim.sock \ - --namespace=k8s.io \ - pull-image \ - --source=${POD_INFRA_CONTAINER_IMAGE} \ - --registry-config=/etc/host-containers/host-ctr.toml \ - --skip-if-image-exists=true diff --git a/sources/bottlerocket-variant/src/lib.rs b/sources/bottlerocket-variant/src/lib.rs index 52ee1f2e0b3..18d671fee9e 100644 --- a/sources/bottlerocket-variant/src/lib.rs +++ b/sources/bottlerocket-variant/src/lib.rs @@ -52,13 +52,13 @@ pub mod error { /// # Variant /// /// Represents a Bottlerocket variant string. These are in the form -/// `platform-runtime-[variant_version]-[variant_flavor]`. +/// `platform-runtime-[variant_version][-variant_flavor]`. /// /// For example, here are some valid variant strings: /// - aws-ecs-1 -/// - vmware-k8s-1.18 +/// - vmware-k8s-1.23 /// - metal-dev -/// - aws-k8s-1.21-nvidia +/// - aws-k8s-1.24-nvidia /// /// The `platform` and `runtime` values are required. `variant_version` and `variant_flavor` values /// are optional and will default to `"0"` and `"none"` respectively. @@ -70,10 +70,10 @@ pub mod error { /// /// ```rust /// use bottlerocket_variant::{Variant, VARIANT_ENV}; -/// std::env::set_var(VARIANT_ENV, "metal-k8s-1.21"); +/// std::env::set_var(VARIANT_ENV, "metal-k8s-1.24"); /// let variant = Variant::from_env().unwrap(); /// -/// assert_eq!(variant.version().unwrap(), "1.21"); +/// assert_eq!(variant.version().unwrap(), "1.24"); /// /// // In a `build.rs` file, you may want to emit cfgs that you can use for conditional compilation. /// variant.emit_cfgs(); @@ -96,9 +96,9 @@ impl Variant { /// # Valid Values /// /// - `aws-dev` - /// - `vmware-k8s-1.21` - /// - `aws-k8s-1.21-nvidia` - /// - `aws-k8s-1.21-nvidia-some-additional-ignored-tuple-positions` + /// - `vmware-k8s-1.24` + /// - `aws-k8s-1.24-nvidia` + /// - `aws-k8s-1.24-nvidia-some-additional-ignored-tuple-positions` /// /// # Invalid Values /// @@ -130,13 +130,13 @@ impl Variant { } /// The variant's runtime. This is the second member of the tuple. For example, in - /// `metal-k8s-1.21`, `k8s` is the `runtime`. + /// `metal-k8s-1.24`, `k8s` is the `runtime`. pub fn runtime(&self) -> &str { &self.runtime } /// The variant's family. This is the `platform` and `runtime` together. For example, in - /// `aws-k8s-1.21`, `aws-k8s` is the `family`. + /// `aws-k8s-1.24`, `aws-k8s` is the `family`. pub fn family(&self) -> &str { &self.family } @@ -149,7 +149,7 @@ impl Variant { } /// The variant's flavor. This is the optional fourth value in the variant string tuple. For - /// example for `aws-k8s-1.21-nvidia` the `variant_flavor` is `nvidia`. + /// example for `aws-k8s-1.24-nvidia` the `variant_flavor` is `nvidia`. pub fn variant_flavor(&self) -> Option<&str> { self.variant_flavor.as_deref() } @@ -166,14 +166,14 @@ impl Variant { /// /// # Example /// - /// Given a variant `aws-k8s-1.21`, if this function has been called in `build.rs`, then + /// Given a variant `aws-k8s-1.24`, if this function has been called in `build.rs`, then /// all of the following conditional complition checks would evaluate to `true`. /// - /// `#[cfg(variant = "aws-k8s-1.21")]` + /// `#[cfg(variant = "aws-k8s-1.24")]` /// `#[cfg(variant_platform = "aws")]` /// `#[cfg(variant_runtime = "k8s")]` /// `#[cfg(variant_family = "aws-k8s")]` - /// `#[cfg(variant_version = "1.21")]` + /// `#[cfg(variant_version = "1.24")]` /// `#[cfg(variant_flavor = "none")]` pub fn emit_cfgs(&self) { Self::rerun_if_changed(); @@ -407,11 +407,11 @@ fn parse_ok() { variant_flavor: None, }, Test { - input: "aws-k8s-1.21-nvidia-some-additional-ignored-tuple-positions", + input: "aws-k8s-1.24-nvidia-some-additional-ignored-tuple-positions", platform: "aws", runtime: "k8s", variant_family: "aws-k8s", - variant_version: Some("1.21"), + variant_version: Some("1.24"), variant_flavor: Some("nvidia"), }, ]; @@ -430,7 +430,7 @@ fn parse_ok() { #[test] fn parse_err() { - let tests = vec!["aws", "aws-", "aws-dev-", "aws-k8s-1.21-"]; + let tests = vec!["aws", "aws-", "aws-dev-", "aws-k8s-1.24-"]; for test in tests { let result = Variant::new(test); assert!( diff --git a/sources/logdog/conf/logdog.aws-k8s-1.21-nvidia.conf b/sources/logdog/conf/logdog.aws-k8s-1.21-nvidia.conf deleted file mode 120000 index 63115aee60b..00000000000 --- a/sources/logdog/conf/logdog.aws-k8s-1.21-nvidia.conf +++ /dev/null @@ -1 +0,0 @@ -aws-k8s.conf \ No newline at end of file diff --git a/sources/logdog/conf/logdog.aws-k8s-1.21.conf b/sources/logdog/conf/logdog.aws-k8s-1.21.conf deleted file mode 120000 index 63115aee60b..00000000000 --- a/sources/logdog/conf/logdog.aws-k8s-1.21.conf +++ /dev/null @@ -1 +0,0 @@ -aws-k8s.conf \ No newline at end of file diff --git a/sources/logdog/conf/logdog.metal-k8s-1.21.conf b/sources/logdog/conf/logdog.metal-k8s-1.21.conf deleted file mode 120000 index 7134ec8b998..00000000000 --- a/sources/logdog/conf/logdog.metal-k8s-1.21.conf +++ /dev/null @@ -1 +0,0 @@ -k8s.conf \ No newline at end of file diff --git a/sources/logdog/conf/logdog.vmware-k8s-1.21.conf b/sources/logdog/conf/logdog.vmware-k8s-1.21.conf deleted file mode 120000 index 7134ec8b998..00000000000 --- a/sources/logdog/conf/logdog.vmware-k8s-1.21.conf +++ /dev/null @@ -1 +0,0 @@ -k8s.conf \ No newline at end of file diff --git a/sources/models/README.md b/sources/models/README.md index b59db62c03f..66ad0d39683 100644 --- a/sources/models/README.md +++ b/sources/models/README.md @@ -22,16 +22,6 @@ Entries are sorted by filename, and later entries take precedence. The `#[model]` attribute on Settings and its sub-structs reduces duplication and adds some required metadata; see [its docs](model-derive/) for details. -### aws-k8s-1.21: Kubernetes 1.21 - -* [Model](src/aws-k8s-1.22/mod.rs) -* [Default settings](src/aws-k8s-1.22/defaults.d/) - -#### aws-k8s-1.21-nvidia: Kubernetes 1.21 NVIDIA - -* [Model](src/aws-k8s-1.22-nvidia/mod.rs) -* [Default settings](src/aws-k8s-1.22-nvidia/defaults.d/) - ### aws-k8s-1.22: Kubernetes 1.22 * [Model](src/aws-k8s-1.22/mod.rs) @@ -87,11 +77,6 @@ The `#[model]` attribute on Settings and its sub-structs reduces duplication and * [Model](src/vmware-dev/mod.rs) * [Default settings](src/vmware-dev/defaults.d/) -### vmware-k8s-1.21: VMware Kubernetes 1.21 - -* [Model](src/vmware-k8s-1.22/mod.rs) -* [Default settings](src/vmware-k8s-1.22/defaults.d/) - ### vmware-k8s-1.22: VMware Kubernetes 1.22 * [Model](src/vmware-k8s-1.22/mod.rs) @@ -117,11 +102,6 @@ The `#[model]` attribute on Settings and its sub-structs reduces duplication and * [Model](src/metal-dev/mod.rs) * [Default settings](src/metal-dev/defaults.d/) -### metal-k8s-1.21: Metal Kubernetes 1.21 - -* [Model](src/metal-k8s-1.23/mod.rs) -* [Default settings](src/metal-k8s-1.22/defaults.d/) - ### metal-k8s-1.22: Metal Kubernetes 1.22 * [Model](src/metal-k8s-1.23/mod.rs) diff --git a/sources/models/src/aws-k8s-1.21 b/sources/models/src/aws-k8s-1.21 deleted file mode 120000 index d4ec2167e3e..00000000000 --- a/sources/models/src/aws-k8s-1.21 +++ /dev/null @@ -1 +0,0 @@ -./aws-k8s-1.22 \ No newline at end of file diff --git a/sources/models/src/aws-k8s-1.21-nvidia b/sources/models/src/aws-k8s-1.21-nvidia deleted file mode 120000 index 025b4db50b6..00000000000 --- a/sources/models/src/aws-k8s-1.21-nvidia +++ /dev/null @@ -1 +0,0 @@ -./aws-k8s-1.22-nvidia \ No newline at end of file diff --git a/sources/models/src/lib.rs b/sources/models/src/lib.rs index 873c07a3be7..c63133994e3 100644 --- a/sources/models/src/lib.rs +++ b/sources/models/src/lib.rs @@ -19,16 +19,6 @@ Entries are sorted by filename, and later entries take precedence. The `#[model]` attribute on Settings and its sub-structs reduces duplication and adds some required metadata; see [its docs](model-derive/) for details. -## aws-k8s-1.21: Kubernetes 1.21 - -* [Model](src/aws-k8s-1.22/mod.rs) -* [Default settings](src/aws-k8s-1.22/defaults.d/) - -### aws-k8s-1.21-nvidia: Kubernetes 1.21 NVIDIA - -* [Model](src/aws-k8s-1.22-nvidia/mod.rs) -* [Default settings](src/aws-k8s-1.22-nvidia/defaults.d/) - ## aws-k8s-1.22: Kubernetes 1.22 * [Model](src/aws-k8s-1.22/mod.rs) @@ -84,11 +74,6 @@ The `#[model]` attribute on Settings and its sub-structs reduces duplication and * [Model](src/vmware-dev/mod.rs) * [Default settings](src/vmware-dev/defaults.d/) -## vmware-k8s-1.21: VMware Kubernetes 1.21 - -* [Model](src/vmware-k8s-1.22/mod.rs) -* [Default settings](src/vmware-k8s-1.22/defaults.d/) - ## vmware-k8s-1.22: VMware Kubernetes 1.22 * [Model](src/vmware-k8s-1.22/mod.rs) @@ -114,11 +99,6 @@ The `#[model]` attribute on Settings and its sub-structs reduces duplication and * [Model](src/metal-dev/mod.rs) * [Default settings](src/metal-dev/defaults.d/) -## metal-k8s-1.21: Metal Kubernetes 1.21 - -* [Model](src/metal-k8s-1.23/mod.rs) -* [Default settings](src/metal-k8s-1.22/defaults.d/) - ## metal-k8s-1.22: Metal Kubernetes 1.22 * [Model](src/metal-k8s-1.23/mod.rs) diff --git a/sources/models/src/metal-k8s-1.21 b/sources/models/src/metal-k8s-1.21 deleted file mode 120000 index 2d4c803ae39..00000000000 --- a/sources/models/src/metal-k8s-1.21 +++ /dev/null @@ -1 +0,0 @@ -./metal-k8s-1.22 \ No newline at end of file diff --git a/sources/models/src/vmware-k8s-1.21 b/sources/models/src/vmware-k8s-1.21 deleted file mode 120000 index 6c912657fb6..00000000000 --- a/sources/models/src/vmware-k8s-1.21 +++ /dev/null @@ -1 +0,0 @@ -./vmware-k8s-1.22 \ No newline at end of file diff --git a/tools/testsys/Test.toml.example b/tools/testsys/Test.toml.example index ad4856bf837..415df1ee361 100644 --- a/tools/testsys/Test.toml.example +++ b/tools/testsys/Test.toml.example @@ -120,6 +120,6 @@ instance-type = "p3.2xlarge" [aws-ecs-nvidia.aarch64] instance-type = "g5g.2xlarge" -# Configuration for only the `aws-k8s-1.21` variant (variant level configuration). -["aws-k8s-1.21".aarch64] +# Configuration for only the `aws-k8s-1.24` variant (variant level configuration). +["aws-k8s-1.24".aarch64] conformance-image = "" diff --git a/variants/Cargo.lock b/variants/Cargo.lock index 81e700ceea3..1da390821c3 100644 --- a/variants/Cargo.lock +++ b/variants/Cargo.lock @@ -62,33 +62,6 @@ dependencies = [ "glibc", ] -[[package]] -name = "aws-k8s-1_21" -version = "0.1.0" -dependencies = [ - "aws-iam-authenticator", - "cni", - "cni-plugins", - "kernel-5_10", - "kubernetes-1_21", - "release", -] - -[[package]] -name = "aws-k8s-1_21-nvidia" -version = "0.1.0" -dependencies = [ - "aws-iam-authenticator", - "cni", - "cni-plugins", - "kernel-5_10", - "kmod-5_10-nvidia", - "kubernetes-1_21", - "nvidia-container-toolkit", - "nvidia-k8s-device-plugin", - "release", -] - [[package]] name = "aws-k8s-1_22" version = "0.1.0" @@ -470,15 +443,6 @@ dependencies = [ "kernel-5_15", ] -[[package]] -name = "kubernetes-1_21" -version = "0.1.0" -dependencies = [ - "aws-signing-helper", - "ecr-credential-provider", - "glibc", -] - [[package]] name = "kubernetes-1_22" version = "0.1.0" @@ -814,17 +778,6 @@ dependencies = [ "tcpdump", ] -[[package]] -name = "metal-k8s-1_21" -version = "0.1.0" -dependencies = [ - "cni", - "cni-plugins", - "kernel-5_10", - "kubernetes-1_21", - "release", -] - [[package]] name = "metal-k8s-1_22" version = "0.1.0" @@ -1047,18 +1000,6 @@ dependencies = [ "tcpdump", ] -[[package]] -name = "vmware-k8s-1_21" -version = "0.1.0" -dependencies = [ - "cni", - "cni-plugins", - "kernel-5_10", - "kubernetes-1_21", - "open-vm-tools", - "release", -] - [[package]] name = "vmware-k8s-1_22" version = "0.1.0" diff --git a/variants/Cargo.toml b/variants/Cargo.toml index d8e0629288a..6156e176d17 100644 --- a/variants/Cargo.toml +++ b/variants/Cargo.toml @@ -3,8 +3,6 @@ members = [ "aws-dev", "aws-ecs-1", "aws-ecs-1-nvidia", - "aws-k8s-1.21", - "aws-k8s-1.21-nvidia", "aws-k8s-1.22", "aws-k8s-1.22-nvidia", "aws-k8s-1.23", @@ -14,13 +12,11 @@ members = [ "aws-k8s-1.25", "aws-k8s-1.25-nvidia", "metal-dev", - "metal-k8s-1.21", "metal-k8s-1.22", "metal-k8s-1.23", "metal-k8s-1.24", "metal-k8s-1.25", "vmware-dev", - "vmware-k8s-1.21", "vmware-k8s-1.22", "vmware-k8s-1.23", "vmware-k8s-1.24", diff --git a/variants/README.md b/variants/README.md index 8b3b7c2a8ab..36cde543e89 100644 --- a/variants/README.md +++ b/variants/README.md @@ -33,20 +33,6 @@ For example, in a VMware variant, settings read from the guestinfo interface wil ## Variants -### aws-k8s-1.21: Kubernetes 1.21 node - -The [aws-k8s-1.21](aws-k8s-1.21/Cargo.toml) variant includes the packages needed to run a Kubernetes node in AWS. -It supports self-hosted clusters and clusters managed by [EKS](https://aws.amazon.com/eks/). - -This variant is compatible with Kubernetes 1.21, 1.22, and 1.23 clusters. - -### aws-k8s-1.21-nvidia: Kubernetes 1.21 NVIDIA node - -The [aws-k8s-1.21-nvidia](aws-k8s-1.21-nvidia/Cargo.toml) variant includes the packages needed to run a Kubernetes node in AWS. -It also includes the required packages to configure containers to leverage NVIDIA GPUs. -It supports self-hosted clusters and clusters managed by [EKS](https://aws.amazon.com/eks/). -This variant is compatible with Kubernetes 1.21, 1.22, and 1.23 clusters. - ### aws-k8s-1.22: Kubernetes 1.22 node The [aws-k8s-1.22](aws-k8s-1.22/Cargo.toml) variant includes the packages needed to run a Kubernetes node in AWS. @@ -125,13 +111,6 @@ User data will be read from IMDS. The [vmware-dev](vmware-dev/Cargo.toml) variant has useful packages for local development of the OS, and is intended to run as a VMware guest. It includes tools for troubleshooting as well as Docker for running containers. -### vmware-k8s-1.21: VMware Kubernetes 1.21 node - -The [vmware-k8s-1.21](vmware-k8s-1.21/Cargo.toml) variant includes the packages needed to run a Kubernetes worker node as a VMware guest. -It supports self-hosted clusters. - -This variant is compatible with Kubernetes 1.21, 1.22, and 1.23 clusters. - ### vmware-k8s-1.22: VMware Kubernetes 1.22 node The [vmware-k8s-1.22](vmware-k8s-1.22/Cargo.toml) variant includes the packages needed to run a Kubernetes worker node as a VMware guest. @@ -165,13 +144,6 @@ This variant is compatible with Kubernetes 1.25, 1.26, and 1.27 clusters. The [metal-dev](metal-dev/Cargo.toml) variant has useful packages for local development of the OS and is intended to run bare metal. It includes tools for troubleshooting as well as Docker for running containers. -### metal-k8s-1.21: Metal Kubernetes 1.21 node - -The [metal-k8s-1.21](metal-k8s-1.21/Cargo.toml) variant includes the packages needed to run a Kubernetes node on bare metal. -It supports self-hosted clusters. - -This variant is compatible with Kubernetes 1.21, 1.22, and 1.23 clusters. - ### metal-k8s-1.22: Metal Kubernetes 1.22 node The [metal-k8s-1.22](metal-k8s-1.22/Cargo.toml) variant includes the packages needed to run a Kubernetes node on bare metal. @@ -232,7 +204,6 @@ It reached end-of-life on November 2, 2021. Upstream support for Kubernetes 1.17 has ended and this variant will no longer be supported in Bottlerocket releases. - ### aws-k8s-1.18: Kubernetes 1.18 node The aws-k8s-1.18 variant included the packages needed to run a Kubernetes node in AWS. @@ -270,6 +241,34 @@ It supported self-hosted clusters. This variant was compatible with Kubernetes 1.20, 1.21, and 1.22 clusters. +### aws-k8s-1.21: Kubernetes 1.21 node + +The aws-k8s-1.21 variant included the packages needed to run a Kubernetes node in AWS. +It supported self-hosted clusters and clusters managed by [EKS](https://aws.amazon.com/eks/). + +This variant was compatible with Kubernetes 1.21, 1.22, and 1.23 clusters. + +### aws-k8s-1.21-nvidia: Kubernetes 1.21 NVIDIA node + +The aws-k8s-1.21-nvidia variant included the packages needed to run a Kubernetes node in AWS. +It also included the required packages to configure containers to leverage NVIDIA GPUs. +It supported self-hosted clusters and clusters managed by [EKS](https://aws.amazon.com/eks/). +This variant was compatible with Kubernetes 1.21, 1.22, and 1.23 clusters. + +### metal-k8s-1.21: Metal Kubernetes 1.21 node + +The metal-k8s-1.21 variant included the packages needed to run a Kubernetes node on bare metal. +It supported self-hosted clusters. + +This variant was compatible with Kubernetes 1.21, 1.22, and 1.23 clusters. + +### vmware-k8s-1.21: VMware Kubernetes 1.21 node + +The vmware-k8s-1.21 variant included the packages needed to run a Kubernetes worker node as a VMware guest. +It supported self-hosted clusters. + +This variant was compatible with Kubernetes 1.21, 1.22, and 1.23 clusters. + ## Development Say we want to create `my-variant`, a custom build of Bottlerocket that runs `my-agent`. diff --git a/variants/aws-k8s-1.21-nvidia/Cargo.toml b/variants/aws-k8s-1.21-nvidia/Cargo.toml deleted file mode 100644 index 253113739e3..00000000000 --- a/variants/aws-k8s-1.21-nvidia/Cargo.toml +++ /dev/null @@ -1,47 +0,0 @@ -[package] -# This is the aws-k8s-1.21-nvidia variant. "." is not allowed in crate names, but we -# don't use this crate name anywhere. -name = "aws-k8s-1_21-nvidia" -version = "0.1.0" -edition = "2018" -publish = false -build = "build.rs" -# Don't rebuild crate just because of changes to README. -exclude = ["README.md"] - -[package.metadata.build-variant.image-layout] -os-image-size-gib = 4 - -[package.metadata.build-variant] -included-packages = [ - "aws-iam-authenticator", - "cni", - "cni-plugins", - "kernel-5.10", - "kubelet-1.21", - "release", - "nvidia-container-toolkit", - "nvidia-k8s-device-plugin", - "kmod-5.10-nvidia-tesla-470", -] -kernel-parameters = [ - "console=tty0", - "console=ttyS0,115200n8", - "net.ifnames=0", - "netdog.default-interface=eth0:dhcp4,dhcp6?", - "quiet", -] - -[lib] -path = "lib.rs" - -[build-dependencies] -aws-iam-authenticator = { path = "../../packages/aws-iam-authenticator" } -cni = { path = "../../packages/cni" } -cni-plugins = { path = "../../packages/cni-plugins" } -kernel-5_10 = { path = "../../packages/kernel-5.10" } -kubernetes-1_21 = { path = "../../packages/kubernetes-1.21" } -release = { path = "../../packages/release" } -nvidia-container-toolkit = { path = "../../packages/nvidia-container-toolkit" } -nvidia-k8s-device-plugin = { path = "../../packages/nvidia-k8s-device-plugin" } -kmod-5_10-nvidia = { path = "../../packages/kmod-5.10-nvidia" } diff --git a/variants/aws-k8s-1.21-nvidia/build.rs b/variants/aws-k8s-1.21-nvidia/build.rs deleted file mode 100644 index d6a90e4df44..00000000000 --- a/variants/aws-k8s-1.21-nvidia/build.rs +++ /dev/null @@ -1,9 +0,0 @@ -use std::process::{exit, Command}; - -fn main() -> Result<(), std::io::Error> { - let ret = Command::new("buildsys").arg("build-variant").status()?; - if !ret.success() { - exit(1); - } - Ok(()) -} diff --git a/variants/aws-k8s-1.21-nvidia/lib.rs b/variants/aws-k8s-1.21-nvidia/lib.rs deleted file mode 100644 index d799fb2d44c..00000000000 --- a/variants/aws-k8s-1.21-nvidia/lib.rs +++ /dev/null @@ -1 +0,0 @@ -// not used diff --git a/variants/aws-k8s-1.21/Cargo.toml b/variants/aws-k8s-1.21/Cargo.toml deleted file mode 100644 index 9e27035d236..00000000000 --- a/variants/aws-k8s-1.21/Cargo.toml +++ /dev/null @@ -1,38 +0,0 @@ -[package] -# This is the aws-k8s-1.21 variant. "." is not allowed in crate names, but we -# don't use this crate name anywhere. -name = "aws-k8s-1_21" -version = "0.1.0" -edition = "2018" -publish = false -build = "build.rs" -# Don't rebuild crate just because of changes to README. -exclude = ["README.md"] - -[package.metadata.build-variant] -included-packages = [ - "aws-iam-authenticator", - "cni", - "cni-plugins", - "kernel-5.10", - "kubelet-1.21", - "release", -] -kernel-parameters = [ - "console=tty0", - "console=ttyS0,115200n8", - "net.ifnames=0", - "netdog.default-interface=eth0:dhcp4,dhcp6?", - "quiet", -] - -[lib] -path = "lib.rs" - -[build-dependencies] -aws-iam-authenticator = { path = "../../packages/aws-iam-authenticator" } -cni = { path = "../../packages/cni" } -cni-plugins = { path = "../../packages/cni-plugins" } -kernel-5_10 = { path = "../../packages/kernel-5.10" } -kubernetes-1_21 = { path = "../../packages/kubernetes-1.21" } -release = { path = "../../packages/release" } diff --git a/variants/aws-k8s-1.21/build.rs b/variants/aws-k8s-1.21/build.rs deleted file mode 100644 index d6a90e4df44..00000000000 --- a/variants/aws-k8s-1.21/build.rs +++ /dev/null @@ -1,9 +0,0 @@ -use std::process::{exit, Command}; - -fn main() -> Result<(), std::io::Error> { - let ret = Command::new("buildsys").arg("build-variant").status()?; - if !ret.success() { - exit(1); - } - Ok(()) -} diff --git a/variants/aws-k8s-1.21/lib.rs b/variants/aws-k8s-1.21/lib.rs deleted file mode 100644 index d799fb2d44c..00000000000 --- a/variants/aws-k8s-1.21/lib.rs +++ /dev/null @@ -1 +0,0 @@ -// not used diff --git a/variants/metal-k8s-1.21/Cargo.toml b/variants/metal-k8s-1.21/Cargo.toml deleted file mode 100644 index b8363ad69a5..00000000000 --- a/variants/metal-k8s-1.21/Cargo.toml +++ /dev/null @@ -1,42 +0,0 @@ -[package] -# This is the metal-k8s-1.21 variant. "." is not allowed in crate names, but -# we don't use this crate name anywhere. -name = "metal-k8s-1_21" -version = "0.1.0" -edition = "2018" -publish = false -build = "build.rs" -# Don't rebuild crate just because of changes to README. -exclude = ["README.md"] - -[package.metadata.build-variant.image-layout] -os-image-size-gib = 4 -partition-plan = "unified" - -[package.metadata.build-variant.image-features] -grub-set-private-var = true - -[package.metadata.build-variant] -image-format = "raw" -supported-arches = ["x86_64"] -kernel-parameters = [ - # Only reserve if there are at least 2GB - "crashkernel=2G-:256M" -] -included-packages = [ - "cni", - "cni-plugins", - "kernel-5.10", - "kubelet-1.21", - "release", -] - -[lib] -path = "lib.rs" - -[build-dependencies] -cni = { path = "../../packages/cni" } -cni-plugins = { path = "../../packages/cni-plugins" } -kernel-5_10 = { path = "../../packages/kernel-5.10" } -kubernetes-1_21 = { path = "../../packages/kubernetes-1.21" } -release = { path = "../../packages/release" } diff --git a/variants/metal-k8s-1.21/build.rs b/variants/metal-k8s-1.21/build.rs deleted file mode 100644 index d6a90e4df44..00000000000 --- a/variants/metal-k8s-1.21/build.rs +++ /dev/null @@ -1,9 +0,0 @@ -use std::process::{exit, Command}; - -fn main() -> Result<(), std::io::Error> { - let ret = Command::new("buildsys").arg("build-variant").status()?; - if !ret.success() { - exit(1); - } - Ok(()) -} diff --git a/variants/metal-k8s-1.21/lib.rs b/variants/metal-k8s-1.21/lib.rs deleted file mode 100644 index d799fb2d44c..00000000000 --- a/variants/metal-k8s-1.21/lib.rs +++ /dev/null @@ -1 +0,0 @@ -// not used diff --git a/variants/vmware-k8s-1.21/Cargo.toml b/variants/vmware-k8s-1.21/Cargo.toml deleted file mode 100644 index a635dad2028..00000000000 --- a/variants/vmware-k8s-1.21/Cargo.toml +++ /dev/null @@ -1,41 +0,0 @@ -[package] -# This is the vmware-k8s-1.21 variant. "." is not allowed in crate names, but -# we don't use this crate name anywhere. -name = "vmware-k8s-1_21" -version = "0.1.0" -edition = "2018" -publish = false -build = "build.rs" -# Don't rebuild crate just because of changes to README. -exclude = ["README.md"] - -[package.metadata.build-variant] -image-format = "vmdk" -supported-arches = ["x86_64"] -kernel-parameters = [ - "console=tty1", - # Only reserve if there are at least 2GB - "crashkernel=2G-:256M", - "net.ifnames=0", - "netdog.default-interface=eth0:dhcp4,dhcp6?", - "quiet", -] -included-packages = [ - "cni", - "cni-plugins", - "kernel-5.10", - "kubelet-1.21", - "open-vm-tools", - "release", -] - -[lib] -path = "lib.rs" - -[build-dependencies] -cni = { path = "../../packages/cni" } -cni-plugins = { path = "../../packages/cni-plugins" } -kernel-5_10 = { path = "../../packages/kernel-5.10" } -kubernetes-1_21 = { path = "../../packages/kubernetes-1.21" } -open-vm-tools = { path = "../../packages/open-vm-tools" } -release = { path = "../../packages/release" } diff --git a/variants/vmware-k8s-1.21/build.rs b/variants/vmware-k8s-1.21/build.rs deleted file mode 100644 index d6a90e4df44..00000000000 --- a/variants/vmware-k8s-1.21/build.rs +++ /dev/null @@ -1,9 +0,0 @@ -use std::process::{exit, Command}; - -fn main() -> Result<(), std::io::Error> { - let ret = Command::new("buildsys").arg("build-variant").status()?; - if !ret.success() { - exit(1); - } - Ok(()) -} diff --git a/variants/vmware-k8s-1.21/lib.rs b/variants/vmware-k8s-1.21/lib.rs deleted file mode 100644 index d799fb2d44c..00000000000 --- a/variants/vmware-k8s-1.21/lib.rs +++ /dev/null @@ -1 +0,0 @@ -// not used diff --git a/variants/vmware-k8s-1.21/template.ovf b/variants/vmware-k8s-1.21/template.ovf deleted file mode 120000 index e1c6ad4baa0..00000000000 --- a/variants/vmware-k8s-1.21/template.ovf +++ /dev/null @@ -1 +0,0 @@ -../shared/template-split.ovf \ No newline at end of file