agentic-os/agents/k8s/whatsapp-gateway-deployment...

65 lines
1.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: whatsapp-gateway
namespace: ai-agents
labels:
app: whatsapp-gateway
spec:
replicas: 1
selector:
matchLabels:
app: whatsapp-gateway
template:
metadata:
labels:
app: whatsapp-gateway
spec:
serviceAccountName: default
initContainers:
- name: git-clone
image: alpine/git
command:
- "sh"
- "-c"
- "git clone http://192.168.8.248:3000/deepkoluguri/agentic-os.git /workspace && cp -r /workspace/whatsapp-gateway/* /app/"
volumeMounts:
- name: app-code
mountPath: /app
containers:
- name: whatsapp-gateway
image: node:18-alpine
# Install dependencies needed by Puppeteer inside Alpine
# whatsapp-web.js requires Chromium
command:
- "sh"
- "-c"
- "apk add --no-cache chromium nss freetype harfbuzz ca-certificates ttf-freefont && cd /app && npm install && PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser node server.js"
volumeMounts:
- name: app-code
mountPath: /app
ports:
- containerPort: 5001
resources:
requests:
cpu: 300m
memory: 512Mi
limits:
cpu: "1.5"
memory: 1.5Gi
volumes:
- name: app-code
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: whatsapp-gateway
namespace: ai-agents
spec:
ports:
- port: 5001
targetPort: 5001
selector:
app: whatsapp-gateway