diff --git a/apps/base/customer1/news_bot/analyst-cronjob.yaml b/apps/base/customer1/news_bot/analyst-cronjob.yaml new file mode 100644 index 0000000..c004014 --- /dev/null +++ b/apps/base/customer1/news_bot/analyst-cronjob.yaml @@ -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 diff --git a/apps/base/customer1/news_bot/configmap.yaml b/apps/base/customer1/news_bot/configmap.yaml new file mode 100644 index 0000000..96444c4 --- /dev/null +++ b/apps/base/customer1/news_bot/configmap.yaml @@ -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} diff --git a/mise.toml b/mise.toml index 18ba6e2..d9f9c23 100644 --- a/mise.toml +++ b/mise.toml @@ -1,6 +1,3 @@ [tools] -cilium-cli = "latest" gcloud = "latest" k9s = "latest" -sops = "latest" -terraform = "latest"