Skip to content

Commit 18631ff

Browse files
committed
fix backups disabling
1 parent e244dde commit 18631ff

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

internal/config/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ func PGONamespace() string {
135135
func VerifyImageValues(cluster *v1beta1.PostgresCluster) error {
136136
var images []string
137137

138+
backupsEnabled := cluster.Spec.Backups.Enabled == nil || *cluster.Spec.Backups.Enabled
138139
// K8SPG-710: Image check will fail without a backup section in PostgresCluster
139-
if cluster.BackupSpecFound() && PGBackRestContainerImage(cluster) == "" {
140+
if cluster.BackupSpecFound() && backupsEnabled && PGBackRestContainerImage(cluster) == "" {
140141
images = append(images, "crunchy-pgbackrest")
141142
}
142143
if PGAdminContainerImage(cluster) == "" &&

pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,9 +703,6 @@ func (b Backups) ToCrunchy(version string) crunchyv1beta1.Backups {
703703
if b.Enabled != nil && !*b.Enabled {
704704
return crunchyv1beta1.Backups{
705705
Enabled: ptr.To(false),
706-
PGBackRest: crunchyv1beta1.PGBackRestArchive{
707-
Image: b.PGBackRest.Image,
708-
},
709706
}
710707
}
711708

0 commit comments

Comments
 (0)