@@ -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"`
0 commit comments