GoogleCloudPlatform / metacontroller

Lightweight Kubernetes controllers as a service
https://metacontroller.app/
Apache License 2.0
792 stars 105 forks source link

Add per-object, one-time resync. #153

Closed enisoc closed 5 years ago

enisoc commented 5 years ago

This adds a resyncAfterSeconds field (can be a decimal) to the sync hook response of CompositeController and DecoratorController. This field allows the hook response to request a resync of one particular object after a specified delay, for example if the hook knows it wants to recheck some external state for just that object. As a result, the controller-wide resyncPeriodSeconds can be kept at a larger interval while being responsive when external state is more likely to change quickly for certain objects.

Closes #152

crimsonfaith91 commented 5 years ago

/lgtm Thanks!