Commit Graph

1535 Commits

Author SHA1 Message Date
Mitch Murphy d762e707f4
Merge branch 'master' into feat/enhanced-pooler-config 2026-07-17 09:46:18 -04:00
Tiago Condeixa f2741ef741
we need to add update permission for sa to periodically sync (#3131) 2026-07-17 15:36:00 +02:00
Pierre Ozoux 118c1146bf
docs: correct kubectl commands (#3129)
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
2026-07-17 11:57:30 +02:00
annielzy 5c6dcc65e2
Preserve sync quorum in primary PDB without master selector (#3119)
* Use minAvalable=SynchronousNodeCount + 1 in primary PDB when master selector is disabled

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
2026-07-17 11:56:48 +02:00
Tiago Condeixa 7578f9d2c0
feat (operator): add support for IRSA (aws resources access) (#3128)
* fix data to POSIX and sed working on macos
* add ServiceAccountGetter to the newFakeK8sAnnotationsClient for unit tests
* try to update the service account
* use irsa_role_arn since we need the full arn, and remove enable_irsa
* move sa sync code to existing sync.go file to be all together
* change all Irsa to IRSA to follow go idiomatic that capitalize initialisms or acronyms
* using Update instead of Patch for the service account syn
* document the new option and add the key in the values/configs
* add the new option to the administrator docs
* trying to increase the timeout for the flaky test after sync

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2026-07-15 18:19:10 +02:00
Tiago Condeixa 85d7aebab2
adjust makefile and scripts to also run on macos (#3130) 2026-07-15 11:24:20 +02:00
Felix Kunde 18e359b995
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>
2026-07-02 16:53:03 +02:00
Felix Kunde a3d17c12d2
document changed configmap default (#3116)
* document changed configmap default
* update config reference
* add warning message in sync
* address review comments
2026-07-02 14:04:57 +02:00
Mitchell Murphy b11f5e5e5c
fix(pooler): resolved duplicate fields in ConnectionPoolerConfiguration struct 2026-06-29 08:54:33 -04:00
Felix Kunde 8781170c34
Merge branch 'master' into feat/enhanced-pooler-config 2026-06-29 11:49:59 +02:00
Felix Kunde 1227fc2e1c
switch to metav1.Duration for timeout options (#3121)
* switch to metav1.Duration for timeout options
* fix custom config parsing and use safe coalesce
2026-06-29 10:32:24 +02:00
Mitch Murphy 67046efe51
Merge branch 'master' into feat/enhanced-pooler-config 2026-06-26 13:07:44 -04:00
Felix Kunde 9030520e24
fix array validation for global maintenance window and protected role names (#3120)
* change type of maintenance windows in config crd
* fix default array type for protected role names
2026-06-26 17:02:50 +02:00
Felix Kunde 26af5a7900
update docs about CRD generation and copy paste to chart dir, too (#3117) 2026-06-26 10:43:57 +02:00
Pierre Ozoux 49895a2200
fix(helm): remove cpu limit (#2893)
There is never a good case for cpu limits :)

https://home.robusta.dev/blog/stop-using-cpu-limits

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2026-06-26 10:03:56 +02:00
Mitch Murphy 4af7b5a5b6
Merge branch 'master' into feat/enhanced-pooler-config 2026-06-25 17:13:06 -04:00
dependabot[bot] db0f112de6
Bump js-yaml from 4.1.1 to 4.2.0 in /ui/app (#3114)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.1 to 4.2.0.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.1...4.2.0)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.2.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-25 09:34:25 +02:00
Felix Kunde df3224730f
Update to Go 1.26.4, build runners and go.mod depedencies (#3108)
* update golang and dependencies
* fix incorrect log formatting
* clean mod chache and introduce GOARCH in Dockerfile (choose dynamically)
* remove GO111MODULE mentions
* bump github actions from v2 to v3
* bump docker runners to v7
* use extra event store for backwards compatibility with existing codebase
* updated generated opconfig api
2026-06-23 13:35:53 +02:00
Felix Kunde a664816c09
auto-generate configuration CRD (#3102)
* auto-generate configuration CRD
* make all subconfig optional
* remove field enable crd validation
* update field descriptions which use proxy types
2026-06-22 10:44:46 +02:00
Jociele Padilha e4e686588e
Fix/logical backup job cleanup (#3111)
* feat(logical-backup): add configurable job history limits and TTL

Adds three new configuration options for logical backup cronjobs:
- logical_backup_successful_jobs_history_limit (default: 3)
- logical_backup_failed_jobs_history_limit (default: 3)
- logical_backup_ttl_seconds_after_finished (default: 86400)

These options control how many completed/failed backup jobs are
retained by Kubernetes and when finished jobs are automatically
deleted. This prevents accumulation of old backup jobs and pods
in namespaces with many PostgreSQL clusters.

Also updates the CronJob comparison logic to detect changes in
these new fields and trigger reconciliation when needed.

Closes zalando/postgres-operator#1092

* add added the 3 new fieldson crd

* updated gen api

---------

Co-authored-by: Jairo Llopis <jairo@moduon.team>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2026-06-19 12:12:58 +02:00
Felix Kunde 49cde600b8
update new source ranges validation for kubebuilder (#3110) 2026-06-13 00:14:53 +02:00
Felix Kunde a30e15e472
re-generate CRDs to latest state (#3109) 2026-06-12 15:44:55 +02:00
Raphael Torquato 1036350eb4
feat: add IPv6 support to allowedSourceRanges (#3082)
* feat: add IPv6 support to allowedSourceRanges

Update regex pattern in CRD validation to accept both IPv4 and IPv6
CIDR notation, enabling dual-stack networking support.

Fixes #2787

Signed-off-by: Raphael Torquato <>

* add unit test fror ipv6 allowedSourceRanges

---------

Signed-off-by: Raphael Torquato <>
Co-authored-by: Raphael Torquato <>
Co-authored-by: Jociele Padilha <jocielepadilha@gmail.com>
2026-06-12 15:09:06 +02:00
Felix Kunde ebf48667f1
drop kubectl-pg plugin (#3107)
Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
2026-06-12 10:42:37 +02:00
Lucas Nikola Pape a71e6bdf7f
feat: implement service type NodePort (#2986)
feat: implement service type NodePort
fix: handle LoadBalancer to NodePort service type transition
move NodePort check before LoadBalancer and remove redundant nodePor
add LB-specific DNS annotations again
2026-06-12 10:02:26 +02:00
Allen Conlon ab740cf5e5
feat: add publish of helm chart to ghcr.io (#2853)
Signed-off-by: Allen Conlon <software@conlon.dev>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2026-06-11 09:55:31 +02:00
Raphael Torquato 873dd548ff
Add cluster_labels and annotations to logical backup CronJob and Jobs (#3085)
* Add cluster_labels and annotations to logical backup CronJob and Jobs

When using the logical backup feature, the CronJob and its created Jobs
were missing the cluster_labels and annotations that are applied to
other cluster resources. This made it difficult to filter or identify
backup jobs using the same labels as other cluster components.

Changes:
- Added ObjectMeta with labels and annotations to JobTemplateSpec
- Updated CronJob ObjectMeta to use the merged labels (including
  'application: spilo-logical-backup')
- Updated tests to expect the new labels
2026-06-10 18:18:54 +02:00
Jorge Solorzano f0b5d3725c
Bump github.com/lib/pq from v1.11.2 to v1.12.3 (#3042)
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2026-06-10 11:32:13 +02:00
Mitchell Murphy b8bd7eda93
docs(pooler): add documentation for operator-generated PgBouncer config
Signed-off-by: Mitchell Murphy <mitchell.murphy@defenseunicorns.com>
2026-06-07 17:21:02 -04:00
Mitchell Murphy 964fc73fc8 test(pooler): refactor connection pooler config tests to use assert package 2026-06-07 16:28:58 -04:00
Mitch Murphy 455722915d docs(pooler): align values.yaml args with manifest and tidy param docs 2026-06-05 15:01:07 -04:00
Mitch Murphy 3d97c71f75 docs(pooler): document and expose generate-config parameters 2026-06-05 14:51:40 -04:00
Mitch Murphy c6d0476cb5 test(pooler): cover config map update-on-drift branch 2026-06-05 14:48:21 -04:00
Mitch Murphy e79c7d3ca3 feat(pooler): create/sync/delete generated config map in lifecycle 2026-06-05 14:41:11 -04:00
Mitch Murphy c5e0b43a36 refactor(pooler): extract connectionPoolerConfigMapName helper 2026-06-05 14:35:57 -04:00
Mitch Murphy 8641fbd9de feat(pooler): mount generated config and override command/args 2026-06-05 14:28:29 -04:00
Mitch Murphy be3fbdaec8 style(pooler): use acid.zalan.do domain for config checksum annotation 2026-06-05 14:24:34 -04:00
Mitch Murphy 3dabf6c379 feat(pooler): render pgbouncer.ini, checksum, and config map 2026-06-05 14:18:41 -04:00
Mitch Murphy db689033a0 docs(pooler): fix godoc placement after sizes extraction 2026-06-05 14:13:05 -04:00
Mitch Murphy ac8668a819 refactor(pooler): extract connectionPoolerSizes helper 2026-06-05 14:07:17 -04:00
Mitch Murphy 1383829440 style(crd): gofmt connection pooler config fields 2026-06-05 13:58:33 -04:00
Mitch Murphy bf0aa1ec8d feat(crd): mirror connection_pooler generate-config fields in OperatorConfiguration 2026-06-05 13:52:04 -04:00
Mitch Murphy c49aac8cc2 test(config): cover ConfigPath and Command overrides 2026-06-05 13:49:23 -04:00
Mitch Murphy 9787922bf9 feat(config): add connection_pooler generate-config fields 2026-06-05 13:44:27 -04:00
Kadaffy Talavera 40b6c68443
fix: set password encryption default to scram-sha-256 (#2962)
* fix: set password encryption default to scram-sha-256

According to the Postgres official documentation, md5 passwords is
deprecated in favor of scram-sha-256 encryption.

The change in this PR updates the default encryption to the new postgres
default.

Documentation link:  https://www.postgresql.org/docs/18/auth-password.html

>Warning: Support for MD5-encrypted passwords is deprecated and will be removed in a future release of PostgreSQL.

Signed-off-by: Kadaffy Talavera <kadtalavera@gmail.com>

* fix: update user documentation about password encryption

Signed-off-by: Kadaffy Talavera <kadtalavera@gmail.com>

* Apply suggestion from @FxKu

---------

Signed-off-by: Kadaffy Talavera <kadtalavera@gmail.com>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2026-06-04 20:55:04 +02:00
Raphael Torquato a1bbfd9d9a
Fix bool config defaults when using OperatorConfiguration CRD (#3084)
* Fix bool config defaults when using OperatorConfiguration CRD

When using OperatorConfiguration CRD, boolean fields with default value
of `true` (like `enable_database_access` and `debug_logging`) were
incorrectly defaulting to `false` when not explicitly specified.

This happened because Go initializes bool fields to `false`, and there
was no coalesce logic to apply the intended defaults.

The fix changes the CRD type fields from `bool` to `*bool` (pointer),
allowing us to distinguish between "not specified" (nil) and "explicitly
set to false". Then we use the existing `CoalesceBool` utility function
to apply the correct defaults.

Fixes #2575

* update generated code

Updated DeepCopyInto method for OperatorDebugConfiguration to handle pointers for DebugLogging and EnableDBAccess.

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2026-06-03 13:00:51 +02:00
Zakaria Amine bd2500da81
refactor(controller): use kubernetes informers provided by client-go (#3080)
* refactor(controller): use kubernetes informers provided by client-go
* forgot assigning struct field member

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2026-06-03 12:43:34 +02:00
Felix Kunde 4177fa27be
Provide liveness probe for CRD and config (#3089)
* add LivenessProbe to both CRDs 
* auto-generate liveness probe for CRD
* update topolgySpreadConstraint schema validation
* Disable it for config map
2026-06-02 17:31:42 +02:00
Raphael Torquato 26165be2d5
test: add unit tests for validate() and NewFromMap() functions (#3086)
This addresses issue #416 by adding comprehensive unit tests for the
config utility functions:

- TestValidate: Tests validation logic for MinInstances/MaxInstances,
  Workers count, ConnectionPooler instances, and user conflicts
- TestNewFromMap: Tests config creation from map with defaults,
  custom values, duration/boolean/map/slice parsing, and panic behavior
- TestMain: Sets OPERATOR_NAMESPACE env var for testing outside K8s

The tests cover both valid configurations and error cases.

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2026-06-02 10:45:44 +02:00
Kirill Petrov 5fb654f5f7
Add support for passing extra command-line args via Helm values (#2892)
* Add support for passing extra command-line args to the operator via Helm values

This change introduces the ability to specify additional command-line arguments for the Postgres Operator via the "extraArgs" field in values.yaml. Documentation has been updated with details on new arguments "-kubeqps" and "-kubeburst" added before: https://github.com/zalando/postgres-operator/pull/2667. The chart version is bumped to 1.14.1 to reflect these changes.

* reverted charts/postgres-operator/Chart.yaml

---------

Co-authored-by: k.s.petrov <k.s.petrov@2gis.ru>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2026-06-01 10:04:48 +02:00