adding newsbot to customer1 apps

This commit is contained in:
sirius0xdev 2026-01-13 04:27:16 +00:00
parent 982969b243
commit ab69a2d41f
3 changed files with 64 additions and 3 deletions

View file

@ -0,0 +1,45 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: news-analyst
spec:
schedule: "15 * * * *"
jobTemplate:
spec:
template:
spec:
volumes:
- name: ollama-storage
emptyDir: {}
initContainers:
- name: model-puller
image: ollama/ollama:latest
volumeMounts:
- name: ollama-storage
mountPath: /root/.ollama
command: ["/bin/sh", "-c"]
args: ["ollama serve & sleep 5 && ollama pull gemma2"]
containers:
- name: analyst
image: siriussec/summarizer:latest
envFrom:
- configMapRef:
name: news-app-config
env:
valueFrom:
secretKeyRef:
name: db-secrets
key: password
- name: ollama-sidecar
image: ollama/ollama:latest
ports:
- containerPort: 11434
volumeMounts:
- name: ollama-storage
mountPath: /root/.ollama
resources:
limits:
nvidia.com/gpu: 1

View file

@ -0,0 +1,19 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: news-app-config
namespace: default
data:
DB_HOST: "customer1-pgdb-rw"
DB_NAME: "news_app_db"
DB_USER: "news_app"
DB_PORT: "5432"
LLM_URL: "http://localhost:11434/api/generate" # Used for sidecar setup
MODEL_NAME: "gemma2"
SUMMARY_PROMPT: |
You are a professional news editor. Combine these findings into
a Telegram-friendly update with emojis and bold headers. Translate everything to english
and give the update in english as well.
DATA TO SUMMARIZE:
{data}

View file

@ -1,6 +1,3 @@
[tools] [tools]
cilium-cli = "latest"
gcloud = "latest" gcloud = "latest"
k9s = "latest" k9s = "latest"
sops = "latest"
terraform = "latest"