Skip to content

Commit 55977ca

Browse files
committed
Add rule to disallow userInterface
1 parent f5c0f73 commit 55977ca

File tree

4 files changed

+49
-82
lines changed

4 files changed

+49
-82
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ spec:
1414
singular: postgrescluster
1515
scope: Namespaced
1616
versions:
17-
- name: v1beta1
17+
- name: v1
1818
schema:
1919
openAPIV3Schema:
2020
description: PostgresCluster is the Schema for the postgresclusters API
@@ -18182,6 +18182,9 @@ spec:
1818218182
required:
1818318183
- pgAdmin
1818418184
type: object
18185+
x-kubernetes-validations:
18186+
- message: userInterface not available in v1
18187+
rule: type(self) == null_type
1818518188
users:
1818618189
description: |-
1818718190
Users to create inside PostgreSQL and the databases they should access.
@@ -18639,10 +18642,10 @@ spec:
1863918642
type: object
1864018643
type: object
1864118644
served: true
18642-
storage: true
18645+
storage: false
1864318646
subresources:
1864418647
status: {}
18645-
- name: v1
18648+
- name: v1beta1
1864618649
schema:
1864718650
openAPIV3Schema:
1864818651
description: PostgresCluster is the Schema for the postgresclusters API
@@ -37267,6 +37270,6 @@ spec:
3726737270
type: object
3726837271
type: object
3726937272
served: true
37270-
storage: false
37273+
storage: true
3727137274
subresources:
3727237275
status: {}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ type PostgresClusterSpec struct {
146146

147147
// The specification of a user interface that connects to PostgreSQL.
148148
// +optional
149+
// +kubebuilder:validation:XValidation:rule="type(self) == null_type", message="userInterface not available in v1"
149150
UserInterface *UserInterfaceSpec `json:"userInterface,omitempty"`
150151

151152
// The specification of monitoring tools that connect to PostgreSQL

pkg/apis/postgres-operator.crunchydata.com/v1/postgrescluster_types_conversion.go

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)