This change introduces a new `controller.NewSkipKey` method to designate certain reconciliations as "skipped".
The primary motivation for this is to squelch useless logging on non-leader replicas, which currently report success with trivial latency.
I have plumbed this through existing reconcilers and the code-gen so most things downstream should get this for free. In places where a key is observed, I do not mark the reconcile as skipped as the reconciler did some processing for which the awareness of side-effects and reported latency may be interesting.
* Add smart handling of selectors in webhooks
This is an alternative fix for #1590. Instead of arbitrarily adding a label from a different project to avoid the reconcilers racing, this adds "smart" handling of the selectors in that labels not inside the knative.dev domain are plainly ignored and our own selectors are added additively.
* Fix formatting
* Fix missing variable usage
* Factor index out of Reconciler
Applying multiple Bindings to the same subject makes the reconciler more
complex, so split out the index handling.
* unexport contents of index.go
* Apply multiple bindings to the same subject
The affected files are actually copyright 2019-2020,
but boilerplate-check fails if this is used. See:
https://github.com/mattmoor/boilerplate-check/issues/22
Fixes https://github.com/knative/pkg/issues/1786
* Remove unused code.
* Use raw strings to avoid escaping.
* Remove unneeded type conversions.
* Preallocate slices where possible.
* Use semantic equality in psbinding reconciler.
* add ability to opt-out of bindings
* I guess a year changed...
* had opt-in / opt-out backwards
* add unit test for contexts, fix comment
* clarify comments
* remove Binding from method/const names since already in bindings package
This PR adds facilities to make it easier to create both components of a Binding
over "Pod Spec"-able resources. Rather than rehashing it all here, please look
at `./pkg/webhook/psbinding/README.md` for more details.