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
I am looking to run salt-master on a kubernetes cluster with a single persistent volume mounted in /home/salt/data to persist all the relevant salt-master config.
However the image expects separate volumes to be explicitly defined for logs and keys in the Dockerfile:
VOLUME [ "${SALT_KEYS_DIR}", "${SALT_LOGS_DIR}" ]
This causes these volumes to always be mounted - in my case since I am not specifying these volumes it remounts the local disk at these directories over the top of my mount:
# mount |grep salt
10.0.0.1:/volumes/salt-config on /home/salt/data type nfs (rw,relatime)
/dev/sda6 on /home/salt/data/keys type xfs (rw,noatime,attr2,inode64,logbufs=8,logbsize=32k,noquota)
/dev/sda6 on /home/salt/data/logs type xfs (rw,noatime,attr2,inode64,logbufs=8,logbsize=32k,noquota)
The fix for this is to omit the VOLUMES line in Dockerfile - this still allows volumes to be specified with docker on the command-line (e.g. --volume $(pwd)/keys/:/home/salt/data/keys/), but if not set then the container will just use /home/salt/data/keys 'as-is' - either the local disk, or whatever is mounted there. (Which is effectively identical to the current behaviour).
Would this be something you would consider changing?
The text was updated successfully, but these errors were encountered:
I initially set those directories as volumes in the Dockerfile as a safeguard, ensuring that users wouldn’t lose keys or logs if they forgot to mount the corresponding volumes.
That said, I’m open to removing them from the Dockerfile and updating the documentation examples to include the logs volume as well.
I am looking to run salt-master on a kubernetes cluster with a single persistent volume mounted in /home/salt/data to persist all the relevant salt-master config.
I have set this up as follows:
However the image expects separate volumes to be explicitly defined for
logs
andkeys
in theDockerfile
:VOLUME [ "${SALT_KEYS_DIR}", "${SALT_LOGS_DIR}" ]
This causes these volumes to always be mounted - in my case since I am not specifying these volumes it remounts the local disk at these directories over the top of my mount:
The fix for this is to omit the
VOLUMES
line inDockerfile
- this still allows volumes to be specified with docker on the command-line (e.g.--volume $(pwd)/keys/:/home/salt/data/keys/
), but if not set then the container will just use /home/salt/data/keys 'as-is' - either the local disk, or whatever is mounted there. (Which is effectively identical to the current behaviour).Would this be something you would consider changing?
The text was updated successfully, but these errors were encountered: