bottlerocket-os / bottlerocket-os/bottlerocket-test-system
{eks,ec2}-provider: remove `security_groups` from cluster output
- Dominant language
- Rust
- Stars
- 18
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
> The EC2 provider does not do anything with `nodegroup_sg` or the shared cluster SG or control plane SG. It only cares about the security groups field in the created cluster output which is just a list of both nodegroup SG and shared cluster SG.
I do think the list is unnecessary; EC2 provider should probably not read from a list but rather apply the appropriate SG to the nodes. (nodegroup SG if it exists and always shared cluster SG)
> See https://github.com/bottlerocket-os/bottlerocket-test-system/blob/e16025869a913092736208c3028f2b24ced26bbf/bottlerocket-agents/src/bin/eks-resource-agent/eks_provider.rs#L434-L437
_Originally posted by @etungsten in https://github.com/bottlerocket-os/bottlerocket-test-system/pull/309#issuecomment-1044834288_
We should get rid of the `security_groups` list from the cluster output and let EC2 provider ingest each SG as separate fields and have it determine which specific SGs to launch the instances with.
The changes would need to happen here:
https://github.com/bottlerocket-os/bottlerocket-test-system/blob/8db9556cfaf7d5052305bbfb9897a699b1f10d30/bottlerocket-agents/src/bin/eks-resource-agent/eks_provider.rs#L68-L73
and https://github.com/bottlerocket-os/bottlerocket-test-system/blob/8d8688930559795a64f2b7062ff687bfa465208f/bottlerocket-agents/src/lib.rs#L158-L161
Contributor guide
Research direction
Start with bottlerocket-agents/src/bin/eks-resource-agent/eks_provider.rs at lines 68-73 and 434-437, then inspect bottlerocket-agents/src/lib.rs at lines 158-161. Update the cluster output and EC2 provider inputs so security groups are separate fields and the provider selects the appropriate groups for launched instances; done means the security_groups list is no longer used.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, rust
- Domain
- cloud, infrastructure
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100