Commit graph

6 commits

Author SHA1 Message Date
sync-test
c1dd9538cd feat(backup): add postgres backup CronJobs for litellm and main data namespace
Some checks failed
sync-to-github / sync (push) Failing after 5s
- pg_dump + B2 (S3-compatible) upload with retention-based pruning
- litellm backup job is suspended: the nxtgauge-ai postgres instance
  currently has a corrupt litellm database catalog file, un-suspend
  once that's fixed/reinitialized
- secrets encrypted with sops per repo convention (.sops.yaml)
- not yet wired into kustomizations; apps/postgresql is not part of
  the Flux-applied tree today (statefulset.yaml predates this and is
  also unwired) - needs a deliberate decision on how postgres is
  meant to be deployed/applied before enabling
2026-08-15 22:34:41 +05:30
sync-test
2c34d78534 fix(litellm): restore DATABASE_URL env var lost when adopting the drifted live deployment
All checks were successful
sync-to-forgejo / sync (push) Successful in 14s
kubectl apply replaced the live pod's env list wholesale with what was
in this file (which never had DATABASE_URL, despite the
litellm-db-credentials secret already existing) — litellm's proxy
requires DB connectivity to fully start regardless of config.yaml
content, so this caused an immediate crash loop. Restored it.
2026-07-21 06:40:18 +05:30
sync-test
d503a32de7 feat(ai): fix Ollama resource limits and bring LiteLLM under GitOps management
All checks were successful
sync-to-forgejo / sync (push) Successful in 10s
Phase 1 of the AI architecture doc ("Improve Generation Quality") —
qwen3:4b and qwen3:8b were already pulled onto the Ollama PVC, and
apps/litellm/base/configmap.yaml already had the correct model_list
mapping every feature alias to them instead of gemma3:270m. Neither
was actually in effect:

1. apps/litellm was never included in
   clusters/production/kustomization.yaml, so it was only ever
   deployed by a one-off manual `kubectl apply` and has been
   completely outside GitOps ever since (same root cause as the
   ai-guard registry drift found earlier). Added it to the root
   kustomization. Corrected its image reference from
   registry.nxtgauge.com/litellm:latest (doesn't appear to exist) to
   ghcr.io/berriai/litellm:latest, matching what's actually running
   live — adopting this file without that fix would have broken a
   working deployment the moment Flux started managing it.

2. apps/ollama/base/deployment.yaml's memory limit (1500Mi) was too
   small to ever load qwen3:4b (~2.5GB) or qwen3:8b (~5.2GB) — every
   model alias in the (also-never-applied) LiteLLM config was
   therefore unusable regardless of what it was named. Raised to
   4 CPU / 8Gi limit (node has 16GB total, was at ~26% memory use) and
   added OLLAMA_KEEP_ALIVE=30m so a loaded model survives the gaps
   between bursty feature requests instead of reloading from disk on
   every first call after 5+ minutes idle.
2026-07-21 06:30:13 +05:30
Ashwin Kumar Sivakumar
b4f371d415 Encrypt all secrets with SOPS, add Flux decryption support, rotate JWT_SECRET/AI_SERVICE_KEY
- Add .sops.yaml (age) and encrypt every plaintext Secret manifest in apps/
- Commit the Flux GitRepository/Kustomization (previously only applied manually)
  with a decryption stanza referencing the sops-age key (created out-of-band,
  not committed)
- Rotate JWT_SECRET (previously exposed in plaintext) and set a real
  AI_SERVICE_KEY (was an empty placeholder), shared between
  nxtgauge-backend-rust and nxtgauge-ai-assistant
- Wire JWT_SECRET into the ai-assistant deployment (was missing entirely,
  causing every authenticated request to fail)
- Redact the leaked LiteLLM production master key from README/OPENCODE_CONNECT
  docs; move the litellm prod overlay off a plaintext secretGenerator onto an
  encrypted patch
2026-07-02 17:56:28 +05:30
Ashwin Kumar Sivakumar
5bf35528c2 fix(ai): set postgres pgdata subdir 2026-06-15 07:26:55 +05:30
Ashwin Kumar Sivakumar
7902b265a9 feat(ai): add AI plans docs, LiteLLM manifests, and infrastructure updates
- Add comprehensive AI plans implementation documentation
- Add LiteLLM gateway Kubernetes manifests
- Update PostgreSQL and Forgejo deployment configs
- Add build-from-binaries script
2026-06-15 06:15:41 +05:30