Skip to content

Question: sharding on kustomize controller only #1174

Open
@masterphenix

Description

@masterphenix

Hello,
One of our k8s cluster has more than 300 namespaces ; we are using flux to manage content of this cluster, by means of:

  • 1 gitRepository source, that points to a unique repository, formatted like this:
<cluster_name>
  |_<namespace1>
  |_<namespace2>
    |_ kustomization and resources
  • 1 kustomization (kustomize.toolkit.fluxcd.io/v1) per namespace
  • a webhook to trigger reconcilation when a push is made on the git repo

Today, we are facing some delays when pushing changes to git, because the kustomize controller will trigger a reconcile on every kustomization (more than 300) ; as a result, for a small change on a single namespace, it can take more than 5 minutes to be applied on the cluster, depending on the order in which reconciliations are done.

We considered using the sharding capability of the kustomize controller, but it appears that, since flux kustomization are depending on the GitRepository source, the latter should also be sharded: this is an issue for us, since there is only 1 gitRepository for 300 kustomization.

Did we understand something wrong ? Would you by any chance have any recommendations to help us lower these delays ?

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