-
Notifications
You must be signed in to change notification settings - Fork 418
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
✨ Generation of typed apply clients #536
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
0605102
to
9122158
Compare
6c7bede
to
c9926ae
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.
(first pass on some high-level stuff)
a299774
to
1aa6beb
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.
I primarily reviewed the generated types. They look mostly correct, just some corner cases that were different than k/k or that might need some extra documentation.
pkg/applyconfigurations/testdata/ac/zz_generated.applyconfigurations.go
Outdated
Show resolved
Hide resolved
pkg/applyconfigurations/testdata/ac/zz_generated.applyconfigurations.go
Outdated
Show resolved
Hide resolved
pkg/applyconfigurations/testdata/ac/zz_generated.applyconfigurations.go
Outdated
Show resolved
Hide resolved
/test all |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@EraYaN No, I actually deliberately omitted the I've been working on another branch which integrates directly the code into controller-tools and that again, doesn't generate the extract methods, but, if we could generate the openapi schema and pass it in, could do, perhaps a later extension? |
Generating the openapi.json doesn't seem to be trivial, so if at all possible it would be great if it ends up being all "batteries included". Operators like the I like having the Extract methods since mostly we are doing something akin to this: https://github.com/zoetrope/kubebuilder-training/blob/main/codes/50_completed/controllers/markdownview_controller.go#L221-L253 Arguably we probably don't need those Extract calls and the Gets in the first place. But since it seems like it's one of the only complete examples using SSA extensively, it might be part of the story for quite some people. |
You're right it's not the most straight forward thing to generate. By not supplying it, I think we are achieving what this PR set out to do, but, what is missing? The extract functions could possibly be generated separately, or, we can try and work out (maybe in a follow up PR), how to provide this and complete the generation |
@JoelSpeed do you agree within we moving forward with this one now? |
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.
It seems fine for me.
/lgtm
Looking for @JoelSpeed and @vincepri and @alvaroaleman
Give their OK and remove the hold on this one.
/approve cancel @Jefftree Are you able to add tests and documentation before merging? |
@JoelSpeed mentioned they might be able to finish their branch after kubecon, which is likely the preferred approach as it avoids a lot of duplication |
I've been working on #818 today which I think is a good start on where we want to go. I would not recommend reviewing commit wise, it needs a lot of squashing, but, lets start working out what we want to see with this new integration. I'll leave a review myself with various points of UX I've thought of while working through |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
This is still relevant |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
This is still relevant |
Generate Apply clients for use with server side apply. For built in types, a hard coded mapping is done to point to the
client-go/applyconfiguration
types. For CRDs, we assume applyconfigurations live at<path-to-package>/ac
directory which should be the case if imported CRD packages also use our generator.