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.
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
ClusterProfileobjects in multiple namespaces. These objects may have the same labels, while cross-inventory deduplication is outside the scope of the KEP.Currently,
clusterinventory-controllerwatchesClusterProfileobjects across all namespaces and creates aSveltosClusterfor 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
ClusterProfileobjects only from:clusterinventory-controlleris running by default; or--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.