Do not set access_mode and attachment_mode for host volumes
This commit is contained in:
parent
d89579157e
commit
2ffe4b9bbb
|
@ -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" {
|
||||
|
|
Loading…
Reference in New Issue