I have the following docker run command:
docker run -dit
--privileged
-v $PWD/etc/ipsec.conf:/etc/ipsec.conf:ro
-v $PWD/etc/ipsec.secrets:/etc/ipsec.secrets:ro
-v $PWD/etc/ipsec.d:/etc/ipsec.d:ro
-v $PWD/etc/ipsec.d/certs:/etc/ipsec.d/certs:ro
-v $PWD/etc/strongswan.conf:/etc/strongswan.conf:ro
-v $PWD/etc/strongswan.d/charon-logging.conf:/etc/strongswan.d/charon-logging.conf:ro
-v $PWD/etc/strongswan.d/charon/forecast.conf:/etc/strongswan.d/charon/forecast.conf:ro
-v $PWD/etc/strongswan.d/charon/eap-radius.conf:/etc/strongswan.d/charon/eap-radius.conf:ro
-v $PWD/etc/vpn-certs:/etc/vpn-certs:ro
-v $PWD/etc/smcroute/startup.sh:/etc/smcroute/startup.sh:ro
--name strongswanC$i strongswan-compile
I am mounting a combination of files and folders stored on the host into specific locations inside the container.
I would like to convert this to a Kuberbetes yaml file, but I am stuck on the -v options. All of the mounts can be read only.
How would I do these mounts in the a K8s yaml file. Would HostPath be appropriate?