132 lines
3.1 KiB
YAML
132 lines
3.1 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: facebook-agent
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: facebook-agent-secrets
|
|
namespace: facebook-agent
|
|
type: Opaque
|
|
stringData:
|
|
LITELLM_API_KEY: "sk-rxegkFOciNmQLhOHr3qP3A"
|
|
FACEBOOK_API_KEY: "34225c5924msh453fa7aff7a52a9p1d7adfjsn260ba0796c00"
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: facebook-agent-config
|
|
namespace: facebook-agent
|
|
data:
|
|
LITELLM_MODEL: "taiji/gpt-4o-mini"
|
|
FACEBOOK_API_HOST: "facebook-scraper3.p.rapidapi.com"
|
|
FACEBOOK_MCP_URL: "https://mcp.rapidapi.com"
|
|
MAX_RESULTS: "10"
|
|
TIMEOUT: "30"
|
|
LOG_LEVEL: "INFO"
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: facebook-agent
|
|
namespace: facebook-agent
|
|
labels:
|
|
app: facebook-agent
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: facebook-agent
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: facebook-agent
|
|
spec:
|
|
containers:
|
|
- name: agent
|
|
image: your-registry.azurecr.io/facebook-agent:latest
|
|
ports:
|
|
- containerPort: 8000
|
|
name: http
|
|
env:
|
|
- name: LITELLM_GATEWAY_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: facebook-agent-config
|
|
key: LITELLM_GATEWAY_URL
|
|
- name: LITELLM_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: facebook-agent-secrets
|
|
key: LITELLM_API_KEY
|
|
- name: LITELLM_MODEL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: facebook-agent-config
|
|
key: LITELLM_MODEL
|
|
- name: FACEBOOK_API_HOST
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: facebook-agent-config
|
|
key: FACEBOOK_API_HOST
|
|
- name: FACEBOOK_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: facebook-agent-secrets
|
|
key: FACEBOOK_API_KEY
|
|
- name: FACEBOOK_MCP_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: facebook-agent-config
|
|
key: FACEBOOK_MCP_URL
|
|
- name: MAX_RESULTS
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: facebook-agent-config
|
|
key: MAX_RESULTS
|
|
- name: TIMEOUT
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: facebook-agent-config
|
|
key: TIMEOUT
|
|
- name: LOG_LEVEL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: facebook-agent-config
|
|
key: LOG_LEVEL
|
|
resources:
|
|
requests:
|
|
memory: "256Mi"
|
|
cpu: "250m"
|
|
limits:
|
|
memory: "512Mi"
|
|
cpu: "500m"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8000
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8000
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: facebook-agent-service
|
|
namespace: facebook-agent
|
|
spec:
|
|
selector:
|
|
app: facebook-agent
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 8000
|
|
type: LoadBalancer
|
|
|