115 lines
3.5 KiB
YAML
115 lines
3.5 KiB
YAML
apiVersion: apps/v1
|
|||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: poimen-frontend
|
||
|
|
namespace: poimen
|
||
|
|
labels:
|
||
|
|
app: poimen-frontend
|
||
|
|
app.kubernetes.io/name: poimen-frontend
|
||
|
|
app.kubernetes.io/component: frontend
|
||
|
|
app.kubernetes.io/part-of: poimen
|
||
|
|
annotations:
|
||
|
|
argocd.argoproj.io/sync-wave: "0"
|
||
|
|
reloader.stakater.com/auto: "true"
|
||
|
|
spec:
|
||
|
|
replicas: 2
|
||
|
|
strategy:
|
||
|
|
type: RollingUpdate
|
||
|
|
rollingUpdate:
|
||
|
|
maxSurge: 1
|
||
|
|
maxUnavailable: 0
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
app: poimen-frontend
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app: poimen-frontend
|
||
|
|
app.kubernetes.io/name: poimen-frontend
|
||
|
|
# Admitted by llm-serving-default-deny NetworkPolicy (port 8080).
|
||
|
|
# Required for server-side LLM calls through api-gw.
|
||
|
|
llm-client: "true"
|
||
|
|
spec:
|
||
|
|
imagePullSecrets:
|
||
|
|
- name: forgejo-registry
|
||
|
|
securityContext:
|
||
|
|
runAsNonRoot: true
|
||
|
|
runAsUser: 1001
|
||
|
|
fsGroup: 1001
|
||
|
|
containers:
|
||
|
|
- name: frontend
|
||
|
|
image: forgejo.riotpiao.com/riotpiao-poimen/poimen-frontend:latest
|
||
|
|
imagePullPolicy: Always
|
||
|
|
ports:
|
||
|
|
- name: http
|
||
|
|
containerPort: 3000
|
||
|
|
protocol: TCP
|
||
|
|
env:
|
||
|
|
# In-cluster api-gw (server-side only — never exposed to browser)
|
||
|
|
- name: LLM_API_URL
|
||
|
|
value: "http://api-gateway.api.svc.cluster.local:8080"
|
||
|
|
# Memory service (co-located in poimen namespace)
|
||
|
|
- name: POIMEN_MEMORY_URL
|
||
|
|
valueFrom:
|
||
|
|
configMapKeyRef:
|
||
|
|
name: poimen-config
|
||
|
|
key: POIMEN_MEMORY_URL
|
||
|
|
# OIDC — uses same client as existing poimen services
|
||
|
|
- name: LLM_OIDC_TOKEN_URL
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: poimen-secrets
|
||
|
|
key: OIDC_TOKEN_URL
|
||
|
|
- name: LLM_OIDC_CLIENT_ID
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: poimen-oauth2-creds
|
||
|
|
key: client_id
|
||
|
|
- name: LLM_OIDC_CLIENT_SECRET
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: poimen-oauth2-creds
|
||
|
|
key: client_secret
|
||
|
|
- name: LLM_OIDC_SCOPE
|
||
|
|
value: "openid llm_inference"
|
||
|
|
# NextAuth
|
||
|
|
- name: NEXTAUTH_URL
|
||
|
|
value: "https://poimen.riotpiao.com"
|
||
|
|
- name: NEXTAUTH_SECRET
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: poimen-secrets
|
||
|
|
key: NEXTAUTH_SECRET
|
||
|
|
# Gotify (server-side notifications + HITL messages)
|
||
|
|
- name: GOTIFY_URL
|
||
|
|
value: "http://gotify.notifications.svc.cluster.local"
|
||
|
|
- name: GOTIFY_TOKEN
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: poimen-secrets
|
||
|
|
key: GOTIFY_TOKEN
|
||
|
|
# Public env — embedded in browser bundle at build time
|
||
|
|
- name: NEXT_PUBLIC_API_URL
|
||
|
|
value: "https://api.riotpiao.com"
|
||
|
|
resources:
|
||
|
|
requests:
|
||
|
|
cpu: 100m
|
||
|
|
memory: 256Mi
|
||
|
|
limits:
|
||
|
|
cpu: 1000m
|
||
|
|
memory: 512Mi
|
||
|
|
readinessProbe:
|
||
|
|
httpGet:
|
||
|
|
path: /
|
||
|
|
port: http
|
||
|
|
initialDelaySeconds: 10
|
||
|
|
periodSeconds: 10
|
||
|
|
failureThreshold: 3
|
||
|
|
livenessProbe:
|
||
|
|
httpGet:
|
||
|
|
path: /
|
||
|
|
port: http
|
||
|
|
initialDelaySeconds: 30
|
||
|
|
periodSeconds: 30
|
||
|
|
failureThreshold: 3
|