linkerd2/controller/webhook
Alejandro Pedraza 02efb46e45
Have the proxy-injector emit events upon injection/skipping injection (#3316)
* Have the proxy-injector emit events upon injection/skipping injection

Fixes #3253

Have the proxy-injector emit an event whenever a injection happens, or
when injection is skipped for some reason (also added that reason into
the proxy-injector logs). The level is associated to the parent workload
(it can't be associated to the pod because at this point the pod hasn't
been persisted).

The event recorder was setup at the `webhook/server.go` level and passed
to the proxy-injector's `Inject` function. The sp-validator thus also
has access to the event recorder, but for now it's not using it.

Related changes:

- Refactored `api.GetOwnerKindAndName()` to have it return a more
generic object.
- Refactored `report.Injectable()` to also have it return the reason why
a workload is not injectable.

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-08-26 13:34:36 -05:00
..
launcher.go Have the proxy-injector emit events upon injection/skipping injection (#3316) 2019-08-26 13:34:36 -05:00
server.go Have the proxy-injector emit events upon injection/skipping injection (#3316) 2019-08-26 13:34:36 -05:00
server_test.go Have the proxy-injector emit events upon injection/skipping injection (#3316) 2019-08-26 13:34:36 -05:00