homelab/manifests/home-services/ai-gateway.yaml
Nik Afiq 7a8c73d78a
Some checks failed
validate / lint (push) Has been cancelled
fix: update fleet IPs after subnet migration to 10.10.40.0/24
minisforum, debian, mac-mini, and gpu-node all moved from
192.168.7.0/24 to 10.10.40.0/24. Updates K3s server/agent config and
node IPs (including gpu-node's host_vars override), NFS export
allow-list and exports template, Pi-hole DNS records and
kube-vip/loadBalancerIP pins, WireGuard's pushed DNS/AllowedIPs, and
the NFS server IP baked into Jellyfin/Kavita/gitea-backup PVs and the
Ollama URL used by ai-gateway/Dashy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-23 05:52:41 +09:00

90 lines
2.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: ai-gateway
namespace: home-services
labels:
app: ai-gateway
spec:
replicas: 1
selector:
matchLabels:
app: ai-gateway
template:
metadata:
labels:
app: ai-gateway
spec:
imagePullSecrets:
- name: gitea-registry-secret
containers:
- name: ai-gateway
image: gitea.nik4nao.com/nik/ai-gateway:latest
ports:
- containerPort: 50052
name: grpc
env:
- name: GRPC_PORT
value: "50052"
- name: OLLAMA_URL
value: "http://10.10.40.30:11434"
- name: OLLAMA_MODEL
value: "llama3"
- name: OLLAMA_TIMEOUT
value: "120s"
- name: HA_GATEWAY_ADDR
value: "ha-gateway.home-services.svc.cluster.local:50051"
- name: HA_GATEWAY_SERVER_NAME
value: "ha-gateway.home-services.svc.cluster.local"
- name: OTEL_ENDPOINT
value: "otel-collector-opentelemetry-collector.monitoring.svc.cluster.local:4317"
- name: LOG_LEVEL
value: "info"
- name: LOG_FORMAT
value: "json"
- name: LIGHT_CACHE_TTL
value: "60s"
- name: TLS_DIR
value: /tls
readinessProbe:
tcpSocket:
port: 50052
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 50052
initialDelaySeconds: 10
periodSeconds: 30
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
volumeMounts:
- name: tls
mountPath: /tls
readOnly: true
volumes:
- name: tls
secret:
secretName: ai-gateway-tls
---
apiVersion: v1
kind: Service
metadata:
name: ai-gateway
namespace: home-services
labels:
app: ai-gateway
spec:
selector:
app: ai-gateway
ports:
- name: grpc
port: 50052
targetPort: 50052
type: ClusterIP