Skip to content

Commit df8aafb

Browse files
committed
Remove optional types from ssl_groups validation rule since they are not supported in k8s versions earlier than 1.29
1 parent 7cf192f commit df8aafb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18250,8 +18250,8 @@ spec:
1825018250
type: object
1825118251
x-kubernetes-validations:
1825218252
- message: The ssl_groups parameter is only available in pg18 and greater
18253-
rule: '!has(self.?config.parameters.ssl_groups) || self.postgresVersion
18254-
> 17'
18253+
rule: '!has(self.config) || !has(self.config.parameters) || !has(self.config.parameters.ssl_groups)
18254+
|| self.postgresVersion > 17'
1825518255
status:
1825618256
description: PostgresClusterStatus defines the observed state of PostgresCluster
1825718257
properties:

pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
//
1818
// # Postgres 18
1919
//
20-
// +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`
20+
// +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`
2121
type PostgresClusterSpec struct {
2222
// +optional
2323
Metadata *Metadata `json:"metadata,omitempty"`

0 commit comments

Comments
 (0)