Skip to content

feat: Add agentgroup library and AgentGrouping license feature - #715

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:agent-grouping
Nov 3, 2026
Merged

gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:agent-grouping

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

Add lib/agentgroup, which lets one agent (drift-detection-manager, later sveltos-agent) serve a group of clusters.

Groups are named -<hash(namespace/shard)>- and each one is described by a ConfigMap listing its members. Placement is sticky first-fit: existing members never move. Writes use the resourceVersion that was read, so concurrent changes fail with a conflict and are retried with jittered backoff.

Assigner keeps the groups in memory (write-through cache of the ConfigMaps, rebuilt from them on restart) and serializes decisions per component and cluster namespace, so several reconcilers handling the same cluster never place it in two groups.

Add FeatureAgentGrouping to the licensed features. Agents enforce it.

Unit tests cover the stateless functions and the Assigner. A stress test against envtest (lib/agentgroup/stress) is skipped unless AGENTGROUP_STRESS is set.

Add lib/agentgroup, which lets one agent (drift-detection-manager,
later sveltos-agent) serve a group of clusters.

Groups are named <component>-<hash(namespace/shard)>-<index> and each
one is described by a ConfigMap listing its members. Placement is
sticky first-fit: existing members never move. Writes use the
resourceVersion that was read, so concurrent changes fail with a
conflict and are retried with jittered backoff.

Assigner keeps the groups in memory (write-through cache of the
ConfigMaps, rebuilt from them on restart) and serializes decisions per
component and cluster namespace, so several reconcilers handling the
same cluster never place it in two groups.

Add FeatureAgentGrouping to the licensed features. Agents enforce it.

Unit tests cover the stateless functions and the Assigner. A stress
test against envtest (lib/agentgroup/stress) is skipped unless
AGENTGROUP_STRESS is set.
@gianlucam76
gianlucam76 merged commit 8998265 into projectsveltos:main Nov 3, 2026
4 checks passed
@gianlucam76
gianlucam76 deleted the agent-grouping branch November 3, 2026 09:01
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