Skip to content

How to make operator watch all namespaces #55

Closed as not planned
Closed as not planned

Description

@kvaps

We want to deploy separate flux instance for every tenant, but it seems fluxcd-operator does not see any instances created outside of it's WATCH_NAMESPACE. How to make operator watch and handle FluxcdInstances from all namespaces?

Activity

  1. stefanprodan commented on Jun 26, 2024

    @stefanprodan
    Member

    Flux is not made to be deployed per namespace. You would set cluster.multitenant true. See here how multi-tenancy works https://fluxcd.io/flux/installation/configuration/multitenancy/

  2. kvaps commented on Jun 26, 2024

    @kvaps
    Author

    Got it. Can I target fluxcd to multiple namespaces?

    Eg. one flux serves everything in cozy-*
    Second for tenant-user1 and tenant-user1-extra

  3. kvaps commented on Jun 26, 2024

    @kvaps
    Author

    There an option to use label selectors, eg. --watch-label-selector for the controllers.

    https://fluxcd.io/flux/installation/configuration/sharding/

    So we probably need to write webhook which would automatically append the needed labels to created resources according to the namespace they were created.

    Is that correct way?

  4. stefanprodan commented on Jun 26, 2024

    @stefanprodan
    Member

    Why do you need sharding? Are you deploying 10K apps? Isn’t vertical scaling working for you?

    For tentat isolation, you would only need to provision SA/RBAC in each namespace.

  5. kvaps commented on Jun 26, 2024

    @kvaps
    Author

    Not yet. We just want to enhance parallel resources processing and minimize the failure domain to specific tenants.

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