Files
elixirAI/kubernetes/statefulset.yml
Alex Mickelson 76c4098a19
All checks were successful
CI/CD Pipeline / build (push) Successful in 31s
healthckeck improvements
2026-03-09 15:20:50 -06:00

70 lines
1.8 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: ai-ha-elixir
namespace: ai-ha-elixir
spec:
serviceName: ai-ha-elixir-headless
replicas: 3
selector:
matchLabels:
app: ai-ha-elixir
template:
metadata:
labels:
app: ai-ha-elixir
spec:
containers:
- name: ai-ha-elixir
image: alexmickelson/ai-liveview:$GITHUB_RUN_NUMBER
ports:
- containerPort: 4000
name: http
- containerPort: 4369
name: epmd
- containerPort: 9000
name: beam
envFrom:
- configMapRef:
name: ai-ha-elixir-config
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELEASE_NODE
value: "elixir_ai@$(POD_IP)"
- name: RELEASE_DISTRIBUTION
value: "name"
- name: SECRET_KEY_BASE
valueFrom:
secretKeyRef:
name: ai-ha-elixir-secrets
key: SECRET_KEY_BASE
- name: AI_TOKEN
valueFrom:
secretKeyRef:
name: ai-ha-elixir-secrets
key: AI_TOKEN
readinessProbe:
httpGet:
path: /health
port: 4000
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: /health
port: 4000
initialDelaySeconds: 20
periodSeconds: 10
failureThreshold: 5
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"