titan-iac/services/comms/atlasbot-deployment.yaml

88 lines
2.4 KiB
YAML

# services/comms/atlasbot-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: atlasbot
namespace: comms
labels:
app: atlasbot
spec:
replicas: 1
selector:
matchLabels:
app: atlasbot
template:
metadata:
labels:
app: atlasbot
annotations:
checksum/atlasbot-configmap: manual-atlasbot-4
spec:
serviceAccountName: atlasbot
nodeSelector:
hardware: rpi5
containers:
- name: atlasbot
image: python:3.11-slim
command: ["/bin/sh","-c"]
args:
- |
python /app/bot.py
env:
- name: MATRIX_BASE
value: http://othrys-synapse-matrix-synapse:8008
- name: AUTH_BASE
value: http://matrix-authentication-service:8080
- name: KB_DIR
value: /kb
- name: VM_URL
value: http://victoria-metrics-single-server.monitoring.svc.cluster.local:8428
- name: BOT_USER
value: atlasbot
- name: BOT_PASS
valueFrom:
secretKeyRef:
name: atlasbot-credentials-runtime
key: bot-password
- name: CHAT_API_KEY
valueFrom:
secretKeyRef:
name: chat-ai-keys-runtime
key: matrix
- name: OLLAMA_URL
value: https://chat.ai.bstein.dev/
- name: OLLAMA_MODEL
value: qwen2.5-coder:7b-instruct-q4_0
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
volumeMounts:
- name: code
mountPath: /app/bot.py
subPath: bot.py
- name: kb
mountPath: /kb
readOnly: true
volumes:
- name: code
configMap:
name: atlasbot
- name: kb
configMap:
name: atlas-kb
items:
- key: INDEX.md
path: INDEX.md
- key: atlas.json
path: catalog/atlas.json
- key: atlas-summary.json
path: catalog/atlas-summary.json
- key: runbooks.json
path: catalog/runbooks.json
- key: atlas-http.mmd
path: diagrams/atlas-http.mmd