Skip to content

Commit 7fe38f2

Browse files
author
CloudNativePG Automated Updates
committed
chore: sync API
1 parent 48fea3f commit 7fe38f2

5 files changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/api/v1/database_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const (
6060
// +kubebuilder:validation:XValidation:rule="!has(self.icuRules) || self.localeProvider == 'icu'",message="icuRules is only available when localeProvider is set to `icu`"
6161
type DatabaseSpec struct {
6262
// The name of the PostgreSQL cluster hosting the database.
63+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="cluster reference is immutable after creation"
6364
ClusterRef corev1.LocalObjectReference `json:"cluster"`
6465

6566
// Ensure the PostgreSQL database is `present` or `absent` - defaults to "present".

pkg/api/v1/pooler_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ const (
8888
type PoolerSpec struct {
8989
// This is the cluster reference on which the Pooler will work.
9090
// Pooler name should never match with any cluster name within the same namespace.
91+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="cluster reference is immutable after creation"
9192
Cluster LocalObjectReference `json:"cluster"`
9293

9394
// Type of service to forward traffic to. Default: `rw`.

pkg/api/v1/publication_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const (
4141
// PublicationSpec defines the desired state of Publication
4242
type PublicationSpec struct {
4343
// The name of the PostgreSQL cluster that identifies the "publisher"
44+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="cluster reference is immutable after creation"
4445
ClusterRef corev1.LocalObjectReference `json:"cluster"`
4546

4647
// The name of the publication inside PostgreSQL

pkg/api/v1/scheduledbackup_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type ScheduledBackupSpec struct {
3939
Schedule string `json:"schedule"`
4040

4141
// The cluster to backup
42+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="cluster reference is immutable after creation"
4243
Cluster LocalObjectReference `json:"cluster"`
4344

4445
// Indicates which ownerReference should be put inside the created backup resources.<br />

pkg/api/v1/subscription_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const (
4141
// SubscriptionSpec defines the desired state of Subscription
4242
type SubscriptionSpec struct {
4343
// The name of the PostgreSQL cluster that identifies the "subscriber"
44+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="cluster reference is immutable after creation"
4445
ClusterRef corev1.LocalObjectReference `json:"cluster"`
4546

4647
// The name of the subscription inside PostgreSQL

0 commit comments

Comments
 (0)