kubectl-trace
kubectl-trace copied to clipboard
refactor: only define usr-host volume if to be mounted by a container
This PR makes a usr-host Volume be conditionally added, side by side with the conditionally added VolumeMount entry referencing it.
I think the current behavior of declaring a volume that isn't mounted will be fully functional, and this fix just makes it easier to understand the workload by not including an unused volume.
It makes sense @consideRatio this was a mistake in the first instance, thanks for fixing it!
I rebased this PR on the current master branch. I think that should resolve the test failures previously observed where ubuntu-16.04 still was used.
Thank you @consideRatio !