shell-operator
shell-operator copied to clipboard
Support running as a sidecar with 'shareProcessNamespace: true'
Expected behavior (what you expected to happen):
Tini is a fit-for-all cases solution.
Actual behavior (what actually happened):
[WARN tini (8)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Steps to reproduce:
Start shell-operator as a sidecar with shareProcessNamespace: true
Environment:
- Shell-operator version: all with tini
- Kubernetes version: v1.19
- Installation type (kubectl apply, helm chart, etc.):
Anything else we should know?:
https://github.com/krallin/tini#subreaping
By default, Tini needs to run as PID 1 so that it can reap zombies (by running as PID 1, zombies get re-parented to Tini).
If for some reason, you cannot run Tini as PID 1, you should register Tini as a process subreaper instead (only in Linux >= 3.4),
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
The container process no longer has PID 1.