Skip to content
This repository was archived by the owner on Jul 22, 2022. It is now read-only.
This repository was archived by the owner on Jul 22, 2022. It is now read-only.

System rapidly making calls to sync hook #197

Description

@kevinjdolan

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:

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions