GoogleCloudPlatform / metacontroller

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

Is there a way to trigger a resync? #183

Open arielb135 opened 5 years ago

arielb135 commented 5 years ago

Hello, i'm trying to write a controller that watches a custom resource, that in turn will create objects in rabbitMQ.

I wanted to know, if the rabbitMQ server is restarted, i would like to trigger a sync command now, instead of waiting to a resync period.

Short resync period of all object seems a bit overkill.. any way to achieve it?

Right now the only way i can think of is to save all objects locally in the controller, then expose a "resync" method.

rajasaur commented 5 years ago

I think if you kill the pod (metacontroller-0) that is run by the statefulset, when it starts back up, it should trigger a resync?

arielb135 commented 5 years ago

It does, but its ugly ;)