agentic-os/gmail-agent/k8s/deployment.yaml

82 lines
2.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: gmail-agent
namespace: ai-agents
labels:
app: gmail-agent
spec:
replicas: 1
selector:
matchLabels:
app: gmail-agent
template:
metadata:
labels:
app: gmail-agent
spec:
initContainers:
- name: git-clone
image: alpine/git
command:
- git
- clone
- http://192.168.8.248:3000/deepkoluguri/agentic-os.git
- /app
volumeMounts:
- name: app-volume
mountPath: /app
containers:
- name: gmail-agent
image: node:18-alpine
workingDir: /app/gmail-agent
command:
- sh
- -c
- npm install --omit=dev && node index.js
env:
- name: OLLAMA_URL
value: http://ollama.ai-agents.svc.cluster.local:11434/api/generate
- name: WHATSAPP_GATEWAY_URL
value: http://whatsapp-gateway.ai-agents.svc.cluster.local:5001/api/send-message
- name: WHATSAPP_TO
valueFrom:
configMapKeyRef:
name: whatsapp-config
key: personal-number
- name: OLLAMA_MODEL
value: "qwen2.5:0.5b"
volumeMounts:
- name: app-volume
mountPath: /app
- name: credentials-volume
mountPath: /app/gmail-agent/credentials.json
subPath: credentials.json
readOnly: true
- name: token-volume
mountPath: /app/gmail-agent/token.json
subPath: token.json
readOnly: true
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
volumes:
- name: app-volume
emptyDir: {}
- name: credentials-volume
secret:
secretName: gmail-agent-auth
items:
- key: credentials.json
path: credentials.json
- name: token-volume
secret:
secretName: gmail-agent-auth
items:
- key: token.json
path: token.json