Skip to content

SCF-861: Upstream master sync 2026-08-13 - #19

Open
adshin21 wants to merge 71 commits into
scalefield_v18from
scalefield_v18-sync-2026-08-13
Open

SCF-861: Upstream master sync 2026-08-13#19
adshin21 wants to merge 71 commits into
scalefield_v18from
scalefield_v18-sync-2026-08-13

Conversation

@adshin21

Copy link
Copy Markdown

No description provided.

hughcapet and others added 30 commits April 7, 2026 12:16
zalando#3065)

* Avoid rotating pods for PGVERSION change outside of maintenance window
* Update docs
* feature toggle for using maintenance windows
Remove excess comma from OPERATOR_UI_CONFIG.
* Updates Needed for WASM Target
* switch to regular (instead of local) build flags
* update codegen to match other scripts

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](pallets/werkzeug@3.1.5...3.1.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…alando#3069)

* fix(logical-backup): wait for PG connectivity before running backup

The backup script connects to the target PostgreSQL pod immediately
after resolving its IP via the Kubernetes API. When NetworkPolicy is
enforced via iptables, a newly-created pod's IP may not yet be present
in the destination node's ingress allow lists, causing cross-node
connections to be rejected until the next policy sync.

This adds a pg_isready retry loop before the dump starts, with
configurable retries and delay via LOGICAL_BACKUP_CONNECT_RETRIES
(default: 10) and LOGICAL_BACKUP_CONNECT_RETRY_DELAY (default: 2s).

Signed-off-by: Zadkiel AHARONIAN <zaharonian@ccl-consulting.fr>

* docs: document LOGICAL_BACKUP_CONNECT_RETRIES and RETRY_DELAY env vars

Document the new environment variables that control the pg_isready
retry loop added in the previous commit. These are passed via the
existing logical_backup_cronjob_environment_secret mechanism.

Signed-off-by: Zadkiel AHARONIAN <zaharonian@ccl-consulting.fr>

---------

Signed-off-by: Zadkiel AHARONIAN <zaharonian@ccl-consulting.fr>
Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
read_stored_clusters and read_versions build their S3 clients with
endpoint_url=AWS_ENDPOINT, but read_basebackups used a bare
client('s3') for both the list_objects_v2 paginator and the per-key
get_object call. On MinIO / S3-compatible backends the list+get
requests go to the default AWS endpoint, so the Backups tab renders
cluster/version prefixes (picked up by the correctly-configured
read_stored_clusters) but then returns empty base backup details
(silently no hits against the real backend) (zalando#3078).

Build s3_client once per call with endpoint_url=AWS_ENDPOINT and reuse
it for both the paginator and get_object. No behaviour change when
AWS_ENDPOINT is unset; boto3 defaults to the AWS endpoint either way.

Fixes zalando#3078

Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com>
Co-authored-by: SAY-5 <SAY-5@users.noreply.github.com>
Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
…alando#3051)

* add fix to recreate non running pods in syncStatefulsets

* remove TestSyncStatefulSetNonRunningPodsDoNotBlockRecreatio

* revert pod_test

* pod without status

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
* build multi-arch pooler image
* add pooler build step in delivery.yaml and bump pooler version
* pull from docker hub not zalando registry
* add pooler step to ghcr workflow
* pass infra roles to auth file via pooler entrypoint
* introduce extra pooler secret for mounting auth_file
* use pbgouncer as image name and push to ghcr on next merge
* build with latest pgbouncer
* integrate new image in e2e process and update pooler image default
* update pooler build dependencies
* build pooler image for e2e test
* more Makefile and e2e run script tweaking

---------

Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
* shorten pooler secret mount
* update postgres CRD in helm chart
* fix: correct 'occured' typo in finalizer error message
* fix: correct 'occured' typo in EBS volume error message
* Add topologySpreadConstraints configuration to pod spec.
* Run update-codegen.sh to add deepcopy for new field to the api.
* Reuse configured TopologySpreadConstraints for logical backup.
* Remove x-kubernetes-preserve-unknown-fields and XPreserveUnknownFields.
* Add topologySpreadConstraint example in the complete manifest.
* Add support for helm chart.
* Add documentation for topologySpreadConstraint.
* Update e2e test to patch topologySpreadConstraints into the postgresqls manifest.
* For e2e test, updated the PVC retention policy to remove redundant PVCs.
* Fix e2e test, expected PVC count in end-to-end test after config changes.
…#3015)

When a Postgres cluster has a finalizer, deleting it sets a DeletionTimestamp
but doesn't remove the object until the finalizer is cleared. The operator
was not properly handling these DeletionTimestamp changes:

1. postgresqlUpdate() was filtering out events where only DeletionTimestamp
   changed (it only checked Spec and Annotations), causing the delete to
   never be processed.

2. EventUpdate case in processEvent() didn't check for DeletionTimestamp,
   so even if the event reached the processor, it would run Update() instead
   of Delete().

3. removeFinalizer() used a cached object with stale resourceVersion,
   causing "object has been modified" errors.

Fixes:
- Add explicit DeletionTimestamp check in postgresqlUpdate() to queue the event
- Add DeletionTimestamp check in EventUpdate to call Delete() when set
- Fetch latest object from API before removing finalizer to avoid conflicts

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
…ndo#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: zalando#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>
…do#3086)

This addresses issue zalando#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>
* add LivenessProbe to both CRDs 
* auto-generate liveness probe for CRD
* update topolgySpreadConstraint schema validation
* Disable it for config map
…alando#3080)

* refactor(controller): use kubernetes informers provided by client-go
* forgot assigning struct field member

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
…o#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 zalando#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>
* 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>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
…zalando#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
Signed-off-by: Allen Conlon <software@conlon.dev>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
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
Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
* 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 zalando#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>
dependabot Bot and others added 23 commits July 21, 2026 09:38
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.51.0 to 0.52.0.
- [Commits](golang/crypto@v0.51.0...v0.52.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.52.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [requests](https://github.com/psf/requests) from 2.32.4 to 2.33.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.32.4...v2.33.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.33.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.2.0 to 4.3.0.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.2.0...4.3.0)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.3.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>
* add envFrom support
* generate files

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
* switch to docker buildx and update docs
* minor update to e2e Dockerfile
* fix space issues for e2e test
* pin exact minor release of coveralls
)

* fix type deference when calling ebs modify volume endpoint
* only pass set variable to modify input
zalando#3139)

* change int64 volume specs to int32 like in used AWS lib
* upper iops and throughput limits
* minor refactoring in ebs.go
…alando#3141)

* Use maxUnavailable for the critical-op PDB to stop idle alert noise

The critical-op PDB is created with minAvailable equal to
numberOfInstances while its selector (critical-operation=true) matches
no pods during normal operation. This leaves status.desiredHealthy at N
and currentHealthy at 0 permanently, so monitoring stacks fire alerts
like kube-prometheus-stack's KubePdbNotEnoughHealthyPods for every idle
cluster (zalando#3020).

maxUnavailable: 0 provides the same protection while a critical
operation is running - no voluntary evictions of labeled pods - but
keeps the budget satisfied (desiredHealthy 0) when nothing matches.
When PDBs are disabled or there are no instances, the budget relaxes to
maxUnavailable 100% instead of minAvailable 0.

Fixes zalando#3020

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Update PDB docs for critical-op maxUnavailable semantics

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Clarify why the two PDBs use different budget fields

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
* bump to v2.0
* update docs and remove some diagrams
* update crd in charts dir
* update helm charts
* reflect docs feedback
…ring (zalando#3145)

Upgrading to v2.0.0 fails at the CRD apply step. The apiserver rejects the
OperatorConfiguration CRD:

  CustomResourceDefinition "operatorconfigurations.acid.zalan.do" is invalid:
  ...oauth_token_secret_name.default: Invalid value: "string": in body must
  be of type object

Root cause: these CRDs are generated by controller-gen from the Go types.
spec.NamespacedName is a struct {Namespace, Name}, so controller-gen emits an
object schema for every NamespacedName field. But NamespacedName has custom
MarshalJSON/UnmarshalJSON that (de)serialize it as a plain JSON string
("namespace/name"). The generated object schema therefore never matched how
the operator actually reads and writes these fields (it did in 1.15.x, where
they were type: string).

For oauth_token_secret_name this is a hard failure: it also carries
`// +kubebuilder:default=postgres-operator`, and a scalar string default on an
object-typed property is rejected by the apiserver, blocking the whole
1.15.x -> 2.0.0 upgrade before the operator Deployment is touched.

Fix at the source by annotating the NamespacedName type with
`// +kubebuilder:validation:Type=string` and regenerating the CRDs. This makes
controller-gen emit `type: string` for all NamespacedName fields
(oauth_token_secret_name, infrastructure_roles_secret_name,
pod_environment_configmap, and the nested infrastructure role secretname),
matching their runtime serialization and restoring 1.15.x behaviour. A
field-level Type override cannot be used here: it conflicts with the
struct-derived schema ("object vs string in allOf") and fails generation.

Regenerated manifests/operatorconfiguration.crd.yaml and its two synced
copies (pkg/apis/... embed source and charts/.../crds). Verified with a
server-side dry-run apply: the unpatched CRD is rejected, the regenerated CRD
is accepted.

Fixes zalando#3143
…alando#3144)

The postgresql_versions array had a trailing comma after "14" in two places
that build OPERATOR_UI_CONFIG as JSON. OPERATOR_UI_CONFIG is parsed by the UI
with Python's json.loads() (operator_ui/main.py), which rejects trailing
commas, so the config fails to load:

  json.decoder.JSONDecodeError: Expecting value: line 25 column 3

Remove the trailing comma in:
- charts/postgres-operator-ui/templates/deployment.yaml (chart Deployment)
- ui/run_local.sh (local dev default_operator_ui_config)

ui/manifests/deployment.yaml and the Python DEFAULT_UI_CONFIG in
operator_ui/main.py were already correct.

Fixes zalando#3062
Add deployment strategy type 'Recreate'
configuration.sidecars was annotated with kubebuilder:validation:Type=object
while SidecarContainers is a []v1.Container, so the generated schema rejected
every list value and global sidecars could not be configured at all.

Drop the hand-written Schemaless/Type=object markers and let controller-gen
derive the schema from the Go type, the same way spec.initContainers is
already handled in the Postgresql CRD. The field now renders as type: array
with a full Container schema for its items.

Fixes zalando#3159

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
zalando#3165)

* Skip owner references on user secrets when secret deletion is disabled

Kubernetes garbage-collects owner-referenced secrets as soon as the
owning Postgresql resource is deleted, regardless of the operator's
own EnableSecretsDeletion check in Delete() (which only guards the
operator's explicit deleteSecrets() call, not GC). This made
enable_secrets_deletion=false ineffective whenever
enable_owner_references was also enabled, since GC removed the
credential secrets anyway.

Now the generated secrets are not removed when
enable_owner_references: true, enable_secrets_deletion: false.

* Document skip-owner-refs on user secrets when deletion disabled

- refresh inline comment in generateSingleUserSecret
- extend enable_owner_references / enable_secrets_deletion docs in
  operator_parameters.md to describe the interaction
- clarify in operator_parameters.md that the protection takes effect
  on the cluster's next sync after the setting is applied
- add third exception in administrator.md "Owner References and Finalizers"
- add TestGenerateSingleUserSecret_OwnerReferences covering all four
  flag combinations plus the cross-namespace cases

---------

Co-authored-by: Serdar Dalgıç <sd@serdardalgic.org>
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.3.0 to 4.3.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.1/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.3.0...4.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Re-run controller-gen v0.17.3 against the merged Go types to pick up
the cybertec-owned fields (lifecycle.phase, pitr_backup_retention) and
new upstream additions (previousNumberOfInstances, previousPoolerInstances,
sidecar array rendering fix).

Changes are formatting + generated content only:

  manifests/operatorconfiguration.crd.yaml
  pkg/apis/acid.zalan.do/v1/operatorconfiguration.crd.yaml
  charts/postgres-operator/crds/operatorconfigurations.yaml
    + pitr_backup_retention field (cybertec)

  manifests/postgresql.crd.yaml
  pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml
  charts/postgres-operator/crds/postgresqls.yaml
    + lifecycle field with phase enum (cybertec)
    + previousNumberOfInstances / previousPoolerInstances (upstream)
    ~ field reordering to controller-gen v0.17.3 alphabetical output
    + metadata: controller-gen.kubebuilder.io/version, app.kubernetes.io/name label
    + YAML front-matter

  pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go
    + DeepCopy logic for PitrBackupRetention (*metav1.Duration)

Schema semantics unchanged. CRD validation behaviour identical.
@coveralls

coveralls commented Aug 13, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 31678435338

Warning

No base build found for commit 78063e3 on scalefield_v18.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 45.043%

Details

  • Patch coverage: 666 uncovered changes across 33 files (333 of 999 lines covered, 33.33%).

Uncovered Changes

Top 10 Files by Coverage Impact Changed Covered %
pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go 160 11 6.88%
pkg/cluster/sync.go 81 25 30.86%
pkg/controller/postgresql.go 55 1 1.82%
pkg/cluster/cluster.go 71 24 33.8%
pkg/generated/informers/externalversions/factory.go 43 0 0.0%
pkg/generated/informers/externalversions/acid.zalan.do/v1/operatorconfiguration.go 41 0 0.0%
pkg/util/volumes/ebs.go 36 0 0.0%
pkg/controller/operator_config.go 29 0 0.0%
pkg/generated/informers/externalversions/acid.zalan.do/v1/postgresql.go 26 0 0.0%
pkg/generated/informers/externalversions/acid.zalan.do/v1/postgresteam.go 26 0 0.0%
Total (33 files) 999 333 33.33%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 16231
Covered Lines: 7311
Line Coverage: 45.04%
Coverage Strength: 21.4 hits per line

💛 - Coveralls

- run_tests and run_e2e only fire on scalefield_v* PRs, with a
  manual trigger option
- build-and-push runs on PRs to scalefield_v* and on any tag
  push, with unit tests gating the Harbor publish
- publish_ghcr_image disabled — upstream-only workflow, not
  used by cybertec
@adshin21
adshin21 force-pushed the scalefield_v18-sync-2026-08-13 branch from 0e571c5 to e2e94c5 Compare August 13, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.