Commit Graph

1393 Commits

Author SHA1 Message Date
Felix Kunde 1105228d3a
in sync mode select only syncStandby as switchover candidate (#2278)
* in sync mode select only syncStandby as swicthover candidate
* do not exit retry with err
* unit test: use error from reading byte stream twice
2023-04-06 12:04:55 +02:00
Polina Bungina 0ac5f58fa9
Switch gh workflows to go 1.18.9 (#2267) 2023-03-23 16:08:37 +01:00
Jairo Llopis fd0092ebe9
fix: PG 15 backups working by default (#2246)
In 30b612489a this update was forgotten. It is needed for logical backups of postgres 15 clusters, as seen in https://github.com/zalando/postgres-operator/issues/1945#issuecomment-1425060560.

Fix https://github.com/zalando/postgres-operator/issues/1945.

@moduon MT-1075
2023-03-20 17:39:49 +01:00
Philip Haberkern ac8ace2c24
Updated outdated failsafe_mode documentation (#2266) 2023-03-20 17:39:09 +01:00
Felix Kunde 779288e454
update kubectl-pg dependencies (#2263) 2023-03-20 17:38:54 +01:00
dependabot[bot] 421017b1cc
Bump werkzeug from 2.2.2 to 2.2.3 in /ui (#2224)
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/2.2.2...2.2.3)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 12:16:32 +01:00
dependabot[bot] 0c6ffff320
Bump golang.org/x/net from 0.1.0 to 0.7.0 (#2228)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.1.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.1.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 12:15:33 +01:00
Felix Kunde 80fee5bda4
continue syncing databases and extensions on err (#2262) 2023-03-14 10:58:54 +01:00
Pavel Ven Gulbin 6953f72bee
fix to pooler TLS support (#2219)
* fix to pooler TLS support, security context fsGroup added (#2216)
* add environment variable of CA cert path in pooler pod template
* additional logic for custom CA secrets and mount path
* fix ca file name
2023-03-07 16:20:28 +01:00
Felix Kunde d504aeba6a
Provide support matrix with Pg and K8s version (#2232) 2023-03-07 16:14:14 +01:00
Felix Kunde 9973262b83
sync stateful set when syncing streams during ADD event (#2245) 2023-02-28 09:14:22 +01:00
Felix Kunde 645fcc01a2
remove debug log for generated env vars of logical backup (#2233) 2023-02-23 15:16:16 +01:00
Felix Kunde e6fb57a6bd
add c.replicationSlots on sync (#2238) 2023-02-23 13:19:35 +01:00
Simon Morris 8356ebf097
Adds APP_URL as base tag href to enable loading via ui via ingress routes (#2195) 2023-02-15 15:49:23 +01:00
dependabot[bot] 42e005f041
Bump github.com/emicklei/go-restful (#2215)
Bumps [github.com/emicklei/go-restful](https://github.com/emicklei/go-restful) from 2.9.5+incompatible to 2.16.0+incompatible.
- [Release notes](https://github.com/emicklei/go-restful/releases)
- [Changelog](https://github.com/emicklei/go-restful/blob/v3/CHANGES.md)
- [Commits](https://github.com/emicklei/go-restful/compare/v2.9.5...v2.16.0)

---
updated-dependencies:
- dependency-name: github.com/emicklei/go-restful
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-13 14:12:58 +01:00
Jamie Hitchen 0c7e2dac0e
chore(docs): add workload identity authentication to Google Cloud Platform backup setup (#2200) 2023-02-10 17:21:47 +01:00
yoshihikoueno ab25c63317
Fixed a typo bypassurl -> bypassrls (#2204) 2023-02-10 17:21:27 +01:00
Felix Kunde 1d5bc2396a
minor fix to pooler TLS support (#2216) 2023-02-10 17:20:59 +01:00
idanovinda 933b45aba0
show pooler dns when success creating pooler (#2202) 2023-02-02 16:46:45 +01:00
Felix Kunde 30b612489a
bump to v1.9.0 (#2177)
* bump to v1.9.0
* some minor UI config updates
* bump UI package.json to 1.9.0, too
2023-01-30 10:15:16 +01:00
Felix Kunde 7a90fbcb00
fix sync of stream slots (#2194) 2023-01-27 18:03:37 +01:00
idanovinda d5251c5fc8
Update UI library dependencies (#2191)
* Update UI library dependencies
* change to node v14
* update js-yaml load and dump function
2023-01-27 12:47:30 +01:00
Felix Kunde c9cada66c7
add pooler suffix to DNS annotation of pooler LoadBalancer service (#2188)
* add pooler suffix to DNS annotation of pooler LoadBalancer service
* need generatePoolerServiceAnnotations function
2023-01-27 12:07:48 +01:00
Felix Kunde 7887ebbbce
set wal_level config not on empty parameters map (#2189)
* set wal_level config not on empty parameters map
* UPDATE event must trigger statefulSet sync when streams are added
2023-01-26 09:43:03 +01:00
Felix Kunde b9165190e1
set wal_level for streams in statefulSet sync (#2187)
* set wal_level for streams in statefulSet sync
2023-01-25 17:06:31 +01:00
Felix Kunde 4741b3f734
copy rolconfig during password rotation (#2183)
* copy rolconfig during password rotation

Co-authored-by: idanovinda <idanovinda@gmail.com>
2023-01-25 10:48:23 +01:00
idanovinda 63c9f916a6
fix default cpu memory (#2178) 2023-01-17 17:18:08 +01:00
Felix Kunde a4f95e97e0
do not rotate secrets for standby clusters (#2175) 2023-01-17 12:58:14 +01:00
Felix Kunde 28cd2f188a
better backwards compatibility with old DNS name format for LBs (#2171)
* better backwards compatibility with legacy DNS name format for LBs
* improve docs on DNS string
2023-01-17 10:06:11 +01:00
Dmitry Volodin ce1fee8586
Ineffectual assignment of the envVars for connection pooler (#2165)
* Ineffectual assignment of the envVars for connection pooler
* Fixed codegen in case of the GOPATH is specified explicitly
2023-01-12 11:38:54 +01:00
Owen Ou 021ab07a23
Introduce `masterServiceAnnotations` & `replicaServiceAnnotations` (#2161)
* Introduce `masterServiceAnnotations` & `replicaServiceAnnotations`

Introduce `masterServiceAnnotations` & `replicaServiceAnnotations` to the `Postgresql` CRD.
`masterServiceAnnotations` overrides `serviceAnnotations` for master role if not empty.
`replicaServiceAnnotations` overrides `serviceAnnotations` for replica role if not empty.
Existing definition of `serviceAnnotations` continue to work for backward compatibitlity when neither `masterServiceAnnotations` nor `replicaServiceAnnotations` is defined.

This closes https://github.com/zalando/postgres-operator/issues/1927

* Accumulate service annotations

First, global config, then ServiceAnnotations overriding, then MasterServiceAnnotations and ReplicaServiceAnnotations.

This addresses
https://github.com/zalando/postgres-operator/pull/2161#discussion_r1063558711.

* Update admin doc with master & replica service annotations overrides

Addressed https://github.com/zalando/postgres-operator/pull/2161#discussion_r1064744086

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2023-01-11 13:29:16 +01:00
Alfred Schmid 974481328b
allow templating in .Values.configGeneral also (#2166)
This part was provided by alexey-gavrilov-flant in #1986 and is missing
by accident in #2115
2023-01-10 16:37:51 +01:00
Felix Kunde 77a185894d
bump to go 1.18 (#2164)
* bump to go 1.18
2023-01-10 10:15:52 +01:00
jeremie-seguin 3139c1f3d0
Add Support for Custom TLS Certificates in Connection Pooler (#2146)
* add volume with custom TLS config to pooler deployment
* bump pg bouncer image tag which support new feature

Co-authored-by: Jérémie Seguin <jeremie.seguin@malt.com>
2023-01-09 17:16:00 +01:00
Dmitry Volodin 625e804dc4
Add operator deployment readiness probe (#1874)
* Add operator deployment readiness probe
2023-01-05 18:29:47 +01:00
Felix Kunde 29cec0ceda
configurable resources for logical backup pod template (#710)
* new config options to specify resources for logical backup jobs
* bug in logical backup script for s3 dumps
* define enum for logical_backup_provider
* changed order of logical backup azure options
* fix unit test for stream comparison
2023-01-05 15:19:36 +01:00
Pluggi bbc0de3ffd
Add custom annotations to postgres-operator-ui objects (#1748)
* Add custom annotations to postgres-operator-ui's pod and service

Signed-off-by: Antoine Bardoux <antoine.b@padoa-group.com>
2023-01-05 15:05:11 +01:00
Stef Graces bb2617a53f
Add logical backup for azure (#2052)
* Add logical backup for azure
2023-01-05 12:16:41 +01:00
Felix Kunde c756cb2f8a
spec.env can override clone and standby variables (#2159) 2023-01-05 12:02:19 +01:00
yoshihikoueno becf8a4715
Bump spilo and target version for PostgreSQL 15 (#2139)
* Bumped Spilo image tag to the one that supports PostgreSQL 15. Using CDP version temporarily until non-CDP one is released.
* Added support for PostgreSQL 15 and made it default. 9.5 and 9.6 are now no longer supported
* Bumped spilo image tag to 2.1-p9
* Bumped spilo image in test launcher

Co-authored-by: yoshihiko <ariyoshi10@gmail.com>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2023-01-04 12:01:30 +01:00
Dmitry Volodin 9c88fb9369
Update k8s API for kubectl-pg and regen generated code (#2158) 2023-01-04 11:29:36 +01:00
idanovinda 486d5d66e0
Allow drop slots when it gets deleted from the manifest (#2089)
* Allow drop slots when it gets deleted from the manifest
* use leader instead replica to query slots
* fix and extend unit tests for config update checks

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2023-01-03 15:46:59 +01:00
Felix Kunde 819e410959
refactor podAffinity generation (#2156) 2023-01-03 11:34:02 +01:00
Felix Kunde d7e1fb57f1
polish global config about sharing postgresql-run socket (#2155)
* polish global config about sharing postgresql-run socket
2023-01-02 18:28:48 +01:00
Francois Parquet be7b52db92
add preferred during scheduling pod anti affinity (#2048)
* add preferred during scheduling pod anti affinity

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2023-01-02 18:22:47 +01:00
Dmitry Volodin 93a253bde1
Bump k8s api to v0.23.5 for operator v1.9.0 (#1854)
* Bump k8s api to v0.23.5 for operator v1.8.0
* Update k8s version in Makefile
2023-01-02 16:00:17 +01:00
Christian Rohmann 024aab1f13
Add config switch to share pg_socket in /var/run/postgresql via an emptyDir with the sidecar containers (#962) 2023-01-02 12:57:36 +01:00
Stephan Austermühle a6a49fafc9
Fix parameter name for data-checksums (#2136)
Signed-off-by: Stephan Austermühle <au@hcsd.de>
2022-12-30 18:09:07 +01:00
Camilo Schöningh 44f08bc217
fix: add missing json tags to the MaintenanceWindow type struct. (#2148)
If you import the zalando postgresql v1 api with kubebuilder, it
complains about the missing tags.

```
❯ make manifests
test -s /.../bin/controller-gen && /.../bin/controller-gen --version | grep -q v0.10.0 || \
        GOBIN=/.../bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.10.0
/.../bin/controller-gen rbac:roleName=manager-role crd:allowDangerousTypes=true webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/.../go/pkg/mod/github.com/zalando/postgres-operator@v1.8.2/pkg/apis/acid.zalan.do/v1/postgresql_type.go:116:2: encountered struct field "Everyday" without JSON tag in type "MaintenanceWindow"
/.../go/pkg/mod/github.com/zalando/postgres-operator@v1.8.2/pkg/apis/acid.zalan.do/v1/postgresql_type.go:117:2: encountered struct field "Weekday" without JSON tag in type "MaintenanceWindow"
/.../go/pkg/mod/github.com/zalando/postgres-operator@v1.8.2/pkg/apis/acid.zalan.do/v1/postgresql_type.go:118:2: encountered struct field "StartTime" without JSON tag in type "MaintenanceWindow"
/.../go/pkg/mod/github.com/zalando/postgres-operator@v1.8.2/pkg/apis/acid.zalan.do/v1/postgresql_type.go:119:2: encountered struct field "EndTime" without JSON tag in type "MaintenanceWindow"
Error: not all generators ran successfully
run `controller-gen rbac:roleName=manager-role crd:allowDangerousTypes=true webhook paths=./... output:crd:artifacts:config=config/crd/bases -w` to see all available markers, or `controller-gen rbac:roleName=manager-role crd:allowDangerousTypes=true webhook paths=./... output:crd:artifacts:config=config/crd/bases -h` for usage
make: *** [manifests] Error 1
```
2022-12-30 14:45:14 +01:00
Felix Kunde 4534a4cd9e
fix syncing of stream CRDs (#2152)
* fix syncing of stream CRDs and improve corresponding unit tests
2022-12-30 13:09:15 +01:00