gardener / ops-toolbelt

Useful tools and operations guide for gardener landscapes
Apache License 2.0
15 stars 26 forks source link

Add flag whether to chroot to host root dir #4

Closed plkokanov closed 5 years ago

plkokanov commented 5 years ago

What this PR does / why we need it: Currently, when starting an ops-pod on a node the root directory of the pod is changed to that of the node via chroot. On some nodes (eg. GKE) the root file system is read only so the above can lead to problems.

This pr adds a flag --chroot which controls this behaviour. By default the node's root directory will be mounted under /host on the pod. If --chroot is selected then the pod's root directory will be changed to that of the host

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Release note:

Add `-c|--chroot` flag to ops-pod script. When the flag is set the pod's root directory will be changed to that of the host node.