Skip to content

Allow restricting ClusterProfile reconciliation to selected namespaces #18

Description

@kahirokunn

Background

KEP-4322 is being updated to define each namespace as an independent cluster inventory:

kubernetes/enhancements#6237

The same physical cluster may therefore be represented by ClusterProfile objects in multiple namespaces. These objects may have the same labels, while cross-inventory deduplication is outside the scope of the KEP.

Currently, clusterinventory-controller watches ClusterProfile objects across all namespaces and creates a SveltosCluster for each one. This creates a risk that the same cluster is registered multiple times and that Sveltos attempts to deploy the same resources to it more than once.

Proposal

Allow the controller to reconcile ClusterProfile objects only from:

  • the namespace where clusterinventory-controller is running by default; or
  • a configurable list of namespaces, for example via --cluster-profile-namespaces.

Optionally, * could preserve the current all-namespaces behavior.

This would align Sveltos with the namespace-scoped inventory model used by consumers such as Kueue and the Argo CD ClusterProfile integration.

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