Skip to content

feat: Pass ServiceAccount namespace in managed cluster to pull mode agent - #2149

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:managed-cluster-sa-namespace
Dec 5, 2026
Merged

gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:managed-cluster-sa-namespace

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

A RoleRequest can choose the namespace of the tenant ServiceAccount in the managed cluster (RoleRequest.Spec.ManagedClusterServiceAccountNamespace). In push mode the namespace is already part of the kubeconfig stored by access-manager. In pull mode sveltos-applier impersonates the ServiceAccount and needs to know its namespace.

When a ClusterSummary has a tenant admin, look up the RoleRequest that defines the ServiceAccount in the managed cluster and set the namespace in ConfigurationGroup.Spec.ManagedClusterServiceAccountNamespace. Nothing is set when no RoleRequest chose a namespace, so existing behavior is unchanged.

addon-controller only reads RoleRequests: add get/list/watch permission.

Refs #2121

@gianlucam76
gianlucam76 force-pushed the managed-cluster-sa-namespace branch from f141c58 to 4600713 Compare December 5, 2026 14:40
…gent

A RoleRequest can choose the namespace of the tenant ServiceAccount in the
managed cluster (RoleRequest.Spec.ManagedClusterServiceAccountNamespace).
In push mode the namespace is already part of the kubeconfig stored by
access-manager. In pull mode sveltos-applier impersonates the ServiceAccount
and needs to know its namespace.

When a ClusterSummary has a tenant admin, look up the RoleRequest that
defines the ServiceAccount in the managed cluster and set the namespace in
ConfigurationGroup.Spec.ManagedClusterServiceAccountNamespace. Nothing is
set when no RoleRequest chose a namespace, so existing behavior is unchanged.

addon-controller only reads RoleRequests: add get/list/watch permission.

Refs projectsveltos#2121
@gianlucam76
gianlucam76 force-pushed the managed-cluster-sa-namespace branch from 4600713 to 489234d Compare December 5, 2026 15:12
@gianlucam76
gianlucam76 merged commit e18d4fa into projectsveltos:main Dec 5, 2026
14 checks passed
@gianlucam76
gianlucam76 deleted the managed-cluster-sa-namespace branch December 5, 2026 15:39
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