Commit Graph

6 Commits

Author SHA1 Message Date
Markus Thömmes bbe0bb3eb1
Implement getter machinery to generically fetch all injected clients (#2054) 2021-03-10 09:35:25 -08:00
qibobo 1bbf0a6436
add LabelSelector to InformerFactory so that the informers only list and watch resources with the given labels (#1940)
* add  filtered InformerFactory and informers which only list and watch resources with the given labels

* rename to RegisterFilteredInformers

* generated files

* typo

* update per comments

* rename file

* rm old files
2021-01-19 08:21:23 -08:00
Matt Moore 43ca049cdb Reduce the boilerplate for setting up duck.InformerFactory's. (#896)
This augments the injection codegen with the capability to produce a duck.InformerFactory
attached to context for each type that we process.

Now a `duck.InformerFactory` for "Addressable" can be produced by "Get"ing it from the context.

This is triggered by placing `// +genduck` on the type that implements `duck.Implementable`.
2019-11-25 09:57:10 -08:00
Matt Moore 222dd25986 Migrate pkg to use the knative.dev/pkg import path (#489)
* Manual changes.

* scripted changes.
2019-06-26 13:02:06 -07:00
Matt Moore d8a2a739d6 Eliminate controller registration in favor of passing a list to the shared main. (#447) 2019-06-06 18:17:41 -07: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