Generate core types oapi schemas - #26
Conversation
|
at the moment assuming that a missing CRD is probably a k8s core resource is causing a strange behaviour when using maybe this PR would also be an opportunity to throw an error if a crd was requested and not found instead of assuming it to be a k8s core resource? |
|
Hi @avarei , the issue with throwing error in that place instead of passing through to the next iteration is that we'd effectively halt the execution if we threw the error. We'd have to distinguish three cases -> crd found (add to I'll be happy to think about how we can solve that issue in a clean way but I'd rather do that in a separate PR to not block Crossplane <2.2 users to use function-kro with core resources. If you open an issue please just mention me there and I'll be happy to take care of it :) |
jbw976
left a comment
There was a problem hiding this comment.
This is amazing @jonasz-lasut, thank you for trying out this functionality! it will fill an important functionality gap when running on Crossplane pre-v2.2 🙇
when i did the v0.2.0 release, i made some changes to the resolver code to refactor it, which affects this PR. would you be able to rebase and reapply these changes to the latest in main? sorry for the hassle! 🙏
After that's done, please let me know so I can take this for a local test spin too! really excited for this!
Signed-off-by: Jonasz Łasut-Balcerzak <jonasz.lasut@gmail.com>
f59a9d8 to
4eb5d10
Compare
jbw976
left a comment
There was a problem hiding this comment.
Thank you for integrating the feedback @jonasz-lasut! I was able to take this for a test spin on a v2.1 and v2.2 control plane - both worked perfectly! 💪
I only have a few small suggestions now, and then I think we can merge this and have awesome support for core types pre v2.2! 🙇
Signed-off-by: Jonasz Łasut-Balcerzak <jonasz.lasut@gmail.com>
4eb5d10 to
20faebe
Compare
jbw976
left a comment
There was a problem hiding this comment.
yessss, nice work @jonasz-lasut! let's ship this!!! 🚀
|
Successfully created backport PR for |
Description of your changes
Adds support for kubernetes core resources for Crossplane
<2.2.0that does not supportrequired_schemascapability.Generates openapi schemas with
go generate ./...and later merges them withk8s.io/apiextensions-apiserver/pkg/generated/openapischemas in the resolver.Fixes #9
Tested using the following steps:
Result:
Tool versions:
I have:
- [ ] Added or updated unit tests for my change.- did not add tests as the PR adds a go:generate script but I've added an example and tested the feature