Skip to content

(feat) Introduce ManagementClusterClassifier CRD#637

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:mgmt-classifier
Jun 28, 2026
Merged

(feat) Introduce ManagementClusterClassifier CRD#637
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:mgmt-classifier

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

The existing Classifier evaluates rules against resources inside each managed cluster and applies labels based on what it finds there. This works well, but leaves a gap: there is no way to label managed clusters based on resources that live on the management cluster itself.

A concrete example is an Internal Developer Platform backed by Crossplane. When a team orders an addon, a Crossplane Composite Resource is created on the management cluster. The platform needs to label the target cluster in response so that Sveltos can deploy the right addons. But sveltos-agent only sees the managed cluster, not the management cluster, so the existing Classifier cannot help here.

This PR introduces two new CRDs to cover that gap. A ManagementClusterClassifier watches resources on the management cluster and runs a Lua function that receives the full set of matched resources and returns which managed clusters should be labeled. Because the evaluation happens entirely on the management cluster, no deployment to managed clusters is needed. A ManagementClusterClassifierReport tracks the label ownership state per classifier/cluster pair, enabling the same conflict detection the existing Classifier provides through the keymanager.

The existing Classifier evaluates rules against resources inside each managed
cluster and applies labels based on what it finds there. This works well, but
leaves a gap: there is no way to label managed clusters based on resources that
live on the management cluster itself.

A concrete example is an Internal Developer Platform backed by Crossplane. When a
team orders an addon, a Crossplane Composite Resource is created on the management
cluster. The platform needs to label the target cluster in response so that Sveltos
can deploy the right addons. But sveltos-agent only sees the managed cluster, not the
management cluster, so the existing Classifier cannot help here.

This PR introduces two new CRDs to cover that gap. A **ManagementClusterClassifier**
watches resources on the management cluster and runs a Lua function that receives the
full set of matched resources and returns which managed clusters should be labeled.
Because the evaluation happens entirely on the management cluster, no deployment to
managed clusters is needed. A **ManagementClusterClassifierReport** tracks the label
ownership state per classifier/cluster pair, enabling the same conflict detection the
existing Classifier provides through the keymanager.
@gianlucam76 gianlucam76 merged commit 3eb0233 into projectsveltos:main Jun 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant