Skip to content

Commit

Permalink
Set Default Postgres StandbyMode (#1364)
Browse files Browse the repository at this point in the history
Signed-off-by: souravbiswassanto <[email protected]>
  • Loading branch information
souravbiswassanto authored Dec 11, 2024
1 parent 97a0eb7 commit 5c754b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apis/kubedb/v1/postgres_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 3 additions & 0 deletions apis/kubedb/v1alpha2/postgres_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5c754b0

Please sign in to comment.