Skip to content

Commit 55ce63d

Browse files
author
CloudNativePG Automated Updates
committed
chore: sync API
1 parent 8a585c9 commit 55ce63d

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

pkg/api/v1/cluster_types.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ type ImageCatalogRef struct {
196196
// +kubebuilder:validation:XValidation:rule="self.kind == 'ImageCatalog' || self.kind == 'ClusterImageCatalog'",message="Only image catalogs are supported"
197197
// +kubebuilder:validation:XValidation:rule="self.apiGroup == 'postgresql.cnpg.io'",message="Only image catalogs are supported"
198198
corev1.TypedLocalObjectReference `json:",inline"`
199-
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Major is immutable"
200199
// The major version of PostgreSQL we want to use from the ImageCatalog
201200
Major int `json:"major"`
202201
}
@@ -587,7 +586,10 @@ const (
587586
// PhaseUpgrade upgrade in process
588587
PhaseUpgrade = "Upgrading cluster"
589588

590-
// PhaseUpgradeDelayed is set when a cluster need to be upgraded
589+
// PhaseMajorUpgrade major version upgrade in process
590+
PhaseMajorUpgrade = "Upgrading Postgres major version"
591+
592+
// PhaseUpgradeDelayed is set when a cluster needs to be upgraded,
591593
// but the operation is being delayed by the operator configuration
592594
PhaseUpgradeDelayed = "Cluster upgrade delayed"
593595

@@ -942,6 +944,11 @@ type ClusterStatus struct {
942944
// +optional
943945
Image string `json:"image,omitempty"`
944946

947+
// MajorVersionUpgradeFromImage contains the image that was
948+
// running before the major version upgrade started.
949+
// +optional
950+
MajorVersionUpgradeFromImage *string `json:"majorVersionUpgradeFromImage,omitempty"`
951+
945952
// PluginStatus is the status of the loaded plugins
946953
// +optional
947954
PluginStatus []PluginStatus `json:"pluginStatus,omitempty"`

pkg/api/v1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)