Update deployment.yaml
This commit is contained in:
parent
b248bca531
commit
84305d3605
1 changed files with 2 additions and 33 deletions
|
|
@ -16,41 +16,10 @@ spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
|
|
||||||
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:
|
securityContext:
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
runAsGroup: 0
|
runAsGroup: 0
|
||||||
volumeMounts:
|
|
||||||
- name: webui-etc
|
|
||||||
mountPath: /etc
|
|
||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: hermes-agent
|
- name: hermes-agent
|
||||||
securityContext:
|
securityContext:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue