77 lines
2.1 KiB
YAML
77 lines
2.1 KiB
YAML
# services/bstein-dev-home/chat-ai-gateway-deployment.yaml
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: chat-ai-gateway
|
|
namespace: bstein-dev-home
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: 2
|
|
selector:
|
|
matchLabels:
|
|
app: chat-ai-gateway
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: chat-ai-gateway
|
|
spec:
|
|
serviceAccountName: bstein-dev-home
|
|
nodeSelector:
|
|
kubernetes.io/arch: arm64
|
|
node-role.kubernetes.io/worker: "true"
|
|
containers:
|
|
- name: gateway
|
|
image: python:3.11-slim
|
|
command: ["/bin/sh","-c"]
|
|
args:
|
|
- . /vault/scripts/bstein_dev_home_vault_env.sh && exec python /app/gateway.py
|
|
env:
|
|
- name: UPSTREAM_URL
|
|
value: http://bstein-dev-home-backend/api/chat
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: http
|
|
initialDelaySeconds: 2
|
|
periodSeconds: 5
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
resources:
|
|
requests:
|
|
cpu: 20m
|
|
memory: 64Mi
|
|
limits:
|
|
cpu: 200m
|
|
memory: 256Mi
|
|
volumeMounts:
|
|
- name: code
|
|
mountPath: /app/gateway.py
|
|
subPath: gateway.py
|
|
- name: vault-secrets
|
|
mountPath: /vault/secrets
|
|
readOnly: true
|
|
- name: vault-scripts
|
|
mountPath: /vault/scripts
|
|
readOnly: true
|
|
volumes:
|
|
- name: code
|
|
configMap:
|
|
name: chat-ai-gateway
|
|
- name: vault-secrets
|
|
csi:
|
|
driver: secrets-store.csi.k8s.io
|
|
readOnly: true
|
|
volumeAttributes:
|
|
secretProviderClass: bstein-dev-home-vault
|
|
- name: vault-scripts
|
|
configMap:
|
|
name: bstein-dev-home-vault-env
|
|
defaultMode: 0555
|