Do not set access_mode and attachment_mode for host volumes

This commit is contained in:
Daniel Berteaud 2023-11-18 22:56:28 +01:00
parent d89579157e
commit 2ffe4b9bbb
1 changed files with 4 additions and 0 deletions

View File

@ -117,16 +117,20 @@ job [[ .pg.instance | toJSON ]] {
volume "data" {
type = [[ .pg.volumes.data.type | toJSON ]]
source = [[ .pg.volumes.data.source | toJSON ]]
[[- if ne .pg.volumes.data.type "host" ]]
access_mode = "single-node-writer"
attachment_mode = "file-system"
[[- end ]]
per_alloc = true
}
volume "backup" {
type = [[ .pg.volumes.backup.type | toJSON ]]
source = [[ .pg.volumes.backup.source | toJSON ]]
[[- if ne .pg.volumes.backup.type "host" ]]
access_mode = "multi-node-multi-writer"
attachment_mode = "file-system"
[[- end ]]
}
task "postgres" {