Skip to content

feat: Claude API proxy with key from k8s secret - #32

Merged
surrealwolf merged 8 commits into
mainfrom
feat/claude-api-key-from-secret
Feb 2, 2026
Merged

feat: Claude API proxy with key from k8s secret#32
surrealwolf merged 8 commits into
mainfrom
feat/claude-api-key-from-secret

Conversation

@surrealwolf

Copy link
Copy Markdown
Collaborator

Adds Claude API proxy so the API key can be stored in a Kubernetes secret instead of the browser.

Changes

  • Claude proxy (/claude/*) forwards to Anthropic API with key from CLAUDE_API_KEY env
  • GET /api/config returns {claudeEnabled: bool} for UI to detect backend key
  • httpx dependency for async HTTP proxy

Deployment

  1. Create secret: kubectl create secret generic high-command-api-secrets --from-literal=claude-api-key='sk-ant-...' -n high-command
  2. Add CLAUDE_API_KEY from secret to API deployment (see k8s/api-deployment-*.yaml)
  3. Add /claude route to HTTPRoute (with /api)

K8s manifests are in the high-command root (not in this repo).

The CI pipeline uses 'make build' but the Makefile didn't have a build target for Python projects.

Error: make: *** No rule to make target 'build'. Stop.

Changes:
- Added build target that runs 'pip install --upgrade pip build' and 'python -m build'
- Build depends on clean target to ensure fresh builds
- Updated .PHONY declaration to include build
- Updated help text to include build target
- Add /claude/* proxy to Anthropic API
- CLAUDE_API_KEY from env (k8s secret)
- GET /api/config returns claudeEnabled for UI
- Add httpx dependency for async proxy
@surrealwolf
surrealwolf merged commit 5909121 into main Feb 2, 2026
8 checks passed
@surrealwolf
surrealwolf deleted the feat/claude-api-key-from-secret branch February 2, 2026 07:52
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