Repository navigation
chore(eso): drop unused anthropic-api-key remoteRef (D76, stage for post-launch) - #2889
Conversation
… (D76) Direct Anthropic routes were removed from the litellm config under D76, and the litellm deployment no longer references ANTHROPIC_API_KEY. This ExternalSecret remoteRef is the last chart reference to the credential; removing it stops ESO syncing anthropic-api-key into the api-keys secret. Order matters (do NOT reorder): 1. merge this 2. deploy 3. THEN disable the GCP SM versions of commonly-dev-anthropic-api-key Disabling the SM secret before this deploys would error the whole api-keys ExternalSecret sync — ESO rejects the ExternalSecret when any referenced remote key is missing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MDs9DS64Df3HsKsCHiKBWN
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Remove the API key mapping k8s/helm/commonly/templates/secrets/api-keys.yaml |
The ExternalSecret no longer maps the remote anthropic-api-key secret. |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Other
Possibly related PRs
- Team-Commonly/commonly#2704: This PR removes the remaining Anthropic API key reference after PR
#2704removed the direct Anthropic LiteLLM routes and runtime consumers.
Merge Risk: 
Minimal · up to ff61c
-
The change is mergeable. Deploy the chart before disabling the remote secret, as planned.
Pre-merge checks: 
4
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
lilyshen0722
left a comment
There was a problem hiding this comment.
Otto gate at ff61c8a.
Nothing on main reads anthropic-api-key from the api-keys Secret.
- Chart templates: apart from this ExternalSecret entry, no template names the key. There is no
secretKeyRefto it, and noenvFrommountsapi-keyswhole, so no pod can pick the key up implicitly. - Backend direct reads:
agentProvisionerServiceK8scallsreadNamespacedSecret('api-keys'), but it only decodes theopenai-codex-*keys. The pod specs it builds mapclawdbot-gateway-token,brave-api-key,firecrawl-api-key,deepgram-api-keyandcommonly-bot-runtime-token. No key name is assembled dynamically. ANTHROPIC_API_KEYin code:managedAgentsAdapter,registry/detect.tsandworkers/agent-runtimeread it fromprocess.env. No template on main sets that variable, so the cluster backend already runs without it, and this PR doesn't change any pod's env.- Other charts: the commonly-bot test already asserts that chart has no Anthropic key. LiteLLM's config notes that its direct Anthropic routes were removed.
The rest of the ExternalSecret still syncs. I rendered templates/secrets/api-keys.yaml at main and at this head with the defaults, and with errorTracking and hostedSandbox turned on. The only difference is these three lines; every other data entry is unchanged. It also renders with values-dev.yaml. The template is unchanged on main since this PR's base, so the merge is clean. With creationPolicy: Owner, ESO drops the key from the Secret on its next refresh (refreshInterval: 1h).
The order matters. The template's own comment says ESO rejects the whole ExternalSecret when any referenced remote key is missing. So before SRE disables the Secret Manager versions, the deployed ExternalSecret has to report synced at the generation without this entry. Disabling them earlier would stop every key in api-keys from refreshing, not just this one.
Non-blocking, stale text left behind:
- The header of
backend/services/managedAgentsAdapter.tssays the ESO mapping is wired for the backend pod. It isn't. k8s/QUICK_START.md(line 94) still tells self-hosters to create the Anthropic secret, andk8s/IMPLEMENTATION_STATUS.mdstill lists it.
Written by Otto, a Commonly agent — https://commonly.me/v2/pods/6a920d3eb08dee6c42a81bfc
GATE: PASS
What
Removes the
anthropic-api-keyremoteReffrom theapi-keysExternalSecret. It's the last chart reference to the Anthropic credential: direct Anthropic routes were removed from the litellm config under D76, and the litellm deployment template no longer referencesANTHROPIC_API_KEY(grep is clean onmain). The credential is inert — nothing routes to it.Opening now so it's ready, per the ledger. The sequence is strict:
commonly-dev-anthropic-api-key(manual, SRE)Disabling the SM secret before this deploys would error the whole
api-keysExternalSecret sync — ESO rejects the ExternalSecret when any referenced remote key is missing, which would take down every other key (openrouter, deepseek, gemini, …) on the next 1h sync. So the SM disable is the last step, never the first.Ledger: D76.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MDs9DS64Df3HsKsCHiKBWN