Commit Graph

324 Commits

Author SHA1 Message Date
Felix Kunde 80ef38f7f0
add resource annotation and ignore recovery type (#2817)
* add resource annotation and ignore recovery type
* Update docs/reference/cluster_manifest.md

---------

Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
2024-12-16 18:17:19 +01:00
Motte f5e122e8ef
Fix resource constraints (#2735)
* Add empty string cases to patterns for pod resources
* Added empty strings test case
* Restored k8sres.go and changed test to zeros
* Updated validation pattern in manifests/operatorconfiguration.crd.yaml and pkg/apis/acid.zalan.do/v1/crds.go
2024-10-16 17:19:07 +02:00
Felix Kunde cc9074c184
Bump operator to v1.13.0 (#2729)
* bump operator to v1.13.0
* align configmap with CRD config
* remove default from CRD config option additional_secret_mount_path
* enable automatic major version upgrades by default
2024-08-22 12:16:27 +02:00
Polina Bungina 2582b934bf
MaintenanceWindow CRD validation reflects the implementation (#2731) 2024-08-20 14:43:12 +02:00
Felix Kunde a87307e56b
Feat: enable owner references (#2688)
* feat(498): Add ownerReferences to managed entities
* empty owner reference for cross namespace secret and more tests
* update ownerReferences of existing resources
* removing ownerReference requires Update API call
* CR ownerReference on PVC blocks pvc retention policy of statefulset
* make ownerreferences optional and disabled by default
* update unit test to check len ownerReferences
* update codegen
* add owner references e2e test
* update unit test
* add block_owner_deletion field to test owner reference
* fix typos and update docs once more
* reflect code feedback

---------

Co-authored-by: Max Begenau <max@begenau.com>
2024-08-09 17:58:25 +02:00
Felix Kunde 85b8058029
bump spilo to 16-3.3, drop support for pg11 (#2706)
* bump spilo to 16-3.3, drop support for pg11
* update README
2024-08-09 14:47:23 +02:00
Ida Novindasari 31f474a95c
Enable slot and publication deletion when stream application is removed (#2684)
* refactor syncing publication section
* update createOrUpdateStream function to allow resource deletion when removed from manifest
* add minimal FES CRD to enable FES resources creation for E2E test
* fix bug of removing manifest slots in syncStream
* e2e test: fixing typo with major upgrade test
* e2e test: should create and delete FES resource
* e2e test: should not delete manual created resources
* e2e test: enable cluster role for FES with patching instead of deploying in manifest
2024-07-25 12:00:23 +02:00
Polina Bungina 47efca33c9
Improve inherited annotations (#2657)
* Annotate PVC on Sync/Update, not only change PVC template
* Don't rotate pods when only annotations changed
* Annotate Logical Backup's and Pooler's pods
* Annotate PDB, Endpoints created by the Operator, Secrets, Logical Backup jobs

Inherited annotations are only added/updated, not removed
2024-06-26 13:10:37 +02:00
Felix Kunde 7c7aa96935
bump to v1.12.2 (#2664) 2024-06-14 10:53:17 +02:00
Felix Kunde 2e1583e9c0
bump to v1.12.1 (#2658)
* bump to v1.12.1
* align Python version in setup.py with base image
2024-06-13 10:40:07 +02:00
Felix Kunde 6cde8e8c0b
Bump to v1.12.0 (#2639)
* bump tp v1.12.0
* code-generator and apiextensions-apiserver still on to 0.25.9 to allow code-generation on GH
* bump go in github action and mini fix in UI
* update UI Dockerfile

---------

Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
2024-05-31 15:29:29 +02:00
Felix Kunde b550f8ae39
fix unit test for new subPathExpr feature (#2638)
* fix unit test for new subPathExpr feature
* add subPathExpr flag to CRD and re-sort
2024-05-24 15:07:17 +02:00
Samuel Mutel 7bcb73a402
feat: Add SubPathExpr option for additionalVolumes (#2463) 2024-05-24 11:55:22 +02:00
Felix Kunde 1b08ee1acf
switch to ghcr image in helm chart and examples (#2634)
* switch to ghcr image in helm chart and examples
* change logical backup config for helm chart
* change internal default for logical backup image config to ghcr, too
2024-05-21 17:43:37 +02:00
Motte 13d6594cdf
Secrets deletion config (#2582)
* Secrets deletion config
* Update e2e/tests/test_e2e.py

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2024-05-10 16:31:21 +02:00
Felix Kunde 5357062857
add logical backup retention as manifest option (#2621)
* add logical backup retention as manifest option
* added unit test for logical backup envvar generation
2024-04-29 10:58:52 +02:00
Felix Kunde 83878fe447
make bucket prefix for logical backup configurable (#2609)
* make bucket prefix for logical backup configurable
* include container comparison in logical backup diff
* add unit test and update description for compareContainers
* don't rely on users putting / in the config - reflect other comments from review
2024-04-23 14:24:04 +02:00
Felix Kunde 6ddafadc09
add pdb_master_label_selector to helm chart and example manifests (#2595)
* add pdb_master_label_selector to helm chart and example manifests
2024-03-28 12:06:35 +01:00
Felix Kunde 0f96eb20bf
bump tp v1.11.0 (#2580) 2024-03-15 15:02:39 +01:00
Felix Kunde 08089ed4b4
add option to prevent PVC removal on cluster deletion (#2579)
* add option to prevent PVC removal on cluster deletion
* Update docs/reference/operator_parameters.md

Co-authored-by: Motte <37443982+dmotte@users.noreply.github.com>
2024-03-14 17:01:26 +01:00
Jociele Padilha a5663da64f
add the pg version 16 (#2557)
* add the pg version 16

* add comma after pg16 in crds api

* change minimal_major_version to 12

* add new spilo image for pg16

* edit the registry from current and lazy spilo

* Update e2e/run.sh

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>

* Update README.md

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>

* add pg 11 to be compatible for the existing DBs

* update pq, pyyaml,k8s and kind version

* skip test_infrastructure_roles

* skip another test

* remove the skipping

* adjust the verification of new Patroni version states

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2024-03-13 16:43:25 +01:00
tm604 a63a0758de
Add support for PostgreSQL 16 (#2437)
* Add support for PostgreSQL 16
* Include pg16 in local script and logical-backup Dockerfile

---------

Co-authored-by: Tom Molesworth <tom@audioboundary.com>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2024-03-05 15:43:33 +01:00
Felix Kunde 886cb86797
allow users to opt out from globally enabled secret rotation (#2528)
* allow users to opt out from globally enabled secret rotation
* cover new option also in e2e test
* change ignore test to existing user
2024-02-09 12:19:06 +01:00
Felix Kunde 29ea863faf
allow empty resources when defaults are empty (#2524)
* allow empty resources when defaults are empty
* update codegen
* add more unit tests and remove internal resources defaults
* a unit test for min limit and raising to request
* uncomment defaults in example configmap
* simplifying pooler pod generation unit test
2024-02-09 07:35:53 +01:00
Felix Kunde 375a4679cd
bump pooler image to pgBouncer 1.22.0 (#2529) 2024-02-02 11:48:00 +01:00
Felix Kunde 473a203206
adding finalizer option in all manifests and rework its docs (#2521) 2024-01-24 17:38:16 +01:00
Silas 9581ba969b
Add hugepages 2Mi and 1Gi fields to ResourceDescription and pass them to the statefulset (#2311)
* Add hugepages-2Mi and 1Gi to ResourceDescription type and crd (#1549, #1788)
* Add tests for hugepages resource requests/limits
* Add tests for hugepages resource requests/limits on sidecars, too
* Add docs for hugepages support
* Add link to kubernetes docs on hugepages
* Add tests for hugepages not being set on container if not requested in custom resource
* Add hugepages resources fields to manifest docs
* Add hugepages resources fields to complete manifest example
* Add hugepages resources fields to chart crd

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2024-01-04 15:59:27 +01:00
Stef Graces bbba15f9bf
Logical backup secret (#2051)
* Add logical backup secret
2024-01-04 11:09:16 +01:00
Felix Kunde dc872abb51
support new stream fields in CRD (#2427) 2023-09-20 11:57:49 +02:00
Ida Novindasari 36389b27bc
Enable specifying PVC retention policy for auto deletion (#2343)
* Enable specifying PVC retention policy for auto deletion
* enable StatefulSetAutoDeletePVC in featureGates
* skip node affinity test
2023-09-08 13:17:37 +02:00
Felix Kunde 552bd26c0f
bump to v1.10.1 (#2410)
* bump to v1.10.1
2023-09-07 22:46:26 +02:00
wasap ccc74ae947
Update complete-postgres-manifest.yaml (#2324)
* Update complete-postgres-manifest.yaml

add maxDBConnections settings to connectionPooler

* Update manifests/complete-postgres-manifest.yaml

Lets use more moderate number here

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2023-08-25 16:04:43 +02:00
Felix Kunde c580e509d3
Bump v1.10.0 (#2299)
* bump to v1.9.1
* update year in license and add links to more blog posts
* bump go to 1.19 and update dependencies
* go for 1.10.0 instead of 1.9.1
* fix unit test - removed obsolete ClusterName field
* fix DNS template in UI helm chart deployment file
2023-04-20 18:21:43 +02:00
Felix Kunde 611e48c51e
rename failsafe_mode option in opconfig CRD (#2298) 2023-04-20 14:28:24 +02:00
Felix Kunde 0e7beb5fe5
refactor pooler tls support and set pooler pod security context (#2255)
* bump pooler image
* set pooler pod security context
* use hard coded RunAsUser 100 and RunAsGroup 101 for pooler pod
* unify generation of TLS secret mounts
* extend documentation on tls support
* add unit test for testing TLS support for pooler
* add e2e test for tls support
2023-04-17 11:38:56 +02: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 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 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
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
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
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
Stef Graces bb2617a53f
Add logical backup for azure (#2052)
* Add logical backup for azure
2023-01-05 12:16:41 +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
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
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
Felix Kunde 3e148ea57e
enable operator support for pg15 and drop support for 9.5 and 9.6 (#2140)
* enable operator support for pg15 and drop support for 9.5 and 9.6
* not offer 15 in UI before spilo-15 is available
2022-12-15 12:17:27 +01:00
Dmitry Volodin 81e17e4af1
Remove namespace and fix errors in example manifests files (#2131)
* Remove namespace and fix errors in example manifests files
* Comment required section in default configuration
2022-12-09 15:33:06 +01:00
Polina Bungina 4d585250db
Add Patroni failsafe_mode parameter (#2076)
This commit adds support of a not-yet-released Patroni feature that allows postgres to run as primary in case of a failed leader lock update.
* Add Patroni 'failsafe_mode' local parameter (enable for a single PG cluster)
* Allow configuring Patroni 'failsafe_mode' parameter globally
2022-12-02 13:33:02 +01:00
yoshihikoueno c895e8f61f
Bumped Spilo 14 image tag to 2.1-p7 (#2096)
* Bumped Spilo 14 image tag to 2.1-p7

Co-authored-by: yoshihiko <ariyoshi10@gmail.com>
2022-11-03 10:57:33 +01:00