fix
This commit is contained in:
@@ -16,9 +16,6 @@ resource "kubectl_manifest" "prj_pg" {
|
||||
name: "${var.instance}-${var.component}"
|
||||
namespace: "${var.namespace}"
|
||||
labels: ${jsonencode(local.pg-labels)}
|
||||
annotations:
|
||||
"k8up.io/backupcommand": "pg_dumpall -U postgres -w --clean"
|
||||
"k8up.io/file-extension": ".sql"
|
||||
spec:
|
||||
instances: ${var.postgres.replicas}
|
||||
imageName: "${var.images.postgresql.registry}/${var.images.postgresql.repository}:${var.images.postgresql.tag}"
|
||||
@@ -31,6 +28,15 @@ resource "kubectl_manifest" "prj_pg" {
|
||||
initdb:
|
||||
database: "${var.instance}"
|
||||
owner: "${var.instance}"
|
||||
inheritedMetadata:
|
||||
annotations:
|
||||
"k8up.io/backup": "false"
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
"k8up.io/backupcommand": "pg_dumpall -U postgres -w --clean"
|
||||
"k8up.io/file-extension": ".sql"
|
||||
"k8up.io/backup": "true"
|
||||
EOF
|
||||
], var.backups.enable?[<<-EOF
|
||||
backup:
|
||||
|
||||
Reference in New Issue
Block a user