Stop stripping the comment section from SSH keys
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 328
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 9
Description
EKS-A allows user to specify SSH keys that are added to nodes as they are provisioned. When processing SSH keys EKS-A strips the comment section (typically used to add email addresses). This was done to satisfy unit tests as new lines were inserted at the first available space (which was shown to be valid YAML processing by @jacobweinstock) when the line was the right length.
Stripping the comment section adds unnecessary complexity to the code that has been replicated across providers (in part due to how providers are implemented). We've maintained the behavior in the full lifecycle controller, the 'new world', but it has created issues. For example, when upgrading management clusters by applying the cluster config (as opposed to using the CLI) where the cluster was originally created using SSH keys with comments that are now stripped, we receive a diff as the comments still exist in the local copy of the cluster config.
This ticket tracks refactoring the code to stop stripping comments and make a decision on whether or not they are allowed. If they are allowed, they should be saved along with the cluster config.
Contributor guide
Research direction
Trace SSH-key processing across the replicated provider code and the full lifecycle controller, then inspect the unit tests that led to stripping comments. Clarify whether comments are allowed; completion requires consistent handling during provisioning and cluster-config upgrades, including saving comments if they are permitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100