drop deprecated fields from Postgresql CRD (#3106)

* remove deprecated fields from postgresql CRD

---------

Co-authored-by: ida-novindasari_zse <ida.novindasari@zalando.de>
Co-authored-by: Mikkel Oscar Lyderik Larsen <mikkeloscar@users.noreply.github.com>
Co-authored-by: idanovinda <idanovinda@gmail.com>
This commit is contained in:
Felix Kunde
2026-07-02 16:53:03 +02:00
committed by GitHub
co-authored by ida-novindasari_zse Mikkel Oscar Lyderik Larsen idanovinda
parent a3d17c12d2
commit 18e359b995
11 changed files with 23 additions and 4886 deletions
-29
View File
@@ -64,35 +64,6 @@ func TestControllerOwnershipOnPostgresql(t *testing.T) {
}
}
func TestMergeDeprecatedPostgreSQLSpecParameters(t *testing.T) {
tests := []struct {
name string
in *acidv1.PostgresSpec
out *acidv1.PostgresSpec
error string
}{
{
"Check that old parameters propagate values to the new ones",
&acidv1.PostgresSpec{UseLoadBalancer: &True, ReplicaLoadBalancer: &True},
&acidv1.PostgresSpec{UseLoadBalancer: nil, ReplicaLoadBalancer: nil,
EnableMasterLoadBalancer: &True, EnableReplicaLoadBalancer: &True},
"New parameters should be set from the values of old ones",
},
{
"Check that new parameters are not set when both old and new ones are present",
&acidv1.PostgresSpec{UseLoadBalancer: &True, EnableMasterLoadBalancer: &False},
&acidv1.PostgresSpec{UseLoadBalancer: nil, EnableMasterLoadBalancer: &False},
"New parameters should remain unchanged when both old and new are present",
},
}
for _, tt := range tests {
result := postgresqlTestController.mergeDeprecatedPostgreSQLSpecParameters(tt.in)
if !reflect.DeepEqual(result, tt.out) {
t.Errorf("%s: %v", tt.name, tt.error)
}
}
}
func TestMeetsClusterDeleteAnnotations(t *testing.T) {
// set delete annotations in configuration
postgresqlTestController.opConfig.DeleteAnnotationDateKey = "delete-date"