You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Can't run commands passed to server.postStart value. Im trying to run a .sh script that is inside a volume. Any command beside "ls" or "echo" will return PostStartHook failed event.
Even commands like
postStart:
- /bin/sh
- -c
- vault operator init
will produce an error.
To Reproduce
Steps to reproduce the behavior:
Download chart (v0.28.1)
Create configMap containing script in templates/ folder:
Install helm and see pod/vault-0 via kubectl describe pod/vault-0 returning PostStartHook failed
Other infos:
If the bootstrap.sh script is empty, or contains simple commands like ls, it will run without errors. File is copied correctly from volume to home folder with the execute permission.
Im able to edit and run the file if I go inside the container (with vault user).
Logs from k8s:
37s Normal Created Pod/vault-agent-injector-76cb44cfcd-gwjn7 Created container sidecar-injector
37s Normal Started Pod/vault-agent-injector-76cb44cfcd-gwjn7 Started container sidecar-injector
22s (x2 over 37s) Normal Sync Ingress/vault-global Scheduled for sync
22s (x2 over 37s) Normal Sync Ingress/vault-global Scheduled for sync
10s Normal SuccessfulAttachVolume Pod/vault-0 AttachVolume.Attach succeeded for volume "<pvc-id>"
3s (x2 over 9s) Normal Pulled Pod/vault-0 Container image "<privateImage>" already present on machine
3s (x2 over 9s) Normal Created Pod/vault-0 Created container vault
3s (x2 over 9s) Normal Started Pod/vault-0 Started container vault
3s (x2 over 9s) Warning FailedPostStartHook Pod/vault-0 PostStartHook failed
3s (x2 over 9s) Normal Killing Pod/vault-0 FailedPostStartHook
Expected behavior
postStart run any command provided.
Describe the bug
Can't run commands passed to
server.postStart
value. Im trying to run a .sh script that is inside a volume. Any command beside "ls" or "echo" will return PostStartHook failed event.Even commands like
will produce an error.
To Reproduce
Steps to reproduce the behavior:
templates/
folder:dataStorage.StorageClass
Alternatively also other commands will fail
kubectl describe pod/vault-0
returning PostStartHook failedOther infos:
If the
bootstrap.sh
script is empty, or contains simple commands likels
, it will run without errors. File is copied correctly from volume to home folder with the execute permission.Im able to edit and run the file if I go inside the container (with
vault
user).Logs from k8s:
Expected behavior
postStart run any command provided.
Environment
Chart values:
The text was updated successfully, but these errors were encountered: