Merge branch 'master' into fix/hermes-webui-container-init-error
This commit is contained in:
commit
2f09278164
2 changed files with 40 additions and 8 deletions
|
|
@ -15,9 +15,42 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
runAsGroup: 1000
|
|
||||||
runAsNonRoot: true
|
initContainers:
|
||||||
|
- name: create-webui-user
|
||||||
|
image: busybox:1.36
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
set -e
|
||||||
|
echo "Creating users/groups for hermes-webui..."
|
||||||
|
|
||||||
|
# Root
|
||||||
|
echo "root:x:0:0:root:/root:/bin/sh" >> /etc/passwd
|
||||||
|
echo "root:x:0:" >> /etc/group
|
||||||
|
|
||||||
|
# Target user
|
||||||
|
echo "hermeswebui:x:1000:1000::/home/hermeswebui:/bin/sh" >> /etc/passwd
|
||||||
|
echo "hermeswebui:x:1000:" >> /etc/group
|
||||||
|
|
||||||
|
# Internal sudo-enabled user the image expects
|
||||||
|
echo "hermeswebuitoo:x:1025:1025::/home/hermeswebuitoo:/bin/sh" >> /etc/passwd
|
||||||
|
echo "hermeswebuitoo:x:1025:" >> /etc/group
|
||||||
|
|
||||||
|
# Sudoers
|
||||||
|
mkdir -p /etc/sudoers.d
|
||||||
|
echo 'hermeswebuitoo ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/hermeswebuitoo
|
||||||
|
chmod 0440 /etc/sudoers.d/hermeswebuitoo
|
||||||
|
|
||||||
|
echo "✅ Users and sudoers created"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
volumeMounts:
|
||||||
|
- name: webui-etc
|
||||||
|
mountPath: /etc
|
||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: hermes-agent
|
- name: hermes-agent
|
||||||
securityContext:
|
securityContext:
|
||||||
|
|
@ -25,6 +58,8 @@ spec:
|
||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
seccompProfile:
|
seccompProfile:
|
||||||
type: RuntimeDefault
|
type: RuntimeDefault
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
|
|
@ -153,13 +188,11 @@ spec:
|
||||||
memory: 512Mi
|
memory: 512Mi
|
||||||
cpu: "500m"
|
cpu: "500m"
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: true
|
||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
runAsNonRoot: true
|
|
||||||
runAsUser: 1000
|
|
||||||
runAsGroup: 1000
|
|
||||||
seccompProfile:
|
seccompProfile:
|
||||||
type: RuntimeDefault
|
type: RuntimeDefault
|
||||||
volumes:
|
volumes:
|
||||||
|
|
@ -169,7 +202,6 @@ spec:
|
||||||
- name: hermes-data
|
- name: hermes-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: hermes-agent-pvc
|
claimName: hermes-agent-pvc
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- ../base/vllm-servers/
|
# - ../base/vllm-servers/
|
||||||
# - ../base/keda-gpu-scaling/
|
# - ../base/keda-gpu-scaling/
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue