You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a service account creates a workspace, the workspace initialization fails because the apibinding initializer attempts to impersonate the service account in the newly created workspace, but the service account identity doesn't exist in that workspace context.
Current Behavior
When a service account (e.g., system:serviceaccount:default:platform-mesh-provider-account-operator-kubeconfig) creates a workspace:
The workspace is created successfully and enters the Initializing phase
The service account is registered in the experimental.tenancy.kcp.io/owner annotation
The service account is added to the workspace-admin ClusterRoleBinding as a User kind
During initialization, the apibinding initializer attempts to impersonate this service account
Impersonation fails because the service account is foreign to the newly created workspace and doesn't exist in that workspace's context
The workspace remains stuck in the Initializing phase with initializers [61i8h8nir1vojygo:security system:apibindings] never being removed
Error Logs
{"ts":1776270996623.4114,"caller":"committer/committer.go:98","msg":"patching *v1alpha1.LogicalCluster","component":"kcp","postStartHook":"kcp-start-controllers","reconciler":"kcp-apibinder-initializer","key":"37qd0tx0ogfdluu3|cluster","logicalcluster.workspace":"37qd0tx0ogfdluu3","logicalcluster.namespace":"","logicalcluster.name":"cluster","logicalcluster.apiVersion":"","v":2,"patch":"{\"metadata\":{\"resourceVersion\":\"4889\",\"uid\":\"a77b08b0-8e4e-4a0e-a2b5-ab06be573c23\"},\"status\":{\"conditions\":[{\"lastTransitionTime\":\"2026-04-15T16:36:36Z\",\"message\":\"encountered errors: apibindings.apis.kcp.io is forbidden: User \\\"system:serviceaccount:default:platform-mesh-provider-account-operator-kubeconfig\\\" cannot create resource \\\"apibindings\\\" in API group \\\"apis.kcp.io\\\" at the cluster scope: access denied\\nNoOpinion\\nNoOpinion\",\"reason\":\"APIBindingErrors\",\"severity\":\"Error\",\"status\":\"False\",\"type\":\"APIBindingsInitialized\"},{\"lastTransitionTime\":\"2026-04-15T16:36:32Z\",\"message\":\"Initializers still exist: [61i8h8nir1vojygo:security system:apibindings]\",\"reason\":\"InitializerExists\",\"severity\":\"Info\",\"status\":\"False\",\"type\":\"WorkspaceInitialized\"}]}}"}
{"ts":1776270996644.2437,"logger":"UnhandledError","caller":"initialization/apibinder_initializer_controller.go:291","msg":"Unhandled Error","err":"kcp-apibinder-initializer: failed to sync \"37qd0tx0ogfdluu3|cluster\", err: failed to patch *v1alpha1.LogicalCluster cluster: LogicalCluster.tenancy.kcp.io \"cluster\" is invalid: status.initializers: Invalid value: [\"61i8h8nir1vojygo:security\",\"system:apibindings\"]: only removing the \"system:apibindings\" initializer is supported"}
create an account resource in :root:orgs workspace. In a newly created workspace will be no apibindings
Expected Behaviour
Service accounts should be able to create workspaces programmatically, with workspace initialization completing successfully.
Additional Context
The planned solution is tracked in KEP-0003: Workspace Lifecycle RBAC and Issue #4016, which will provide more flexible identity handling for workspace creation and initialization.
Describe the bug
When a service account creates a workspace, the workspace initialization fails because the apibinding initializer attempts to impersonate the service account in the newly created workspace, but the service account identity doesn't exist in that workspace context.
Current Behavior
When a service account (e.g., system:serviceaccount:default:platform-mesh-provider-account-operator-kubeconfig) creates a workspace:
Error Logs
workspace configuration
workspace-admin ClusterRoleBinding
Steps To Reproduce
task local-setupfrom helm-charts repotask docker:kindfrom this branch feat: workspace types migration platform-mesh/platform-mesh-operator#576Expected Behaviour
Service accounts should be able to create workspaces programmatically, with workspace initialization completing successfully.
Additional Context
The planned solution is tracked in KEP-0003: Workspace Lifecycle RBAC and Issue #4016, which will provide more flexible identity handling for workspace creation and initialization.