postgres-operator/pkg
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
..
apis Fix bool config defaults when using OperatorConfiguration CRD (#3084) 2026-06-03 13:00:51 +02:00
apiserver Add operator deployment readiness probe (#1874) 2023-01-05 18:29:47 +01:00
cluster Provide liveness probe for CRD and config (#3089) 2026-06-02 17:31:42 +02:00
controller Fix bool config defaults when using OperatorConfiguration CRD (#3084) 2026-06-03 13:00:51 +02:00
generated Regenerate code for 2026 header (#3029) 2026-01-09 15:38:16 +01:00
spec Generate CRD for postgresteam resource (#3004) 2026-01-10 19:39:08 +01:00
teams Generate CRD for postgresteam resource (#3004) 2026-01-10 19:39:08 +01:00
util refactor(controller): use kubernetes informers provided by client-go (#3080) 2026-06-03 12:43:34 +02:00