Skip to content

feat(provisioner): per-org ServiceAccount for Lakekeeper pods (PR6)#584

Merged
fuziontech merged 1 commit into
mainfrom
lakekeeper-pr6-per-org-sa
May 20, 2026
Merged

feat(provisioner): per-org ServiceAccount for Lakekeeper pods (PR6)#584
fuziontech merged 1 commit into
mainfrom
lakekeeper-pr6-per-org-sa

Conversation

@fuziontech
Copy link
Copy Markdown
Member

What & why

Gives each org's Lakekeeper its own Kubernetes ServiceAccount (lakekeeper-<orgid>) in the shared lakekeeper namespace, so each can carry a distinct EKS Pod Identity scoped to that org's S3 bucket — per-org cloud-identity isolation without one namespace per org.

This is the duckgres half of the per-org-identity decision. The operator half is the spec.serviceAccountName patch on PostHog's operator fork (charts #11192); the AWS half is per-org Pod Identity associations (posthog-cloud-infra, follow-up; ECR repo in posthog-cloud-infra #8191).

Changes

  • EnsureServiceAccount — creates the bare per-org SA. Idempotent; on re-run leaves an existing SA untouched so out-of-band annotations survive. No IRSA role-arn annotation — EKS Pod Identity binds the IAM role to the (namespace, serviceAccount) pair AWS-side.
  • LakekeeperServiceAccountName(orgID) — the naming convention the Pod Identity association keys on.
  • EnsureForOrg creates the SA (step 2c) before the CR.
  • EnsureCR renders spec.serviceAccountName; omitted when empty, so it's backward compatible with the stock upstream operator.

Compatibility

Depends on PostHog/lakekeeper-operator@7a637da (charts #11192) for the serviceAccountName CRD field. The stock operator ignores the field, so this is safe to land ahead of the operator rollout.

Testing

  • New tests: SA create + idempotency + bad-orgID rejection; CR renders/omits serviceAccountName.
  • go test -tags kubernetes ./controlplane/... green; lint clean.

Stacked on the merged PR3 branch (carries PR3+PR4+PR5). Rebase to main once PR3 (#579) lands.

🤖 Generated with Claude Code

@fuziontech fuziontech force-pushed the lakekeeper-pr3-provisioning-trigger branch from 8a76b67 to 5e5ac44 Compare May 20, 2026 18:16
Base automatically changed from lakekeeper-pr3-provisioning-trigger to main May 20, 2026 18:17
Each org's Lakekeeper now runs under its own ServiceAccount
(lakekeeper-<orgid>) in the shared `lakekeeper` namespace, so it can carry a
distinct EKS Pod Identity scoped to that org's S3 bucket — per-org cloud-
identity isolation without one namespace per org.

- EnsureServiceAccount creates the bare per-org SA (idempotent; leaves an
  existing SA untouched so out-of-band annotations survive). No IRSA role-arn
  annotation: EKS Pod Identity binds the role to (namespace, SA) AWS-side.
- LakekeeperServiceAccountName(orgID) is the naming convention the
  posthog-cloud-infra Pod Identity association keys on.
- EnsureForOrg creates the SA before the CR (step 2c).
- EnsureCR renders spec.serviceAccountName (the PostHog-fork operator field);
  omitted when empty so it stays backward compatible with the stock operator.

Depends on PostHog/lakekeeper-operator@7a637da (charts #11192) for the
serviceAccountName CRD field; the stock operator ignores the field.

Tests: SA create + idempotency + bad-orgID rejection; CR renders/omits
serviceAccountName. go test -tags kubernetes ./controlplane/... green; lint clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@fuziontech fuziontech force-pushed the lakekeeper-pr6-per-org-sa branch from 798868c to 3b2a9ac Compare May 20, 2026 18:20
@fuziontech fuziontech merged commit 672638c into main May 20, 2026
38 checks passed
@fuziontech fuziontech deleted the lakekeeper-pr6-per-org-sa branch May 20, 2026 18:23
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