Skip to content

Parallelize ApplicationSet Reconciliation Loop #10952

@rumstead

Description

@rumstead

Summary

The ApplicationSet controller looks to do a lot, if not all, tasks sequentially. This can cause slow ApplicationSet reconciliation when the controller is stuck waiting on slow tasks, like network IO from a GIT generator.

For instance,

time="2022-10-14T13:49:05Z" level=info msg=Trace args="[git fetch origin HEAD --tags --force]" dir=/tmp/https_super_secret_repo="exec git" time_ms=3122.340543

Motivation

Speeding up the reconciliation loop will allow for ApplicationSet changes to be applied faster providing a quicker feedback loop.

I have an app set controller managing about 100 apppsets, generating about 1800 applications. I am seeing large latency between a new application set being deployed and the controller picking them up. I do use the app of apps pattern for deploying the application sets. An example time line:

  1. pr merge for new app set
  2. About 2 minutes later Argo cd syncs appset via polling
  3. 14 minutes later the appset controller picks up the new appset

I am on version 2.4.14

Proposal

I haven't gotten this far yet but some sort of worker, consumer pattern :).

Another idea would be to integrate GIT interactions with the repo-server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:application-setsIssue related to the ApplicationSet controllerenhancementNew feature or requesttype:scalabilityIssues related to scalability and performance related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions