towerops/k8s/towerops-llm-secret.example.yaml
Graham McIntire 03f364a956 feat(insights): LLM-powered insight enrichment
Adds an optional plain-language summary and recommended action to every
active insight. A new Oban cron worker runs every 5 minutes, picks up
unenriched insights, and asks the configured LLM to restate the finding
and suggest one specific action grounded in the structured metadata.

- Migration: adds llm_summary, recommended_action, llm_model,
  llm_enriched_at columns to preseem_insights
- Towerops.LLM context with swappable behaviour; real client uses Req
  with the standard Req.Test plug for test isolation
- MockClient + InsightPrompt module (builds chat messages, parses JSON
  with code-fence stripping and a raw-text fallback)
- Worker logs and skips on rate limits / missing key / parse errors so
  insights still render without an AI summary when the LLM is unavailable
- Optional towerops-llm k8s secret with example template; deployment.yaml
  references it as optional in both init and main containers
- UI renders summary + recommended action callout on /insights and on
  the org-level insights page
2026-05-09 16:41:48 -05:00

27 lines
997 B
YAML

# Template for the towerops-llm secret. Apply with values filled in:
#
# kubectl create secret generic towerops-llm \
# --from-literal=DEEPSEEK_API_KEY="<your-deepseek-key>" \
# --from-literal=DEEPSEEK_MODEL="deepseek-v4-pro" \
# -n towerops
#
# Or apply this file directly after replacing the placeholder strings with
# your real values, then run: kubectl apply -f k8s/towerops-llm-secret.example.yaml
#
# This file is committed as a placeholder — DO NOT put real keys in here.
# Real values live in 1Password and are created in the cluster manually.
#
# The deployment references this secret with `optional: true`, so the app
# will start fine without it (LLM enrichment just stays no-op).
---
apiVersion: v1
kind: Secret
metadata:
name: towerops-llm
namespace: towerops
type: Opaque
stringData:
# DeepSeek API key — get one at https://platform.deepseek.com/
DEEPSEEK_API_KEY: ""
# Optional: override the default model (default: deepseek-v4-pro)
DEEPSEEK_MODEL: ""