Skip to content

Commit 2b18618

Browse files
committed
Switch to upstream dependency for postgres-operator (and remove custom replication config)
1 parent a6ff2ae commit 2b18618

File tree

3 files changed

+18
-363
lines changed

3 files changed

+18
-363
lines changed

api/v1/postgres_types.go

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -689,10 +689,10 @@ func (p *Postgres) ToUnstructuredZalandoPostgresql(z *zalando.Postgresql, c *cor
689689
// finally, overwrite the (special to us) shared buffer parameter
690690
setSharedBufferSize(z.Spec.PostgresqlParam.Parameters, p.Spec.Size.SharedBuffer)
691691

692-
z.Spec.Resources.ResourceRequests.CPU = p.Spec.Size.CPU
693-
z.Spec.Resources.ResourceRequests.Memory = p.Spec.Size.Memory
694-
z.Spec.Resources.ResourceLimits.CPU = p.Spec.Size.CPU
695-
z.Spec.Resources.ResourceLimits.Memory = p.Spec.Size.Memory
692+
z.Spec.Resources.ResourceRequests.CPU = pointer.String(p.Spec.Size.CPU)
693+
z.Spec.Resources.ResourceRequests.Memory = pointer.String(p.Spec.Size.Memory)
694+
z.Spec.Resources.ResourceLimits.CPU = pointer.String(p.Spec.Size.CPU)
695+
z.Spec.Resources.ResourceLimits.Memory = pointer.String(p.Spec.Size.Memory)
696696
z.Spec.TeamID = p.generateTeamID()
697697
z.Spec.Volume.Size = p.Spec.Size.StorageSize
698698
z.Spec.Volume.StorageClass = sc
@@ -779,12 +779,9 @@ func (p *Postgres) ToUnstructuredZalandoPostgresql(z *zalando.Postgresql, c *cor
779779
} else {
780780
// overwrite connection info
781781
z.Spec.StandbyCluster = &zalando.StandbyDescription{
782-
StandbyMethod: StandbyMethod,
783-
StandbyHost: p.Spec.PostgresConnection.ConnectionIP,
784-
StandbyPort: strconv.FormatInt(int64(p.Spec.PostgresConnection.ConnectionPort), 10),
785-
StandbySecretName: "standby." + p.ToPeripheralResourceName() + ".credentials",
786-
S3WalPath: "",
787-
StandbyApplicationName: p.ObjectMeta.Name,
782+
StandbyHost: p.Spec.PostgresConnection.ConnectionIP,
783+
StandbyPort: strconv.FormatInt(int64(p.Spec.PostgresConnection.ConnectionPort), 10),
784+
// S3WalPath: "",
788785
}
789786
}
790787

go.mod

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/onsi/gomega v1.27.10
1313
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.56.2
1414
github.com/spf13/viper v1.12.0
15-
github.com/zalando/postgres-operator v1.7.0
15+
github.com/zalando/postgres-operator v1.11.0
1616
k8s.io/api v0.28.9
1717
k8s.io/apiextensions-apiserver v0.28.9
1818
k8s.io/apimachinery v0.28.9
@@ -73,15 +73,15 @@ require (
7373
go.uber.org/multierr v1.11.0 // indirect
7474
go.uber.org/zap v1.25.0 // indirect
7575
golang.org/x/crypto v0.21.0 // indirect
76-
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
76+
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
7777
golang.org/x/mod v0.14.0 // indirect
7878
golang.org/x/net v0.23.0 // indirect
7979
golang.org/x/oauth2 v0.8.0 // indirect
8080
golang.org/x/sys v0.18.0 // indirect
8181
golang.org/x/term v0.18.0 // indirect
8282
golang.org/x/text v0.14.0 // indirect
8383
golang.org/x/time v0.3.0 // indirect
84-
golang.org/x/tools v0.16.1 // indirect
84+
golang.org/x/tools v0.17.0 // indirect
8585
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
8686
google.golang.org/appengine v1.6.7 // indirect
8787
google.golang.org/protobuf v1.33.0 // indirect
@@ -98,5 +98,3 @@ require (
9898
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
9999
sigs.k8s.io/yaml v1.3.0 // indirect
100100
)
101-
102-
replace github.com/zalando/postgres-operator v1.7.0 => github.com/ermajn/postgres-operator v1.0.1-0.20211123085256-711648b7fdde

0 commit comments

Comments
 (0)