Commit Graph

55 Commits

Author SHA1 Message Date
lichuqiang d247efe41d update EnqueueControllerOf to properly handle Delete (#146)
* update EnqueueControllerOf to properly handle Delete

* update existing test

* add enqueue label tests

* address comments
2018-10-30 07:13:34 -07:00
Mustafa Demirhan 6c3ae54dda Add reconciler metrics (#127)
* Add reconciler metrics for queue depth, reconcile count & reconcile latency.

* Update deps.

* Change queue depth measurement type to int64 from float64

* Address PR comments

* Add extra unit tests.

* Minor fixes.

* Address PR comments by adding extra documentation

* Add tests for testing/fake_stats_reporter

* Addressed PR comments.

* Address PR comments.
2018-10-22 14:34:30 -07:00
Ivan Mikushin 62bcfe912f Prepare for global resync on ConfigMap changes (#132)
* Prepare for global resync on ConfigMap changes

- Add GlobalResync(cache.SharedInformer) method to *controller.Impl
- Move UntypedStore from serving/pkg/config to pkg/configmap
- Add onAfterStore callbacks to UntypedStore
- Add TypeFilter to enable composable construction of such callbacks

* Address review

- Unit test GlobalResync()
- Reimpl GlobalResync() using ListKeys()

* Update comments

* Add test for onAfterStore

* Update godoc comment for Logger
2018-10-18 09:47:28 -07:00
Matt Moore 4da41e302a Bump the sleep in the controller testing. (#88)
The rate limiting queue makes the sleep necessary.  Locally I see 0-2 failures when this is run with -count=10000.  This bumps the sleep slightly to reduce this further.

Fixes: https://github.com/knative/pkg/issues/56
2018-09-24 07:49:20 -07:00
Matt Moore bf6f9e373f Move our base controller infrastructure into knative/pkg. (#33)
The `controller.go` is from: https://github.com/knative/serving/pull/1770, however, this adds 100% coverage of `controller.go`, which we have been missing in `knative/serving`.

This also adds a `context.Context` to the `Reconcile` signature, to enable better sharing of logger setup across controllers.

Fixes: https://github.com/knative/pkg/issues/8
2018-08-01 14:32:37 -07:00