-
Notifications
You must be signed in to change notification settings - Fork 267
document thoughts on code generation #15
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
document thoughts on code generation #15
Conversation
b0aa9f8
to
33a369f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super happy about this, concise and great coverage at the same time. I've done a first pass, some minor things, a little consistency, and a bit of clarification for follow-up. I think we're in a good shape for a PoC based on these design considerations.
docs/code-generation.md
Outdated
* a hybrid custom code generator + sigs.kubernetes.io/controller-tools (CR) | ||
|
||
The original AWS Service Operator used a [custom-built generator][1] that | ||
processed [YAML files][2] describing the AWS service and used [templates][3] to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/YAML files/YAML manifests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
docs/code-generation.md
Outdated
The original AWS Service Operator used a [custom-built generator][1] that | ||
processed [YAML files][2] describing the AWS service and used [templates][3] to | ||
[generate CRDs][4], the [controller code][5] itself and the [Go types][6] that | ||
mirror the CRDs. It's worth noting that the CRDs *and* the controller code that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/mirror the CRDs/represent the CRDs in memory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
docs/code-generation.md
Outdated
plan. Instead, ASO is a controller that facilitates creation and management of | ||
various AWS service objects using Kubernetes CRD instances. | ||
|
||
kubebuilder is the the recommended upstream tool for generating CRDs and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mickey Blue Eyes disapproves :)
s/kubebuilder is the the/kubebuilder is the
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
docs/code-generation.md
Outdated
various AWS service objects using Kubernetes CRD instances. | ||
|
||
kubebuilder is the the recommended upstream tool for generating CRDs and | ||
controller stub code. It is a Golang binary that creates the scaffolding for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: While Golang
is not incorrect, I'd prefer the simpler, short, and in our context unambiguous Go
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done :)
docs/code-generation.md
Outdated
|
||
[9]: https://github.com/kubernetes-sigs/controller-tools/blob/a5fa7b956b85a6e792bc7086fedf7107d62452b1/cmd/controller-gen/main.go | ||
|
||
We also want to generate some Golang code that "installs" a new reconciling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should separate the build and operate (install/upgrade/ALM) concerns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
Adds a document discussing options for code generation and a diagram with how a multi-phase hybrid custom+controller-runtime generator might work. Issue #4
33a369f
to
91e6341
Compare
Adds a document discussing options for code generation and a diagram
with how a multi-phase hybrid custom+controller-runtime generator might
work.
Issue #4