* refactor codegen into different packages and use gengo v2
This allows us to run this injection against types that have newer golang features - eg. 'any'
* updated go.mod drops gengo v1
* tweak scripts to support gengov2 framework
* drop verbose output
Generally K8s types have a list type where the 'Items' member is an
array of structs.
ie. https://pkg.go.dev/k8s.io/api@v0.25.3/apps/v1#DeploymentList
type DeploymentList struct {
...
// Items is the list of Deployments.
Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"`
}
Istio is an exception where the list contains pointers to structs
type GatewayList struct {
...
Items []*Gateway `json:"items" protobuf:"bytes,2,rep,name=items"`
}
To hint that the list types are pointers you can now pass the flag
'--lister-has-pointer-elem'.
Ideally we could infer this info by inspecting the types but
unfortunately the generator doesn't load this information
* genreconciler:nonNamespaced
* Adding a force-kinds flag to the reconciler generator to allow us to generate reconcilers for non-owned types.
* force-kinds --> force-genreconciler-kinds
* some minor nits with the generators for non-knative types needed to be removed.
* remove whitespace
Co-authored-by: Nacho Cano <nachoacano@gmail.com>
* adding a reconciler generator to use as the base reconcilers for all of knative.
* mend
* fix tag names.
* use reconciler events
* trying new thing.
* base working reconciler gen
* working cleaned up reconciler generator.
* fix typo
* fix some ordering.
* fix interface path
* fix whitespace
* update deps.
* updates based on feedback.
* Remove core loop.
* reconcilerImpl
* add NewReconciler
* Fix copyright header
* Comment out finalizers
* remove finalizers from generated code.