Skip to content

fix(fastdeploy): run KV-sync Job under the namespace default SA#27

Merged
hugo-ccabral merged 1 commit into
mainfrom
fix/fastdeploy-sync-default-sa
Jul 7, 2026
Merged

fix(fastdeploy): run KV-sync Job under the namespace default SA#27
hugo-ccabral merged 1 commit into
mainfrom
fix/fastdeploy-sync-default-sa

Conversation

@hugo-ccabral

@hugo-ccabral hugo-ccabral commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

The tanstack-kv sync Job was pinned to BUILD_SERVICE_ACCOUNT (deco-operator-builders), copied from the cfworkers build path. That SA exists for AWS IRSA (S3 artifact/log upload) and the chart only creates it in the operator namespace — so a sync Job created in a site's own namespace (sites-<site>) fails to schedule (ServiceAccount not found).

The sync Job needs no special identity: it clones via a GitHub token and writes Cloudflare KV via a CF token, both from env — no AWS/IRSA, no Kubernetes API. So default its ServiceAccount to empty → Kubernetes uses the namespace default SA (always present). Optional override via DECOFILE_SYNC_SERVICE_ACCOUNT for clusters that require a specific SA.

No chart change needed (the value defaults empty). After release, sites can run fast-deploy from their own namespace instead of only deco-system.

🤖 Generated with Claude Code


Summary by cubic

Default the tanstack KV-sync Job to the namespace’s default ServiceAccount to fix SA-not-found scheduling failures in site namespaces. Add an optional override via DECOFILE_SYNC_SERVICE_ACCOUNT (replaces BUILD_SERVICE_ACCOUNT).

Written for commit c536449. Summary will update on new commits.

Review in cubic

The tanstack-kv sync Job was pinned to BUILD_SERVICE_ACCOUNT
(deco-operator-builders), copied from the cfworkers build path. That SA is for
AWS IRSA (S3) and only exists in the operator namespace, so sync Jobs created in
a site's own namespace failed to schedule (SA not found).

The sync Job needs no special identity — it clones via a GitHub token and writes
KV via a Cloudflare token (both from env), with no AWS/IRSA and no Kubernetes API
access. Default the ServiceAccount to empty (→ namespace "default" SA); allow an
explicit override via DECOFILE_SYNC_SERVICE_ACCOUNT if a cluster requires one.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hugo-ccabral hugo-ccabral force-pushed the fix/fastdeploy-sync-default-sa branch from 7985ee8 to c536449 Compare July 7, 2026 13:39
@hugo-ccabral hugo-ccabral merged commit 53c759d into main Jul 7, 2026
4 checks passed
@hugo-ccabral hugo-ccabral deleted the fix/fastdeploy-sync-default-sa branch July 7, 2026 14: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