-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: Migrate to .env-based secret management #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Migrate to .env-based secret management #34
Conversation
Replace rolling tags (main-latest, main) with specific versions for reproducibility and to enable new features. Increases LiteLLM memory limits to support v1.80's Agent Gateway and MCP features. Changes: - LiteLLM: main-latest → v1.80.10.rc.5 (Agent Gateway, MCP support, 50% memory leak reduction) - Open WebUI: main → v0.6.41 (rate limiting, group channels, folders) - LiteLLM memory: 512Mi/2Gi → 1Gi/3Gi (supports new features and Phase 2 Claude service) These versions are fully compatible with Phase 2 migration plan (OAuth, Claude service, OpenShift Routes). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updates all hostname references from vteam.local to ambient.local to align with Ambient Code Platform branding. Changes: - Ingress hostname: vteam.local → ambient.local - Documentation (README.md, PHASE1.md) - Makefile help text and deployment messages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Use Kustomize secretGenerator to create secrets from .env file - Remove secrets.yaml from git tracking (add to .gitignore) - Add secrets.yaml.example for reference - Update documentation to use .env workflow - Prevents accidental commit of API keys to git history
57583bd
into
feature/openwebui-litellm-deployment
Claude Code ReviewSummaryThis PR migrates Open WebUI + LiteLLM secret management from tracked Issues by Severity🚫 Blocker Issues1. Missing The PR documentation and commit message reference: cp .env.example .envBut Location: Required content (based on kustomization.yaml secretGenerator): # Anthropic API Key (required)
ANTHROPIC_API_KEY=sk-ant-YOUR-KEY-HERE
# LiteLLM Master Key (can use default for dev)
LITELLM_MASTER_KEY=sk-litellm-dev-master-key
# Open WebUI Configuration
WEBUI_AUTH=false
OPENAI_API_BASE_URL=http://litellm-service:4000/v1
OPENAI_API_KEY=sk-litellm-dev-master-keyAction: Add 2. Inconsistent Secret Key Names in The Problem:
Current config: secretGenerator:
- name: openwebui-secrets
namespace: openwebui
envs:
- .envIssues:
All keys must be present in the same # Required for litellm-secrets
ANTHROPIC_API_KEY=sk-ant-xxx
LITELLM_MASTER_KEY=sk-litellm-dev-master-key
# Required for openwebui-secrets
OPENAI_API_KEY=sk-litellm-dev-master-keyAction: Ensure 🔴 Critical Issues3. Deprecated
# DEPRECATED: Use .env file instead (see .env.example)
# This file is kept for reference only
#
# To configure secrets:
# 1. Copy .env.example to .env
# 2. Fill in your actual API keys
# 3. Deploy with: make phase1-deployProblem: References Action: Update comment after adding 4. Documentation References Non-Existent vteam.local Domain Multiple files were updated to change Changed files:
Issue: This is scope creep - the PR title says "Migrate to .env-based secret management", but includes a hostname rename. According to CLAUDE.md Section "Documentation Standards":
According to Git Workflow standards:
Recommendation:
5. Missing The documentation in LITELLM_MASTER_KEY=sk-litellm-dev-master-key
WEBUI_AUTH=false
OPENAI_API_BASE_URL=http://litellm-service:4000/v1But these keys aren't referenced in the original Question: Are Action: Clarify which keys belong in secrets vs. ConfigMap/Deployment env vars. 🟡 Major Issues6. Memory Limits Increased Without Justification
requests:
memory: 1Gi # Was 512Mi
limits:
memory: 3Gi # Was 2GiIssue: This is unrelated to secret management and not mentioned in PR description. According to CLAUDE.md "Doing tasks" section:
Action: Either:
7. Image Tags Pinned Without Explanation
images:
- name: ghcr.io/berriai/litellm
newTag: v1.80.10.rc.5 # Was main-latest
- name: ghcr.io/open-webui/open-webui
newTag: v0.6.41 # Was mainIssue: Tag pinning is a breaking change and unrelated to secret management. Consequences:
Action: Either:
🔵 Minor Issues8. Gitignore Pattern May Be Too Broad
# Secrets manifests (use secretGenerator with .env instead)
overlays/*/secrets.yamlPattern: Potential Issue: This ignores Recommendation: Consider more specific pattern: overlays/phase1-kind/secrets.yaml
# Or document that secrets.yaml is NEVER tracked9. Makefile Help Text Still References Old Secrets File
@echo " 2. API key configured (edit: overlays/phase1-kind/secrets.yaml)"Issue: References Should be: @echo " 2. API key configured (edit: overlays/phase1-kind/.env)"10. No Validation for .env File Existence The phase1-deploy:
kubectl kustomize overlays/phase1-kind | kubectl apply -f -Risk: If user forgets to create Recommendation: Add validation: phase1-deploy:
@if [ \! -f overlays/phase1-kind/.env ]; then \
echo "❌ Error: overlays/phase1-kind/.env not found"; \
echo "Run: cp overlays/phase1-kind/.env.example overlays/phase1-kind/.env"; \
exit 1; \
fi
kubectl kustomize overlays/phase1-kind | kubectl apply -f -Positive Highlights✅ Security improvement - API keys no longer tracked in git RecommendationsPrioritized Action ItemsBefore Merge (Blockers):
After Addressing Blockers: Nice-to-Have: Overall AssessmentConcept: ✅ Excellent - Security-focused, follows platform standards Recommendation: Request Changes - Address blocker issues before merge. 🤖 Generated with Claude Code 🔍 View AI decision process (logs available for 90 days) 📋 View memory system files loaded (click to expand)What Amber Loaded for Code ReviewAmber automatically loaded these repository standards from the memory system:
Impact: This review used your repository's specific code quality standards, security patterns, and best practices from the memory system (PRs ambient-code#359, ambient-code#360) - not just generic code review guidelines. |
Summary
secrets.yamlto gitignored.envfile for API key storagesecretGeneratorto create K8s secrets from.envChanges
Configuration
secrets.yamlfrom resources, addsecretGeneratorconfigoverlays/*/secrets.yamlpatternDocumentation
Benefits
Security:
.envgitignored)Usability:
cp .env.example .env→ edit → deployTest Plan
.envfile from templatemake phase1-deploy(successful)litellm-secrets-kbbf2mgmg5.envis gitignored (git statusclean)Migration Guide
For existing deployments:
🤖 Generated with Claude Code