Ensure that host volumes are only on the required nodes
This commit is contained in:
@@ -47,14 +47,12 @@
|
||||
client = {
|
||||
enabled = true;
|
||||
host_volume = {
|
||||
traefik = {
|
||||
path = "/opt/traefik";
|
||||
read_only = false;
|
||||
};
|
||||
postgres = {
|
||||
path = "/opt/postgres";
|
||||
%{ for volume in host_volumes ~}
|
||||
${volume} = {
|
||||
path = "/opt/${volume}";
|
||||
read_only = false;
|
||||
};
|
||||
%{ endfor ~}
|
||||
};
|
||||
cni_path = "$${pkgs.cni-plugins}/bin";
|
||||
};
|
||||
@@ -93,10 +91,10 @@
|
||||
systemd.tmpfiles.rules = [
|
||||
# Fix issue where nomad needs alloc_mounts to be writable
|
||||
"d /var/lib/alloc_mounts 0755 root root -"
|
||||
# Create a directory for Traefik to store its data (tls certs, etc.)
|
||||
"d /opt/traefik 0755 root root -"
|
||||
# Create a directory for Postgres to store its data
|
||||
"d /opt/postgres 0755 root root -"
|
||||
%{ for volume in host_volumes ~}
|
||||
# Create a directory for ${volume} to store its data
|
||||
"d /opt/${volume} 0755 root root -"
|
||||
%{ endfor ~}
|
||||
];
|
||||
|
||||
# Open ports in the firewall. 80/443 are for HTTP/HTTPS (terraform), 464X are the default ports for Nomad, 830X are the default ports for Consul.
|
||||
|
||||
Reference in New Issue
Block a user