fix(jarvis): run as root for NFS compat, add namespace PSA baseline label
This commit is contained in:
@@ -35,23 +35,13 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: jarvis
|
app: jarvis
|
||||||
spec:
|
spec:
|
||||||
|
# Running as root to work around NFS root_squash preventing UID 10000
|
||||||
|
# from writing to the PVC. Hermes supports root execution.
|
||||||
|
# PSA namespace must be set to baseline or privileged for this to work.
|
||||||
securityContext:
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
seccompProfile:
|
seccompProfile:
|
||||||
type: RuntimeDefault
|
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:
|
containers:
|
||||||
- name: hermes
|
- name: hermes
|
||||||
image: nousresearch/hermes-agent:latest
|
image: nousresearch/hermes-agent:latest
|
||||||
@@ -60,8 +50,7 @@ spec:
|
|||||||
- containerPort: 8642
|
- containerPort: 8642
|
||||||
name: gateway
|
name: gateway
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsNonRoot: true
|
runAsUser: 0
|
||||||
runAsUser: 10000
|
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
capabilities:
|
capabilities:
|
||||||
drop: ["ALL"]
|
drop: ["ALL"]
|
||||||
@@ -74,6 +63,10 @@ spec:
|
|||||||
value: "0.0.0.0"
|
value: "0.0.0.0"
|
||||||
- name: API_SERVER_CORS_ORIGINS
|
- name: API_SERVER_CORS_ORIGINS
|
||||||
value: "*"
|
value: "*"
|
||||||
|
- name: HERMES_UID
|
||||||
|
value: "0"
|
||||||
|
- name: HERMES_GID
|
||||||
|
value: "0"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /opt/data
|
mountPath: /opt/data
|
||||||
|
|||||||
9
cluster/applications/jarvis/namespace.yaml
Normal file
9
cluster/applications/jarvis/namespace.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: jarvis
|
||||||
|
labels:
|
||||||
|
# baseline PSA required — Hermes runs as root due to NFS root_squash
|
||||||
|
# preventing UID 10000 from writing to nfs-emporium PVC.
|
||||||
|
pod-security.kubernetes.io/enforce: baseline
|
||||||
|
pod-security.kubernetes.io/warn: baseline
|
||||||
Reference in New Issue
Block a user