No attachment_mode or access_mode for host volumes

This commit is contained in:
Daniel Berteaud 2023-11-20 09:25:36 +01:00
parent 6e7f6aadd7
commit cd8c0c78df
1 changed files with 10 additions and 6 deletions

View File

@ -31,18 +31,22 @@ job [[ .bgm.instance | toJSON ]] {
}
volume "data" {
type = [[ .bgm.volumes.data.type | toJSON ]]
source = [[ .bgm.volumes.data.source | toJSON ]]
type = [[ .bgm.volumes.data.type | toJSON ]]
source = [[ .bgm.volumes.data.source | toJSON ]]
[[- if ne .bgm.volumes.data.type "host" ]]
attachment_mode = "file-system"
access_mode = "single-node-writer"
[[- end ]]
}
[[ if and .bgm.backup.enabled (not (eq .bgm.backup.cron "")) -]]
volume "backup" {
type = [[ $c.volumes.backup.type | toJSON ]]
source = [[ $c.volumes.backup.source | toJSON ]]
type = [[ .bgm.volumes.backup.type | toJSON ]]
source = [[ .bgm.volumes.backup.source | toJSON ]]
[[- if ne .bgm.volumes.backup.type "host" ]]
attachment_mode = "file-system"
access_mode = "multi-node-multi-writer"
[[- end ]]
}
[[- end ]]
@ -50,8 +54,8 @@ job [[ .bgm.instance | toJSON ]] {
driver = [[ $c.nomad.driver | toJSON ]]
config {
image = [[ .bgm.image | toJSON ]]
pids_limit = 100
image = [[ .bgm.image | toJSON ]]
pids_limit = 100
readonly_rootfs = true
}