@@ -21,6 +21,7 @@ import (
21
21
"github.com/percona/percona-postgresql-operator/internal/controller/postgrescluster"
22
22
"github.com/percona/percona-postgresql-operator/internal/naming"
23
23
"github.com/percona/percona-postgresql-operator/percona/controller/pgbackup"
24
+ pNaming "github.com/percona/percona-postgresql-operator/percona/naming"
24
25
"github.com/percona/percona-postgresql-operator/percona/utils/registry"
25
26
"github.com/percona/percona-postgresql-operator/percona/watcher"
26
27
v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2"
@@ -94,6 +95,10 @@ func readTestCR(name, namespace, testFile string) (*v2.PerconaPGCluster, error)
94
95
if cr .Spec .PostgresVersion == 0 {
95
96
return nil , errors .New ("postgresVersion should be specified" )
96
97
}
98
+ if cr .Annotations == nil {
99
+ cr .Annotations = make (map [string ]string )
100
+ }
101
+ cr .Annotations [pNaming .InternalAnnotationDisablePatroniVersionCheck ] = "true"
97
102
cr .Status .Postgres .Version = cr .Spec .PostgresVersion
98
103
cr .Status .PatroniVersion = "4.0.0"
99
104
return cr , nil
@@ -112,6 +117,10 @@ func readDefaultCR(name, namespace string) (*v2.PerconaPGCluster, error) {
112
117
}
113
118
114
119
cr .Name = name
120
+ if cr .Annotations == nil {
121
+ cr .Annotations = make (map [string ]string )
122
+ }
123
+ cr .Annotations [pNaming .InternalAnnotationDisablePatroniVersionCheck ] = "true"
115
124
cr .Namespace = namespace
116
125
cr .Status .Postgres .Version = cr .Spec .PostgresVersion
117
126
cr .Status .PatroniVersion = "4.0.0"
0 commit comments