Files
lpt-infra/prod/deployment-lpt-ai.yaml

87 lines
2.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: lpt-ai
namespace: lpt-prod
labels:
app: lpt-ai
spec:
replicas: 1
selector:
matchLabels:
app: lpt-ai
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
template:
metadata:
labels:
app: lpt-ai
spec:
imagePullSecrets:
- name: regcred
containers:
- name: lpt-ai
image: 192.168.123.199:5000/lpt-ai:prod
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5199
env:
- name: PORT
valueFrom:
configMapKeyRef:
name: lpt-config
key: PORT
- name: LLM_API_URL
valueFrom:
configMapKeyRef:
name: lpt-config
key: LLM_API_URL
- name: LLM_MODEL
valueFrom:
configMapKeyRef:
name: lpt-config
key: LLM_MODEL
- name: LLM_TIMEOUT_MS
valueFrom:
configMapKeyRef:
name: lpt-config
key: LLM_TIMEOUT_MS
- name: LLM_API_KEY
valueFrom:
secretKeyRef:
name: lpt-secrets
key: llm-api-key
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
livenessProbe:
httpGet:
path: /health
port: 5199
initialDelaySeconds: 10
periodSeconds: 15
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: 5199
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
volumeMounts:
- name: lpt-logs
mountPath: /app/data
volumes:
- name: lpt-logs
persistentVolumeClaim:
claimName: lpt-logs