Commit Graph

4 Commits

Author SHA1 Message Date
Dave Protasowski 5671699f23
drop the dynamic type (#2750) 2023-05-31 07:39:36 +00:00
Matt Moore 7b5ecbc0e4
Sketch out an alternate way of injecting clients/informers (#2210)
* This commit contains the actual changes to support dynamic client injection.

* Incorporate n3wscott review nits

* This includes the code-generation for the dynamic client-based injection.

This also includes a number of manually created files of the form `*_expansion.go`, which are needed to satisfy some of the Kubernetes manual type "expansions".  At present, these are all simply `panic("NYI")`, but may become more than that in the future.
2021-08-18 06:52:08 -07:00
Markus Thömmes bbe0bb3eb1
Implement getter machinery to generically fetch all injected clients (#2054) 2021-03-10 09:35:25 -08:00
Matt Moore 4c630bb1bb Create a library for Reconciler dependency injection. (#423)
This creates a base library that enables us to leverage the dependency
graph to convey injection dependencies.  Our controllers will start
to get their informers off of a `context.Context` via `fooinformers.Get(ctx)`.

By simply linking `fooinformers` to access the informer in this way, we trigger
a cascade of `init`-time registrations for the informer, and its transitive
dependencies (e.g. shared informer factory, client).

The `ctx` is infused with these informers in `package main` by linking the
appropriate reconcilers (transitively registering everything) and then calling
`sharedmain.Main()` (from `github.com/knative/pkg/injection/sharedmain`).
2019-06-05 07:37:38 -07:00