By default, your sync hook will only be called when something changes in one of the resources you’re watching, or when the local cache is flushed.
Because no resync period is defined for the controller in the example, my expectation would be that the sync hook would only be called once. However, I am seeing it called approximately once per second.
Running kubectl -n hello describe helloworld your-name, I see the following fields changing:
Metadata / Generation
Metadata / Resource Version
Status / Observed Generation
Looking at the logs for metacontroller, it doesn't seem like it is actually sending updates to the children resources unless the output actually changes.
I am concerned for performance reasons about the frequent calls to sync. My expectation is that the resyncPeriodSeconds paramater, as well as the resyncAfterSeconds response parameter could be used to tune the performance of these items; but I am suspicious that there is a problem with the implementation since these parameters seem to be ignored.
I followed the guide here for building an example controller, using all of the provided sources and commands: https://metacontroller.app/guide/create/
I am working on a fairly fresh cluster running 1.15.9-gke.22 in GKE.
According to these docs, https://metacontroller.app/api/compositecontroller/, the following quote:
Because no resync period is defined for the controller in the example, my expectation would be that the sync hook would only be called once. However, I am seeing it called approximately once per second.
Running
kubectl -n hello describe helloworld your-name
, I see the following fields changing:Looking at the logs for metacontroller, it doesn't seem like it is actually sending updates to the children resources unless the output actually changes.
I am concerned for performance reasons about the frequent calls to sync. My expectation is that the resyncPeriodSeconds paramater, as well as the resyncAfterSeconds response parameter could be used to tune the performance of these items; but I am suspicious that there is a problem with the implementation since these parameters seem to be ignored.