Skip to content

Commit 83e5ccc

Browse files
authored
Remove SSM install script from AL2; SSM is pre-installed on EKS AL based AMIs (#8135)
1 parent 5f1438b commit 83e5ccc

File tree

4 files changed

+0
-56
lines changed

4 files changed

+0
-56
lines changed

pkg/nodebootstrap/README.md

-5
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ The call to `UserData` will also dynamically add the following:
4040
The bootstrap wrapper scripts will use `jq` and `sed` to get user and our config into various files,
4141
and then call `/etc/eks/bootstrap.sh`.
4242

43-
For AL2, enabling SSM will add `assets/install-ssm.al2.sh`.
44-
4543
### AmazonLinux2023
4644

4745
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:
7371
7472
```
7573

76-
For EKS-managed nodes based on native AMIs, the userdata above is fulfilled automatically by the AWS SSM agent.
77-
7874
## Troubleshooting
7975

8076
### Ubuntu
@@ -111,5 +107,4 @@ Files:
111107
/var/lib/cloud/scripts/eksctl/bootstrap.al2.sh
112108
/etc/kubernetes/kubelet/kubelet-config.json
113109
/etc/docker/daemon.json
114-
/var/lib/cloud/scripts/eksctl/install-ssm.sh
115110
```

pkg/nodebootstrap/al2_test.go

-37
Original file line numberDiff line numberDiff line change
@@ -31,43 +31,6 @@ var _ = Describe("AmazonLinux2 User Data", func() {
3131
}
3232
})
3333

34-
When("SSM is enabled", func() {
35-
BeforeEach(func() {
36-
ng.SSH.EnableSSM = api.Enabled()
37-
bootstrapper = newBootstrapper(clusterConfig, ng)
38-
})
39-
40-
It("does not add the SSM install script to the userdata", func() {
41-
userData, err := bootstrapper.UserData()
42-
Expect(err).NotTo(HaveOccurred())
43-
44-
cloudCfg := decode(userData)
45-
46-
var paths []string
47-
for _, f := range cloudCfg.WriteFiles {
48-
paths = append(paths, f.Path)
49-
}
50-
Expect(paths).NotTo(ContainElement("/var/lib/cloud/scripts/eksctl/install-ssm.al2.sh"))
51-
})
52-
})
53-
54-
When("EFA is enabled", func() {
55-
BeforeEach(func() {
56-
enabled := true
57-
ng.EFAEnabled = &enabled
58-
bootstrapper = newBootstrapper(clusterConfig, ng)
59-
})
60-
61-
It("adds the ssm install script to the userdata", func() {
62-
userData, err := bootstrapper.UserData()
63-
Expect(err).NotTo(HaveOccurred())
64-
65-
cloudCfg := decode(userData)
66-
Expect(cloudCfg.WriteFiles[2].Path).To(Equal("/var/lib/cloud/scripts/eksctl/bootstrap.al2.sh"))
67-
Expect(cloudCfg.WriteFiles[2].Permissions).To(Equal("0755"))
68-
})
69-
})
70-
7134
type bootScriptEntry struct {
7235
clusterConfig *api.ClusterConfig
7336
ng *api.NodeGroup

pkg/nodebootstrap/assets/assets.go

-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ var BootstrapUbuntuSh string
2525
//go:embed scripts/al2023-xtables.lock.sh
2626
var AL2023XTablesLock string
2727

28-
// InstallSsmAl2Sh holds the install-ssm.al2.sh contents
29-
//
30-
//go:embed scripts/install-ssm.al2.sh
31-
var InstallSsmAl2Sh string
32-
3328
// KubeletYaml holds the kubelet.yaml contents
3429
//
3530
//go:embed scripts/kubelet.yaml

pkg/nodebootstrap/assets/scripts/install-ssm.al2.sh

-9
This file was deleted.

0 commit comments

Comments
 (0)