fix webui
This commit is contained in:
parent
d87f5963d3
commit
bdcaf9f8f6
1 changed files with 21 additions and 1 deletions
|
|
@ -18,19 +18,39 @@ spec:
|
|||
|
||||
initContainers:
|
||||
- name: create-webui-user
|
||||
image: busybox
|
||||
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:
|
||||
- name: hermes-agent
|
||||
securityContext:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue