diff --git a/apis/kubedb/v1/postgres_helpers.go b/apis/kubedb/v1/postgres_helpers.go index 956de9e547..81857ce6b9 100644 --- a/apis/kubedb/v1/postgres_helpers.go +++ b/apis/kubedb/v1/postgres_helpers.go @@ -199,7 +199,9 @@ func (p *Postgres) SetDefaults(postgresVersion *catalog.PostgresVersion) { if p == nil { return } - + if p.Spec.StandbyMode == nil { + p.Spec.StandbyMode = ptr.To(HotPostgresStandbyMode) + } if p.Spec.StorageType == "" { p.Spec.StorageType = StorageTypeDurable } diff --git a/apis/kubedb/v1alpha2/postgres_helpers.go b/apis/kubedb/v1alpha2/postgres_helpers.go index dc73b64655..25551b81c6 100644 --- a/apis/kubedb/v1alpha2/postgres_helpers.go +++ b/apis/kubedb/v1alpha2/postgres_helpers.go @@ -189,6 +189,9 @@ func (p *Postgres) SetDefaults(postgresVersion *catalog.PostgresVersion, topolog if p == nil { return } + if p.Spec.StandbyMode == nil { + p.Spec.StandbyMode = ptr.To(HotPostgresStandbyMode) + } if p.Spec.StorageType == "" { p.Spec.StorageType = StorageTypeDurable