Make sure there is always one traefik instance up when changing the configuration so we can still access nomad via it
This commit is contained in:
@@ -31,3 +31,29 @@ resource "nomad_job" "traefik" {
|
||||
hass_magic_token = nonsensitive(data.sops_file.secrets.data["hass.magic-token"])
|
||||
})
|
||||
}
|
||||
|
||||
resource "nomad_csi_volume_registration" "unraid_appdata_traefik" {
|
||||
#Note: Before chaning the definition of this volume you need to stop the jobs that are using it
|
||||
depends_on = [data.nomad_plugin.smb]
|
||||
plugin_id = "smb"
|
||||
|
||||
volume_id = "unraid_appdata_traefik"
|
||||
name = "unraid_appdata_traefik"
|
||||
|
||||
external_id = "unraid_appdata_traefik"
|
||||
|
||||
capability {
|
||||
access_mode = "multi-node-multi-writer"
|
||||
attachment_mode = "file-system"
|
||||
}
|
||||
|
||||
context = {
|
||||
source = "//192.168.1.192/appdata"
|
||||
subDir = "traefik" # Note: Needs to be manually created on the share
|
||||
}
|
||||
|
||||
secrets = {
|
||||
"username" = "nomad"
|
||||
"password" = data.sops_file.secrets.data["unraid.nomad"]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user