EKS-A Controller using outdated spec builder
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 328
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 9
Description
**What would you like to be added**:
We build the spec in controller by https://github.com/aws/eks-anywhere/blob/main/pkg/cluster/spec.go#L262 which does not update Config.cloudstackdatacenter object. In order to set the provider-specific fields in the spec (e.g. Config.CloudStackDatacenter), we need to inject custom logic whenever we read from this built cluster spec in order for the provider specific field to be set.
The build spec method used in CLI is https://github.com/aws/eks-anywhere/blob/main/pkg/cluster/spec.go#L184 where we use config manager and properly set up the provider spec. This is what we should be using for the controller as well.
**Why is this needed**:
We should be using this spec builder logic to avoid having to inject custom logic to set provider-specific attributes in the cluster spec.
Contributor guide
Research direction
Compare the controller's spec-building path at pkg/cluster/spec.go#L262 with the CLI path at pkg/cluster/spec.go#L184. Start by tracing how the config manager sets provider-specific fields such as Config.CloudStackDatacenter, then confirm that the controller can use the same builder without injected custom logic. Done means the controller-built cluster spec includes those provider-specific attributes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100