Skip to content

Move WorkerPoolSyncer out of api-server #729

Description

WorkerPoolSyncer runs an informer to synchronize K8s pods to Substrate workers. This currently runs inside the ate-api-server, which is mixing responsibilities. We should move the WorkerPoolsyncer out of the ate-api-server and likely into the ate-controller, which is a better spot for an informer like this to run.

Activity

  1. added
    kind/featureAn enhancement / feature request or implementation
    prio/P0Highest priority / required for next milestone
    prio/P1Important but not critical
    and removed
    prio/P0Highest priority / required for next milestone
    on Aug 4, 2026
  2. sfunkenhauser commented on Aug 5, 2026

    @sfunkenhauser
    CollaboratorAuthor

    As part of this change, let's switch to using controller runtime to consolidate the reconciliation mechanisms that we are using, as ate-controller already uses controller runtime.

  3. troychiu commented on Aug 5, 2026

    @troychiu
    Contributor

    For reference #674 (comment), we are considering moving away from controller-runtime to use client-go as our reconciliation mechanism.

  4. AiWatson343 commented on Aug 6, 2026

    @AiWatson343

    This separation makes sense. The WorkerPoolSyncer is effectively a Kubernetes reconciliation component, so keeping it inside ate-api-server creates unnecessary coupling between the API surface and cluster state synchronization responsibilities.

    Moving it into ate-controller aligns better with the Kubernetes controller pattern: informers watch desired/current state changes, controllers reconcile resources, and the API server remains focused on serving requests and maintaining API behavior.

    Benefits of the move:

    Clearer ownership of Kubernetes-facing logic and lifecycle management.

    Better isolation of informer failures or API-server scaling concerns.

    Easier future expansion of worker reconciliation logic (status updates, health checks, drift correction).

    More consistent architecture with other controller-style components.

    The migration should preserve the current synchronization contract and consider leader election/HA behavior if multiple controller replicas will run the informer. It may also be worth reviewing event handling and backpressure so worker state changes do not impact controller responsiveness.

  5. HavenXia commented on Aug 6, 2026

    @HavenXia
    Member

    I think moved syncer should keep calling ate-api over gRPC instead of directly writing to the store, we should keep the ate-api as the single storage accessor. Having two accessor to our data will become more complicated for the system's compatibility.

    Scott Funkenhauser (@sfunkenhauser) WDYT?

  6. troychiu commented on Aug 7, 2026

    @troychiu
    Contributor

    I think moved syncer should keep calling ate-api over gRPC instead of directly writing to the store, we should keep the ate-api as the single storage accessor. Having two accessor to our data will become more complicated for the system's compatibility.

    Yes and I think that's why #730 is a blocker for this.

  7. HavenXia commented on Aug 7, 2026

    @HavenXia
    Member

    I think moved syncer should keep calling ate-api over gRPC instead of directly writing to the store, we should keep the ate-api as the single storage accessor. Having two accessor to our data will become more complicated for the system's compatibility.

    Yes and I think that's why #730 is a blocker for this.

    Great, thanks!

  8. added a commit that references this issue on Aug 26, 2026
    37735a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/api-machinerykind/featureAn enhancement / feature request or implementationprio/P1Important but not critical

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions