Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethink the output of ACK's code generator #1299

Open
3 tasks
jaypipes opened this issue May 21, 2022 · 2 comments
Open
3 tasks

Rethink the output of ACK's code generator #1299

jaypipes opened this issue May 21, 2022 · 2 comments
Assignees
Labels
area/code-generation Issues or PRs as related to controllers or docs code generation area/crossplane Issues or PRs related to crossplane kind/enhancement Categorizes issue or PR as related to existing feature enhancements. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@jaypipes
Copy link
Collaborator

The ack-generate tool currently consumes the API model definitions from aws-sdk-go for a particular AWS service and outputs generated code for:

  • ACK-specific CRDs (i.e. CRDs in the services.k8s.aws APIGroup
  • ACK controller implementation (i.e. cmd/main.go, all pkg/resource/* packages, Helm charts, static config files, etc)
  • Crossplane CRDs and Crossplane's ManagedResource (XRD) interface implementations for different resources in a service.

While this has served us well over the last couple years, it has become apparent that a more useful system would be to focus on outputting Go packages for the various resource managers (as we do now) but make them able to be easily imported outside of ACK controllers. In other words, solidify the public interface for resource managers and allow systems like Crossplane or Terraform to simply import the relevant Go packages for the various services and their resource managers.

Some subtasks I think are worth doing for this effort:

  • Move the public resource manager types/interfaces into the github.com/aws-controllers-k8s/pkg repository
  • Add interface methods to the ResourceManagerFactory or ResourceDescriptor that would allow us to expose various expected API behaviours (such as update code path patterns or readonly/immutable fields) to consumers
  • Decouple the resource manager interfaces from the ACK runtime implementation. This will be necessary for other consumers like Crossplane who do not use the ACK runtime
@jaypipes jaypipes added kind/enhancement Categorizes issue or PR as related to existing feature enhancements. area/code-generation Issues or PRs as related to controllers or docs code generation area/crossplane Issues or PRs related to crossplane labels May 21, 2022
@eks-bot
Copy link

eks-bot commented Aug 19, 2022

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-bot ack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 19, 2022
@a-hilaly
Copy link
Member

/lifecycle frozen

@ack-bot ack-bot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 19, 2022
@a-hilaly a-hilaly self-assigned this Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/code-generation Issues or PRs as related to controllers or docs code generation area/crossplane Issues or PRs related to crossplane kind/enhancement Categorizes issue or PR as related to existing feature enhancements. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
No open projects
Status: Todo
Development

No branches or pull requests

4 participants