Files
elixirAI/kubernetes/statefulset.yml
Alex Mickelson d01ae816d2
Some checks failed
CI/CD Pipeline / build (push) Failing after 3s
fewer statefulset
2026-03-10 09:23:22 -06:00

75 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: ai-ha-elixir
namespace: ai-ha-elixir
spec:
serviceName: ai-ha-elixir-headless
replicas: 2
podManagementPolicy: Parallel
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
selector:
matchLabels:
app: ai-ha-elixir
template:
metadata:
labels:
app: ai-ha-elixir
spec:
containers:
- name: ai-ha-elixir
image: alexmickelson/$IMAGE_NAME:$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: 2
periodSeconds: 1
failureThreshold: 2
livenessProbe:
httpGet:
path: /health
port: 4000
initialDelaySeconds: 5
periodSeconds: 3
failureThreshold: 2
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"