Skip to content

fix(operators): create tenant-runtime ServiceAccount in the Platform reconcile#29

Merged
stxkxs merged 1 commit into
mainfrom
fix/platform-tenant-runtime-sa
Jun 3, 2026
Merged

fix(operators): create tenant-runtime ServiceAccount in the Platform reconcile#29
stxkxs merged 1 commit into
mainfrom
fix/platform-tenant-runtime-sa

Conversation

@stxkxs

@stxkxs stxkxs commented Jun 3, 2026

Copy link
Copy Markdown
Member

The tenant-runtime ServiceAccount the tenant IRSA role's trust is scoped to was created only by the AgentFleet/AgentSandbox reconcilers, so a Platform could reach phase=Ready without it — a conformance audit (cloudgov) flags SERVICE_ACCOUNT_MISSING and the role is unusable.

The Platform reconcile now creates the SA (IRSA-annotated) after minting the role and before phase=Ready, since it's a Platform-level identity primitive. The fleet/sandbox reconcilers still ensure it (idempotent).

Surfaced by the landing-zone task e2e harness reaching the cloudgov gate on real EKS. Operator make test (controller + conformance suites) passes.

…reconcile

The tenant-runtime ServiceAccount — the identity tenant workloads assume via
IRSA — was created only by the AgentFleet and AgentSandbox reconcilers. But a
Platform reaches phase=Ready as soon as its own reconcile finishes minting the
IRSA role, independent of (and usually before) any AgentFleet reconcile. So a
freshly-provisioned Platform could be Ready with no tenant-runtime SA, which a
conformance audit flags as SERVICE_ACCOUNT_MISSING: the IRSA role's trust is
scoped to exactly system:serviceaccount:<ns>:tenant-runtime, so without the SA
the role is unusable and tenant pods cannot authenticate.

The SA is a Platform-level identity primitive, not a fleet detail — the role is
minted at the Platform layer and is meaningless without it. The Platform
reconcile now creates the tenant-runtime SA (IRSA-annotated with the role it
just minted) after setting status.IamRoleArn and before phase=Ready, so the SA
always exists whenever the Platform is Ready. The AgentFleet and AgentSandbox
reconcilers still call ensureTenantServiceAccount; CreateOrUpdate is idempotent
so the duplicate calls are harmless.
@stxkxs stxkxs merged commit f564e1e into main Jun 3, 2026
15 checks passed
@stxkxs stxkxs deleted the fix/platform-tenant-runtime-sa branch June 3, 2026 01:57
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