Skip to content

Commit 2d348f8

Browse files
committed
fix: addresses review commnets
1 parent 1ca7f1c commit 2d348f8

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

bootstrap/eks/internal/userdata/utils.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ func templateToYAML(r *runtime.RawExtension) (string, error) {
5050
}
5151
return string(b), nil
5252
}
53-
if len(r.Raw) > 0 {
54-
if yb, err := yaml.JSONToYAML(r.Raw); err == nil {
55-
return string(yb), nil
56-
}
57-
var temp interface{}
58-
err := yaml.Unmarshal(r.Raw, &temp)
59-
if err == nil {
60-
return string(r.Raw), nil
61-
}
62-
return "", fmt.Errorf("runtime object raw is neither json nor yaml %s", string(r.Raw))
53+
if len(r.Raw) == 0 {
54+
return "", nil
55+
}
56+
if yb, err := yaml.JSONToYAML(r.Raw); err == nil {
57+
return string(yb), nil
58+
}
59+
var temp interface{}
60+
err := yaml.Unmarshal(r.Raw, &temp)
61+
if err == nil {
62+
return string(r.Raw), nil
6363
}
64-
return "", nil
64+
return "", fmt.Errorf("runtime object raw is neither json nor yaml %s", string(r.Raw))
6565
}

docs/book/src/topics/eks/creating-a-cluster.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ The provider you must use depends on the Amazon Machine Image (AMI) and Kubernet
3535

3636
When you generate a cluster, you will need to ensure your `MachineDeployment` or `MachinePool` references the correct bootstrap template `kind`.
3737

38+
NOTE:
39+
40+
- [The EKS team stopped publishing Al2 AMIs for Kubernetes versions 1.33 and higher.](https://awslabs.github.io/amazon-eks-ami/usage/al2/)
41+
- [Amazon Linux 2 end of support date (End of Life, or EOL) will be on 2026-06-30.](https://aws.amazon.com/amazon-linux-2/faqs/)
42+
3843
**For AL2 / K8s $\le$ v1.32, use `EKSConfigTemplate`:**
3944
```yaml
4045
apiVersion: cluster.x-k8s.io/v1beta1
@@ -54,7 +59,9 @@ spec:
5459
5560
### Secrets Manager
5661
57-
Amazon Linux 2023 does not have the proper tooling to use the secrets manager flow for bootstrapping. Therefore, whenever creating `AWSMachineTemplate` objects `insecureSkipSecretsManager` must be set to false
62+
Amazon Linux 2023 does not have the proper tooling to use the secrets manager flow for bootstrapping. CAPA uses a [custom cloud-init datasource](https://github.com/kubernetes-sigs/image-builder/pull/1583) to fetch the secure contents like the `kubeadm` tokens from secrets manager. Crucially, there is no current support for publishing CAPA-compatible AL2023 AMIs that include this necessary custom cloud-init datasource.
63+
64+
Therefore, whenever creating `AWSMachineTemplate` objects `insecureSkipSecretsManager` must be set to true.
5865

5966
```yaml
6067
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2

0 commit comments

Comments
 (0)