forked from xiaohei/taiji-AI-PAD
105 lines
2.4 KiB
YAML
105 lines
2.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: litellm-gateway
|
|
namespace: taiji-ai
|
|
labels:
|
|
app: litellm-gateway
|
|
component: gateway
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: litellm-gateway
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: litellm-gateway
|
|
component: gateway
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: acr-secret
|
|
containers:
|
|
- name: litellm-gateway
|
|
image: taiji.azurecr.io/taiji-litellm-gateway:latest
|
|
ports:
|
|
- containerPort: 4000
|
|
name: http
|
|
env:
|
|
- name: LITELLM_MASTER_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: taiji-secrets
|
|
key: LITELLM_MASTER_KEY
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: taiji-secrets
|
|
key: DATABASE_URL
|
|
- name: REDIS_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: taiji-secrets
|
|
key: REDIS_URL
|
|
- name: OPENROUTER_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: taiji-secrets
|
|
key: OPENROUTER_API_KEY
|
|
- name: OPENROUTER_BASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: taiji-secrets
|
|
key: OPENROUTER_BASE_URL
|
|
resources:
|
|
requests:
|
|
memory: "512Mi"
|
|
cpu: "200m"
|
|
limits:
|
|
memory: "1Gi"
|
|
cpu: "1000m"
|
|
volumeMounts:
|
|
- name: logs
|
|
mountPath: /app/logs
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 4000
|
|
httpHeaders:
|
|
- name: Authorization
|
|
value: "Bearer sk-taiji-master-key"
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 30
|
|
timeoutSeconds: 25
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 4000
|
|
httpHeaders:
|
|
- name: Authorization
|
|
value: "Bearer sk-taiji-master-key"
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
timeoutSeconds: 25
|
|
volumes:
|
|
- name: logs
|
|
emptyDir: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: litellm-gateway-service
|
|
namespace: taiji-ai
|
|
labels:
|
|
app: litellm-gateway
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 4000
|
|
targetPort: 4000
|
|
protocol: TCP
|
|
name: http
|
|
selector:
|
|
app: litellm-gateway
|
|
|