adding newsbot to customer1 apps
This commit is contained in:
parent
982969b243
commit
ab69a2d41f
3 changed files with 64 additions and 3 deletions
45
apps/base/customer1/news_bot/analyst-cronjob.yaml
Normal file
45
apps/base/customer1/news_bot/analyst-cronjob.yaml
Normal 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
|
||||
19
apps/base/customer1/news_bot/configmap.yaml
Normal file
19
apps/base/customer1/news_bot/configmap.yaml
Normal 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}
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
[tools]
|
||||
cilium-cli = "latest"
|
||||
gcloud = "latest"
|
||||
k9s = "latest"
|
||||
sops = "latest"
|
||||
terraform = "latest"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue