[Feature Request] Automatically update Bottlerocket Kubernetes settings
Description
What problem are you trying to solve?
Karpenter models Bottlerocket Kubernetes settings (anything settings.kubernetes.* on a Bottlerocket node) in https://github.com/aws/karpenter-provider-aws/blob/main/pkg/providers/amifamily/bootstrap/bottlerocketsettings.go. The reason for this is the merge semantic Karpenter has to merge existing settings that Karpenter pre-generates for Kubernetes with settings that the user passes in through their userData. Any Bottlerocket settings.kubernetes.* setting that is not modeled by Karpenter is ignored. This causes churn for the Bottlerocket/Karpenter maintainers to manually update the Bottlerocket Kubernetes settings in Karpenter; for example, https://github.com/aws/karpenter-provider-aws/pull/8112.
All other settings for a Bottlerocket node, Karpenter just passes through to be rendered to the node user data.
As of writing, there are still some Bottlerocket Kubernetes settings not modeled in Karpenter and thus not available to users:
diff karpenter-sorted.txt bottlerocket-develop-sorted.txt
2a3,4
> authentication-mode
> bootstrap-token
9a12,13
> container-log-max-workers
> container-log-monitor-interval
11a16
> cpu-manager-policy-options
20a26,27
> hostname-override
> hostname-override-source
25a33
> log-level
26a35,37
> memory-manager-policy
> memory-manager-reserved-memory
> node-ip
28a40
> pod-infra-container-image
29a42
> provider-id
31a45
> reserved-cpus
32a47,48
> server-certificate
> server-key
36a53
> standalone-modeWhat I'd Like to Have
Karpenter could either pass through all Bottlerocket Kubernetes settings or auto-generate new Bottlerocket Kubernetes settings based on the KubernetesSettingsV1 struct in Bottlerocket.
I'd also be curious to understand if Karpenter could model just the settings it must merge from Bottlerocket's settings, such that any new setting Bottlerocket adds to its settings.kubernetes.* are passed through to node userData.
How important is this feature to you?
This is a papercut improvement to remove some manual effort in keeping the Karpenter settings model for Bottlerocket up to date.
- Please vote on this issue by adding a reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Source: aws/karpenter-provider-aws