Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18250,8 +18250,8 @@ spec:
type: object
x-kubernetes-validations:
- message: The ssl_groups parameter is only available in pg18 and greater
rule: '!has(self.?config.parameters.ssl_groups) || self.postgresVersion
> 17'
rule: '!has(self.config) || !has(self.config.parameters) || !has(self.config.parameters.ssl_groups)
|| self.postgresVersion > 17'
status:
description: PostgresClusterStatus defines the observed state of PostgresCluster
properties:
Expand Down
1 change: 1 addition & 0 deletions internal/controller/pgupgrade/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ func (r *PGUpgradeReconciler) generateUpgradeJob(
settings := upgrade.Spec.PGUpgradeSettings.DeepCopy()

// When jobs is undefined, use one less than the number of CPUs.
//nolint:gosec // The CPU count is clamped to MaxInt32.
if settings.Jobs == 0 && feature.Enabled(ctx, feature.PGUpgradeCPUConcurrency) {
wholeCPUs := int32(min(math.MaxInt32, largestWholeCPU(upgrade.Spec.Resources)))
settings.Jobs = wholeCPUs - 1
Expand Down
1 change: 1 addition & 0 deletions internal/controller/postgrescluster/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ func (r *Reconciler) observeInstances(
status.DesiredPGDataVolume = make(map[string]string)

for _, instance := range observed.bySet[name] {
//nolint:gosec // This slice is always small.
status.Replicas += int32(len(instance.Pods))

if ready, known := instance.IsReady(); known && ready {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
//
// # Postgres 18
//
// +kubebuilder:validation:XValidation:rule=`!has(self.?config.parameters.ssl_groups) || self.postgresVersion > 17`,message=`The ssl_groups parameter is only available in pg18 and greater`
// +kubebuilder:validation:XValidation:rule=`!has(self.config) || !has(self.config.parameters) || !has(self.config.parameters.ssl_groups) || self.postgresVersion > 17`,message=`The ssl_groups parameter is only available in pg18 and greater`
type PostgresClusterSpec struct {
// +optional
Metadata *Metadata `json:"metadata,omitempty"`
Expand Down
Loading