postgres-operator/pkg/cluster
Juhani Pelli 4c1bb1c0ea
Use maxUnavailable for the critical-op PDB to stop idle alert noise (#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 (#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 #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>
2026-07-27 17:36:42 +02:00
..
cluster.go remove gp3 migration flow (#3142) 2026-07-27 14:02:44 +02:00
cluster_test.go Add envFrom support to Postgresql spec (#3118) 2026-07-22 17:21:31 +02:00
connection_pooler.go switch to metav1.Duration for timeout options (#3121) 2026-06-29 10:32:24 +02:00
connection_pooler_new_test.go Connection pooler for replica (#1127) 2020-11-13 14:52:21 +01:00
connection_pooler_test.go feat: implement service type NodePort (#2986) 2026-06-12 10:02:26 +02:00
database.go stop retention user cleanup early again when DB connection attempt fails (#2999) 2025-12-10 10:01:07 +01:00
exec.go fix golangci-lint issues (#2715) 2024-08-14 12:54:44 +02:00
filesystems.go reflect change in github url (#496) 2019-02-25 11:26:55 +01:00
k8sres.go Use maxUnavailable for the critical-op PDB to stop idle alert noise (#3141) 2026-07-27 17:36:42 +02:00
k8sres_test.go Use maxUnavailable for the critical-op PDB to stop idle alert noise (#3141) 2026-07-27 17:36:42 +02:00
majorversionupgrade.go Update to Go 1.26.4, build runners and go.mod depedencies (#3108) 2026-06-23 13:35:53 +02:00
pod.go switch to metav1.Duration for timeout options (#3121) 2026-06-29 10:32:24 +02:00
pod_test.go switch to metav1.Duration for timeout options (#3121) 2026-06-29 10:32:24 +02:00
resources.go switch to metav1.Duration for timeout options (#3121) 2026-06-29 10:32:24 +02:00
streams.go do not remove publications of slot defined in manifest (#2868) 2025-02-26 17:31:37 +01:00
streams_test.go fix flaky comparison unit test of retruned errors (#2822) 2024-12-19 17:35:01 +01:00
sync.go remove gp3 migration flow (#3142) 2026-07-27 14:02:44 +02:00
sync_test.go switch to metav1.Duration for timeout options (#3121) 2026-06-29 10:32:24 +02:00
types.go Critical operation PDB (#2830) 2025-01-29 12:41:08 +01:00
util.go document changed configmap default (#3116) 2026-07-02 14:04:57 +02:00
util_test.go feat (operator): add support for IRSA (aws resources access) (#3128) 2026-07-15 18:19:10 +02:00
volumes.go change volume specs to int32 and define max iops and throughput values (#3139) 2026-07-27 16:32:22 +02:00
volumes_test.go change volume specs to int32 and define max iops and throughput values (#3139) 2026-07-27 16:32:22 +02:00