diff --git a/pkg/nodebootstrap/README.md b/pkg/nodebootstrap/README.md index ca96673fdc..06a12ddfb1 100644 --- a/pkg/nodebootstrap/README.md +++ b/pkg/nodebootstrap/README.md @@ -40,8 +40,6 @@ The call to `UserData` will also dynamically add the following: The bootstrap wrapper scripts will use `jq` and `sed` to get user and our config into various files, and then call `/etc/eks/bootstrap.sh`. -For AL2, enabling SSM will add `assets/install-ssm.al2.sh`. - ### AmazonLinux2023 While AL2023 implements the `Bootstrapper` interface, the underlying userdata will be entirely different from other AMI families. Specifically, AL2023 introduces a new node initialization process nodeadm that uses a YAML configuration schema, dropping the use of `/etc/eks/bootstrap.sh` script. For self-managed nodes, and for EKS-managed nodes based on custom AMIs, eksctl will populate userdata in the fashion below: @@ -73,8 +71,6 @@ spec: ``` -For EKS-managed nodes based on native AMIs, the userdata above is fulfilled automatically by the AWS SSM agent. - ## Troubleshooting ### Ubuntu @@ -111,5 +107,4 @@ Files: /var/lib/cloud/scripts/eksctl/bootstrap.al2.sh /etc/kubernetes/kubelet/kubelet-config.json /etc/docker/daemon.json -/var/lib/cloud/scripts/eksctl/install-ssm.sh ``` diff --git a/pkg/nodebootstrap/al2_test.go b/pkg/nodebootstrap/al2_test.go index 191075437c..9f0db09989 100644 --- a/pkg/nodebootstrap/al2_test.go +++ b/pkg/nodebootstrap/al2_test.go @@ -31,43 +31,6 @@ var _ = Describe("AmazonLinux2 User Data", func() { } }) - When("SSM is enabled", func() { - BeforeEach(func() { - ng.SSH.EnableSSM = api.Enabled() - bootstrapper = newBootstrapper(clusterConfig, ng) - }) - - It("does not add the SSM install script to the userdata", func() { - userData, err := bootstrapper.UserData() - Expect(err).NotTo(HaveOccurred()) - - cloudCfg := decode(userData) - - var paths []string - for _, f := range cloudCfg.WriteFiles { - paths = append(paths, f.Path) - } - Expect(paths).NotTo(ContainElement("/var/lib/cloud/scripts/eksctl/install-ssm.al2.sh")) - }) - }) - - When("EFA is enabled", func() { - BeforeEach(func() { - enabled := true - ng.EFAEnabled = &enabled - bootstrapper = newBootstrapper(clusterConfig, ng) - }) - - It("adds the ssm install script to the userdata", func() { - userData, err := bootstrapper.UserData() - Expect(err).NotTo(HaveOccurred()) - - cloudCfg := decode(userData) - Expect(cloudCfg.WriteFiles[2].Path).To(Equal("/var/lib/cloud/scripts/eksctl/bootstrap.al2.sh")) - Expect(cloudCfg.WriteFiles[2].Permissions).To(Equal("0755")) - }) - }) - type bootScriptEntry struct { clusterConfig *api.ClusterConfig ng *api.NodeGroup diff --git a/pkg/nodebootstrap/assets/assets.go b/pkg/nodebootstrap/assets/assets.go index 16175ba381..4f139785da 100644 --- a/pkg/nodebootstrap/assets/assets.go +++ b/pkg/nodebootstrap/assets/assets.go @@ -25,11 +25,6 @@ var BootstrapUbuntuSh string //go:embed scripts/al2023-xtables.lock.sh var AL2023XTablesLock string -// InstallSsmAl2Sh holds the install-ssm.al2.sh contents -// -//go:embed scripts/install-ssm.al2.sh -var InstallSsmAl2Sh string - // KubeletYaml holds the kubelet.yaml contents // //go:embed scripts/kubelet.yaml diff --git a/pkg/nodebootstrap/assets/scripts/install-ssm.al2.sh b/pkg/nodebootstrap/assets/scripts/install-ssm.al2.sh deleted file mode 100644 index 9d2ec64284..0000000000 --- a/pkg/nodebootstrap/assets/scripts/install-ssm.al2.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -o errexit -set -o pipefail -set -o nounset - -yum install -y amazon-ssm-agent -systemctl enable amazon-ssm-agent -systemctl start amazon-ssm-agent