Files
homelab/cluster/applications/jarvis/deployment.yaml

119 lines
2.9 KiB
YAML

# ------------------------------------------------------------------------------
# Hermes Agent (jarvis) — Deployment + Service + PVC
#
# Bootstrap procedure (run once before first deploy):
# 1. Create namespace and PVC, run hermes setup wizard on scrim
# 2. kubectl cp config.yaml into jarvis-data PVC via busybox init pod
# 3. Push manifests — ArgoCD deploys against pre-populated PVC
# ------------------------------------------------------------------------------
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jarvis-data
namespace: jarvis
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: jarvis
namespace: jarvis
labels:
app: jarvis
spec:
replicas: 1
selector:
matchLabels:
app: jarvis
template:
metadata:
labels:
app: jarvis
spec:
securityContext:
seccompProfile:
type: RuntimeDefault
initContainers:
- name: fix-ownership
image: busybox
command: ["sh", "-c", "chown -R 10000:10000 /opt/data"]
securityContext:
runAsNonRoot: false
runAsUser: 0
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
add: ["CHOWN"]
volumeMounts:
- name: data
mountPath: /opt/data
containers:
- name: hermes
image: nousresearch/hermes-agent:latest
args: ["gateway", "run"]
ports:
- containerPort: 8642
name: gateway
securityContext:
runAsNonRoot: true
runAsUser: 10000
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
env:
- name: HERMES_DASHBOARD
value: "1"
- name: API_SERVER_ENABLED
value: "true"
- name: API_SERVER_HOST
value: "0.0.0.0"
- name: API_SERVER_CORS_ORIGINS
value: "*"
volumeMounts:
- name: data
mountPath: /opt/data
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
livenessProbe:
httpGet:
path: /health
port: 8642
initialDelaySeconds: 30
periodSeconds: 30
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: 8642
initialDelaySeconds: 15
periodSeconds: 10
volumes:
- name: data
persistentVolumeClaim:
claimName: jarvis-data
---
apiVersion: v1
kind: Service
metadata:
name: jarvis
namespace: jarvis
labels:
app: jarvis
spec:
selector:
app: jarvis
ports:
- name: gateway
port: 8642
targetPort: 8642