-
Notifications
You must be signed in to change notification settings - Fork 68
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
Rework the way eventing-rabbitmq does Rabbit codegen #378
Rework the way eventing-rabbitmq does Rabbit codegen #378
Conversation
19f27f9
to
4a2beb6
Compare
Today we rerun codegen for the Rabbit clients to get injection, but because they use kubebuilder their layout is a bit strange. There's a hack to temporarily copy the api types into the right structure, and then undo it, which is a bit fragile (if codegen references that package, then it won't build!). We also try to contort so that we can use their existing client/informer/lister codegen, which isn't really necessary. With this change, we instead permanently copy the types into a suitable structure under `third_party/pkg/apis` and generate all of the clients we need under `third_party/pkg/client`. This is a slight superset of what Istio and Contour are already doing (we don't need to copy those types), and feels a bit simpler (and less fragile) than what we are currently doing. /kind cleanup
This seems like a fine way to handle out of tree codegen for oddly layed out apis. 👍 |
4a2beb6
to
f5bf069
Compare
Codecov Report
@@ Coverage Diff @@
## main #378 +/- ##
=======================================
Coverage 75.54% 75.54%
=======================================
Files 44 44
Lines 2781 2781
=======================================
Hits 2101 2101
Misses 548 548
Partials 132 132
Continue to review full report at Codecov.
|
Today we rerun codegen for the Rabbit clients to get injection, but because they use kubebuilder their layout is a bit strange. There's a hack to temporarily copy the api types into the right structure, and then undo it, which is a bit fragile (if codegen references that package, then it won't build!). We also try to contort so that we can use their existing client/informer/lister codegen, which isn't really necessary. With this change, we instead permanently copy the types into a suitable structure under third_party/pkg/apis and generate all of the clients we need under third_party/pkg/client. This is a slight superset of what Istio and Contour are already doing (we don't need to copy those types), and feels a bit simpler (and less fragile) than what we are currently doing. /kind cleanup Ref (same for rabbitmq): knative-extensions/eventing-rabbitmq#378
Today we rerun codegen for the Rabbit clients to get injection, but because they use kubebuilder their layout is a bit strange. There's a hack to temporarily copy the api types into the right structure, and then undo it, which is a bit fragile (if codegen references that package, then it won't build!). We also try to contort so that we can use their existing client/informer/lister codegen, which isn't really necessary. With this change, we instead permanently copy the types into a suitable structure under third_party/pkg/apis and generate all of the clients we need under third_party/pkg/client. This is a slight superset of what Istio and Contour are already doing (we don't need to copy those types), and feels a bit simpler (and less fragile) than what we are currently doing. /kind cleanup Ref (same for rabbitmq): knative-extensions/eventing-rabbitmq#378
Today we rerun codegen for the Rabbit clients to get injection, but because they use kubebuilder their layout is a bit strange. There's a hack to temporarily copy the api types into the right structure, and then undo it, which is a bit fragile (if codegen references that package, then it won't build!). We also try to contort so that we can use their existing client/informer/lister codegen, which isn't really necessary. With this change, we instead permanently copy the types into a suitable structure under third_party/pkg/apis and generate all of the clients we need under third_party/pkg/client. This is a slight superset of what Istio and Contour are already doing (we don't need to copy those types), and feels a bit simpler (and less fragile) than what we are currently doing. /kind cleanup Ref (same for rabbitmq): knative-extensions/eventing-rabbitmq#378
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattmoor, n3wscott The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Today we rerun codegen for the Rabbit clients to get injection, but because they use kubebuilder their layout is a bit strange. There's a hack to temporarily copy the api types into the right structure, and then undo it, which is a bit fragile (if codegen references that package, then it won't build!). We also try to contort so that we can use their existing client/informer/lister codegen, which isn't really necessary. With this change, we instead permanently copy the types into a suitable structure under third_party/pkg/apis and generate all of the clients we need under third_party/pkg/client. This is a slight superset of what Istio and Contour are already doing (we don't need to copy those types), and feels a bit simpler (and less fragile) than what we are currently doing. /kind cleanup Ref (same for rabbitmq): knative-extensions/eventing-rabbitmq#378
Today we rerun codegen for the Rabbit clients to get injection, but because they use kubebuilder their layout is a bit strange. There's a hack to temporarily copy the api types into the right structure, and then undo it, which is a bit fragile (if codegen references that package, then it won't build!). We also try to contort so that we can use their existing client/informer/lister codegen, which isn't really necessary.
With this change, we instead permanently copy the types into a suitable structure under
third_party/pkg/apis
and generate all of the clients we need underthird_party/pkg/client
. This is a slight superset of what Istio and Contour are already doing (we don't need to copy those types), and feels a bit simpler (and less fragile) than what we are currently doing./kind cleanup
/assign @n3wscott
Release Note
Docs