From c6d66f7a8cd807511ec3b26217d4b6f79a2e001d Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Wed, 1 Nov 2023 16:03:47 -0700 Subject: [PATCH] Remove spec.upgrade field and Upgrade ops type Signed-off-by: Tamal Saha --- .../ops/v1alpha1/elasticsearch_ops_helpers.go | 15 ------- apis/ops/v1alpha1/elasticsearch_ops_types.go | 5 +-- .../v1alpha1/elasticsearch_ops_types_enum.go | 5 --- apis/ops/v1alpha1/etcd_ops_helpers.go | 8 ---- apis/ops/v1alpha1/kafka_ops_helpers.go | 8 ---- apis/ops/v1alpha1/mariadb_ops_helpers.go | 15 ------- apis/ops/v1alpha1/mariadb_ops_types.go | 5 +-- apis/ops/v1alpha1/mariadb_ops_types_enum.go | 5 --- apis/ops/v1alpha1/memcached_ops_helpers.go | 15 ------- apis/ops/v1alpha1/memcached_ops_types.go | 5 +-- apis/ops/v1alpha1/memcached_ops_types_enum.go | 5 --- apis/ops/v1alpha1/mongodb_ops_helpers.go | 15 ------- apis/ops/v1alpha1/mongodb_ops_types.go | 5 +-- apis/ops/v1alpha1/mongodb_ops_types_enum.go | 5 --- apis/ops/v1alpha1/mysql_ops_helpers.go | 15 ------- apis/ops/v1alpha1/mysql_ops_types.go | 5 +-- apis/ops/v1alpha1/mysql_ops_types_enum.go | 5 --- apis/ops/v1alpha1/openapi_generated.go | 42 ------------------- .../ops/v1alpha1/perconaxtradb_ops_helpers.go | 15 ------- apis/ops/v1alpha1/perconaxtradb_ops_types.go | 5 +-- .../v1alpha1/perconaxtradb_ops_types_enum.go | 5 --- apis/ops/v1alpha1/pgbouncer_ops_helpers.go | 8 ---- apis/ops/v1alpha1/postgres_ops_helpers.go | 15 ------- apis/ops/v1alpha1/postgres_ops_types.go | 5 +-- apis/ops/v1alpha1/postgres_ops_types_enum.go | 5 --- apis/ops/v1alpha1/proxysql_ops_helpers.go | 8 ---- apis/ops/v1alpha1/redis_ops_helpers.go | 8 ---- .../v1alpha1/redis_sentinel_ops_helpers.go | 8 ---- apis/ops/v1alpha1/type.go | 1 - apis/ops/v1alpha1/zz_generated.deepcopy.go | 35 ---------------- ...s.kubedb.com_elasticsearchopsrequests.yaml | 5 --- crds/ops.kubedb.com_mariadbopsrequests.yaml | 5 --- crds/ops.kubedb.com_memcachedopsrequests.yaml | 7 ---- crds/ops.kubedb.com_mongodbopsrequests.yaml | 5 --- crds/ops.kubedb.com_mysqlopsrequests.yaml | 7 ---- ...s.kubedb.com_perconaxtradbopsrequests.yaml | 5 --- crds/ops.kubedb.com_postgresopsrequests.yaml | 5 --- 37 files changed, 7 insertions(+), 333 deletions(-) diff --git a/apis/ops/v1alpha1/elasticsearch_ops_helpers.go b/apis/ops/v1alpha1/elasticsearch_ops_helpers.go index 37ceaf1fcb..4ba0a80ad6 100644 --- a/apis/ops/v1alpha1/elasticsearch_ops_helpers.go +++ b/apis/ops/v1alpha1/elasticsearch_ops_helpers.go @@ -63,21 +63,6 @@ func (e *ElasticsearchOpsRequest) GetObjectMeta() metav1.ObjectMeta { return e.ObjectMeta } -func (e ElasticsearchOpsRequest) GetRequestType() any { - switch e.Spec.Type { - case ElasticsearchOpsRequestTypeUpgrade: - return ElasticsearchOpsRequestTypeUpdateVersion - } - return e.Spec.Type -} - -func (e ElasticsearchOpsRequest) GetUpdateVersionSpec() *ElasticsearchUpdateVersionSpec { - if e.Spec.UpdateVersion != nil { - return e.Spec.UpdateVersion - } - return e.Spec.Upgrade -} - func (e *ElasticsearchOpsRequest) GetDBRefName() string { return e.Spec.DatabaseRef.Name } diff --git a/apis/ops/v1alpha1/elasticsearch_ops_types.go b/apis/ops/v1alpha1/elasticsearch_ops_types.go index 2ca9245148..eabd96e16e 100644 --- a/apis/ops/v1alpha1/elasticsearch_ops_types.go +++ b/apis/ops/v1alpha1/elasticsearch_ops_types.go @@ -57,9 +57,6 @@ type ElasticsearchOpsRequestSpec struct { Type ElasticsearchOpsRequestType `json:"type"` // Specifies information necessary for upgrading Elasticsearch UpdateVersion *ElasticsearchUpdateVersionSpec `json:"updateVersion,omitempty"` - // Specifies information necessary for upgrading Elasticsearch - // Deprecated: use UpdateVersion - Upgrade *ElasticsearchUpdateVersionSpec `json:"upgrade,omitempty"` // Specifies information necessary for horizontal scaling HorizontalScaling *ElasticsearchHorizontalScalingSpec `json:"horizontalScaling,omitempty"` // Specifies information necessary for vertical scaling @@ -80,7 +77,7 @@ type ElasticsearchOpsRequestSpec struct { } // +kubebuilder:validation:Enum=Upgrade;UpdateVersion;HorizontalScaling;VerticalScaling;VolumeExpansion;Restart;Reconfigure;ReconfigureTLS -// ENUM(Upgrade, UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS) +// ENUM(UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS) type ElasticsearchOpsRequestType string // ElasticsearchReplicaReadinessCriteria is the criteria for checking readiness of an Elasticsearch database diff --git a/apis/ops/v1alpha1/elasticsearch_ops_types_enum.go b/apis/ops/v1alpha1/elasticsearch_ops_types_enum.go index 7027935b43..d007f1cb14 100644 --- a/apis/ops/v1alpha1/elasticsearch_ops_types_enum.go +++ b/apis/ops/v1alpha1/elasticsearch_ops_types_enum.go @@ -12,8 +12,6 @@ import ( ) const ( - // ElasticsearchOpsRequestTypeUpgrade is a ElasticsearchOpsRequestType of type Upgrade. - ElasticsearchOpsRequestTypeUpgrade ElasticsearchOpsRequestType = "Upgrade" // ElasticsearchOpsRequestTypeUpdateVersion is a ElasticsearchOpsRequestType of type UpdateVersion. ElasticsearchOpsRequestTypeUpdateVersion ElasticsearchOpsRequestType = "UpdateVersion" // ElasticsearchOpsRequestTypeHorizontalScaling is a ElasticsearchOpsRequestType of type HorizontalScaling. @@ -33,7 +31,6 @@ const ( var ErrInvalidElasticsearchOpsRequestType = fmt.Errorf("not a valid ElasticsearchOpsRequestType, try [%s]", strings.Join(_ElasticsearchOpsRequestTypeNames, ", ")) var _ElasticsearchOpsRequestTypeNames = []string{ - string(ElasticsearchOpsRequestTypeUpgrade), string(ElasticsearchOpsRequestTypeUpdateVersion), string(ElasticsearchOpsRequestTypeHorizontalScaling), string(ElasticsearchOpsRequestTypeVerticalScaling), @@ -53,7 +50,6 @@ func ElasticsearchOpsRequestTypeNames() []string { // ElasticsearchOpsRequestTypeValues returns a list of the values for ElasticsearchOpsRequestType func ElasticsearchOpsRequestTypeValues() []ElasticsearchOpsRequestType { return []ElasticsearchOpsRequestType{ - ElasticsearchOpsRequestTypeUpgrade, ElasticsearchOpsRequestTypeUpdateVersion, ElasticsearchOpsRequestTypeHorizontalScaling, ElasticsearchOpsRequestTypeVerticalScaling, @@ -77,7 +73,6 @@ func (x ElasticsearchOpsRequestType) IsValid() bool { } var _ElasticsearchOpsRequestTypeValue = map[string]ElasticsearchOpsRequestType{ - "Upgrade": ElasticsearchOpsRequestTypeUpgrade, "UpdateVersion": ElasticsearchOpsRequestTypeUpdateVersion, "HorizontalScaling": ElasticsearchOpsRequestTypeHorizontalScaling, "VerticalScaling": ElasticsearchOpsRequestTypeVerticalScaling, diff --git a/apis/ops/v1alpha1/etcd_ops_helpers.go b/apis/ops/v1alpha1/etcd_ops_helpers.go index 930e8e5ec2..8459c4254c 100644 --- a/apis/ops/v1alpha1/etcd_ops_helpers.go +++ b/apis/ops/v1alpha1/etcd_ops_helpers.go @@ -63,14 +63,6 @@ func (e *EtcdOpsRequest) GetObjectMeta() metav1.ObjectMeta { return e.ObjectMeta } -func (e EtcdOpsRequest) GetRequestType() any { - return e.Spec.Type -} - -func (e EtcdOpsRequest) GetUpdateVersionSpec() *EtcdUpdateVersionSpec { - return e.Spec.UpdateVersion -} - func (e *EtcdOpsRequest) GetDBRefName() string { return e.Spec.DatabaseRef.Name } diff --git a/apis/ops/v1alpha1/kafka_ops_helpers.go b/apis/ops/v1alpha1/kafka_ops_helpers.go index 92c3ee2115..890a365f03 100644 --- a/apis/ops/v1alpha1/kafka_ops_helpers.go +++ b/apis/ops/v1alpha1/kafka_ops_helpers.go @@ -55,18 +55,10 @@ func (k *KafkaOpsRequest) ResourcePlural() string { var _ Accessor = &KafkaOpsRequest{} -func (k *KafkaOpsRequest) GetRequestType() any { - return k.Spec.Type -} - func (k *KafkaOpsRequest) GetObjectMeta() metav1.ObjectMeta { return k.ObjectMeta } -func (k *KafkaOpsRequest) GetUpdateVersionSpec() *KafkaUpdateVersionSpec { - return k.Spec.UpdateVersion -} - func (k *KafkaOpsRequest) GetDBRefName() string { return k.Spec.DatabaseRef.Name } diff --git a/apis/ops/v1alpha1/mariadb_ops_helpers.go b/apis/ops/v1alpha1/mariadb_ops_helpers.go index f40caee1d9..eecdab47ec 100644 --- a/apis/ops/v1alpha1/mariadb_ops_helpers.go +++ b/apis/ops/v1alpha1/mariadb_ops_helpers.go @@ -84,21 +84,6 @@ func (m *MariaDBOpsRequest) GetObjectMeta() metav1.ObjectMeta { return m.ObjectMeta } -func (m MariaDBOpsRequest) GetRequestType() any { - switch m.Spec.Type { - case MariaDBOpsRequestTypeUpgrade: - return MariaDBOpsRequestTypeUpdateVersion - } - return m.Spec.Type -} - -func (m MariaDBOpsRequest) GetUpdateVersionSpec() *MariaDBUpdateVersionSpec { - if m.Spec.UpdateVersion != nil { - return m.Spec.UpdateVersion - } - return m.Spec.Upgrade -} - func (m *MariaDBOpsRequest) GetDBRefName() string { return m.Spec.DatabaseRef.Name } diff --git a/apis/ops/v1alpha1/mariadb_ops_types.go b/apis/ops/v1alpha1/mariadb_ops_types.go index afa4938bed..7992ecea1b 100644 --- a/apis/ops/v1alpha1/mariadb_ops_types.go +++ b/apis/ops/v1alpha1/mariadb_ops_types.go @@ -57,9 +57,6 @@ type MariaDBOpsRequestSpec struct { Type MariaDBOpsRequestType `json:"type"` // Specifies information necessary for upgrading MariaDB UpdateVersion *MariaDBUpdateVersionSpec `json:"updateVersion,omitempty"` - // Specifies information necessary for upgrading MariaDB - // Deprecated: use UpdateVersion - Upgrade *MariaDBUpdateVersionSpec `json:"upgrade,omitempty"` // Specifies information necessary for horizontal scaling HorizontalScaling *MariaDBHorizontalScalingSpec `json:"horizontalScaling,omitempty"` // Specifies information necessary for vertical scaling @@ -80,7 +77,7 @@ type MariaDBOpsRequestSpec struct { } // +kubebuilder:validation:Enum=Upgrade;UpdateVersion;HorizontalScaling;VerticalScaling;VolumeExpansion;Restart;Reconfigure;ReconfigureTLS -// ENUM(Upgrade, UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS) +// ENUM(UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS) type MariaDBOpsRequestType string // MariaDBReplicaReadinessCriteria is the criteria for checking readiness of an MariaDB database diff --git a/apis/ops/v1alpha1/mariadb_ops_types_enum.go b/apis/ops/v1alpha1/mariadb_ops_types_enum.go index ced5a6e6f3..45f85b1c1a 100644 --- a/apis/ops/v1alpha1/mariadb_ops_types_enum.go +++ b/apis/ops/v1alpha1/mariadb_ops_types_enum.go @@ -12,8 +12,6 @@ import ( ) const ( - // MariaDBOpsRequestTypeUpgrade is a MariaDBOpsRequestType of type Upgrade. - MariaDBOpsRequestTypeUpgrade MariaDBOpsRequestType = "Upgrade" // MariaDBOpsRequestTypeUpdateVersion is a MariaDBOpsRequestType of type UpdateVersion. MariaDBOpsRequestTypeUpdateVersion MariaDBOpsRequestType = "UpdateVersion" // MariaDBOpsRequestTypeHorizontalScaling is a MariaDBOpsRequestType of type HorizontalScaling. @@ -33,7 +31,6 @@ const ( var ErrInvalidMariaDBOpsRequestType = fmt.Errorf("not a valid MariaDBOpsRequestType, try [%s]", strings.Join(_MariaDBOpsRequestTypeNames, ", ")) var _MariaDBOpsRequestTypeNames = []string{ - string(MariaDBOpsRequestTypeUpgrade), string(MariaDBOpsRequestTypeUpdateVersion), string(MariaDBOpsRequestTypeHorizontalScaling), string(MariaDBOpsRequestTypeVerticalScaling), @@ -53,7 +50,6 @@ func MariaDBOpsRequestTypeNames() []string { // MariaDBOpsRequestTypeValues returns a list of the values for MariaDBOpsRequestType func MariaDBOpsRequestTypeValues() []MariaDBOpsRequestType { return []MariaDBOpsRequestType{ - MariaDBOpsRequestTypeUpgrade, MariaDBOpsRequestTypeUpdateVersion, MariaDBOpsRequestTypeHorizontalScaling, MariaDBOpsRequestTypeVerticalScaling, @@ -77,7 +73,6 @@ func (x MariaDBOpsRequestType) IsValid() bool { } var _MariaDBOpsRequestTypeValue = map[string]MariaDBOpsRequestType{ - "Upgrade": MariaDBOpsRequestTypeUpgrade, "UpdateVersion": MariaDBOpsRequestTypeUpdateVersion, "HorizontalScaling": MariaDBOpsRequestTypeHorizontalScaling, "VerticalScaling": MariaDBOpsRequestTypeVerticalScaling, diff --git a/apis/ops/v1alpha1/memcached_ops_helpers.go b/apis/ops/v1alpha1/memcached_ops_helpers.go index e8eec65f8b..9aae7a4e7a 100644 --- a/apis/ops/v1alpha1/memcached_ops_helpers.go +++ b/apis/ops/v1alpha1/memcached_ops_helpers.go @@ -63,21 +63,6 @@ func (m *MemcachedOpsRequest) GetObjectMeta() metav1.ObjectMeta { return m.ObjectMeta } -func (m MemcachedOpsRequest) GetRequestType() any { - switch m.Spec.Type { - case MemcachedOpsRequestTypeUpgrade: - return MemcachedOpsRequestTypeUpdateVersion - } - return m.Spec.Type -} - -func (m MemcachedOpsRequest) GetUpdateVersionSpec() *MemcachedUpdateVersionSpec { - if m.Spec.UpdateVersion != nil { - return m.Spec.UpdateVersion - } - return m.Spec.Upgrade -} - func (m *MemcachedOpsRequest) GetDBRefName() string { return m.Spec.DatabaseRef.Name } diff --git a/apis/ops/v1alpha1/memcached_ops_types.go b/apis/ops/v1alpha1/memcached_ops_types.go index a3e0810fff..fcdab3d757 100644 --- a/apis/ops/v1alpha1/memcached_ops_types.go +++ b/apis/ops/v1alpha1/memcached_ops_types.go @@ -56,9 +56,6 @@ type MemcachedOpsRequestSpec struct { Type MemcachedOpsRequestType `json:"type"` // Specifies information necessary for upgrading Memcached UpdateVersion *MemcachedUpdateVersionSpec `json:"updateVersion,omitempty"` - // Specifies information necessary for upgrading Memcached - // Deprecated: use UpdateVersion - Upgrade *MemcachedUpdateVersionSpec `json:"upgrade,omitempty"` // Specifies information necessary for horizontal scaling HorizontalScaling *MemcachedHorizontalScalingSpec `json:"horizontalScaling,omitempty"` // Specifies information necessary for vertical scaling @@ -77,7 +74,7 @@ type MemcachedOpsRequestSpec struct { } // +kubebuilder:validation:Enum=Upgrade;UpdateVersion;HorizontalScaling;VerticalScaling;VolumeExpansion;Restart;Reconfigure;ReconfigureTLS -// ENUM(Upgrade, UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS) +// ENUM(UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS) type MemcachedOpsRequestType string // MemcachedReplicaReadinessCriteria is the criteria for checking readiness of a Memcached pod diff --git a/apis/ops/v1alpha1/memcached_ops_types_enum.go b/apis/ops/v1alpha1/memcached_ops_types_enum.go index cd4b61d8ba..c77ec8a96b 100644 --- a/apis/ops/v1alpha1/memcached_ops_types_enum.go +++ b/apis/ops/v1alpha1/memcached_ops_types_enum.go @@ -12,8 +12,6 @@ import ( ) const ( - // MemcachedOpsRequestTypeUpgrade is a MemcachedOpsRequestType of type Upgrade. - MemcachedOpsRequestTypeUpgrade MemcachedOpsRequestType = "Upgrade" // MemcachedOpsRequestTypeUpdateVersion is a MemcachedOpsRequestType of type UpdateVersion. MemcachedOpsRequestTypeUpdateVersion MemcachedOpsRequestType = "UpdateVersion" // MemcachedOpsRequestTypeHorizontalScaling is a MemcachedOpsRequestType of type HorizontalScaling. @@ -33,7 +31,6 @@ const ( var ErrInvalidMemcachedOpsRequestType = fmt.Errorf("not a valid MemcachedOpsRequestType, try [%s]", strings.Join(_MemcachedOpsRequestTypeNames, ", ")) var _MemcachedOpsRequestTypeNames = []string{ - string(MemcachedOpsRequestTypeUpgrade), string(MemcachedOpsRequestTypeUpdateVersion), string(MemcachedOpsRequestTypeHorizontalScaling), string(MemcachedOpsRequestTypeVerticalScaling), @@ -53,7 +50,6 @@ func MemcachedOpsRequestTypeNames() []string { // MemcachedOpsRequestTypeValues returns a list of the values for MemcachedOpsRequestType func MemcachedOpsRequestTypeValues() []MemcachedOpsRequestType { return []MemcachedOpsRequestType{ - MemcachedOpsRequestTypeUpgrade, MemcachedOpsRequestTypeUpdateVersion, MemcachedOpsRequestTypeHorizontalScaling, MemcachedOpsRequestTypeVerticalScaling, @@ -77,7 +73,6 @@ func (x MemcachedOpsRequestType) IsValid() bool { } var _MemcachedOpsRequestTypeValue = map[string]MemcachedOpsRequestType{ - "Upgrade": MemcachedOpsRequestTypeUpgrade, "UpdateVersion": MemcachedOpsRequestTypeUpdateVersion, "HorizontalScaling": MemcachedOpsRequestTypeHorizontalScaling, "VerticalScaling": MemcachedOpsRequestTypeVerticalScaling, diff --git a/apis/ops/v1alpha1/mongodb_ops_helpers.go b/apis/ops/v1alpha1/mongodb_ops_helpers.go index a9ea5ea527..e9a056f73e 100644 --- a/apis/ops/v1alpha1/mongodb_ops_helpers.go +++ b/apis/ops/v1alpha1/mongodb_ops_helpers.go @@ -63,21 +63,6 @@ func (m *MongoDBOpsRequest) GetObjectMeta() metav1.ObjectMeta { return m.ObjectMeta } -func (m MongoDBOpsRequest) GetRequestType() any { - switch m.Spec.Type { - case MongoDBOpsRequestTypeUpgrade: - return MongoDBOpsRequestTypeUpdateVersion - } - return m.Spec.Type -} - -func (m MongoDBOpsRequest) GetUpdateVersionSpec() *MongoDBUpdateVersionSpec { - if m.Spec.UpdateVersion != nil { - return m.Spec.UpdateVersion - } - return m.Spec.Upgrade -} - func (m *MongoDBOpsRequest) GetDBRefName() string { return m.Spec.DatabaseRef.Name } diff --git a/apis/ops/v1alpha1/mongodb_ops_types.go b/apis/ops/v1alpha1/mongodb_ops_types.go index 7634e27029..4998e93f0e 100644 --- a/apis/ops/v1alpha1/mongodb_ops_types.go +++ b/apis/ops/v1alpha1/mongodb_ops_types.go @@ -57,9 +57,6 @@ type MongoDBOpsRequestSpec struct { Type MongoDBOpsRequestType `json:"type"` // Specifies information necessary for upgrading MongoDB UpdateVersion *MongoDBUpdateVersionSpec `json:"updateVersion,omitempty"` - // Specifies information necessary for upgrading MongoDB - // Deprecated: use UpdateVersion - Upgrade *MongoDBUpdateVersionSpec `json:"upgrade,omitempty"` // Specifies information necessary for horizontal scaling HorizontalScaling *MongoDBHorizontalScalingSpec `json:"horizontalScaling,omitempty"` // Specifies information necessary for vertical scaling @@ -85,7 +82,7 @@ type MongoDBOpsRequestSpec struct { } // +kubebuilder:validation:Enum=Upgrade;UpdateVersion;HorizontalScaling;VerticalScaling;VolumeExpansion;Restart;Reconfigure;ReconfigureTLS;Reprovision -// ENUM(Upgrade, UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS, Reprovision) +// ENUM(UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS, Reprovision) type MongoDBOpsRequestType string // MongoDBReplicaReadinessCriteria is the criteria for checking readiness of a MongoDB pod diff --git a/apis/ops/v1alpha1/mongodb_ops_types_enum.go b/apis/ops/v1alpha1/mongodb_ops_types_enum.go index 3e965356d5..753e525190 100644 --- a/apis/ops/v1alpha1/mongodb_ops_types_enum.go +++ b/apis/ops/v1alpha1/mongodb_ops_types_enum.go @@ -12,8 +12,6 @@ import ( ) const ( - // MongoDBOpsRequestTypeUpgrade is a MongoDBOpsRequestType of type Upgrade. - MongoDBOpsRequestTypeUpgrade MongoDBOpsRequestType = "Upgrade" // MongoDBOpsRequestTypeUpdateVersion is a MongoDBOpsRequestType of type UpdateVersion. MongoDBOpsRequestTypeUpdateVersion MongoDBOpsRequestType = "UpdateVersion" // MongoDBOpsRequestTypeHorizontalScaling is a MongoDBOpsRequestType of type HorizontalScaling. @@ -35,7 +33,6 @@ const ( var ErrInvalidMongoDBOpsRequestType = fmt.Errorf("not a valid MongoDBOpsRequestType, try [%s]", strings.Join(_MongoDBOpsRequestTypeNames, ", ")) var _MongoDBOpsRequestTypeNames = []string{ - string(MongoDBOpsRequestTypeUpgrade), string(MongoDBOpsRequestTypeUpdateVersion), string(MongoDBOpsRequestTypeHorizontalScaling), string(MongoDBOpsRequestTypeVerticalScaling), @@ -56,7 +53,6 @@ func MongoDBOpsRequestTypeNames() []string { // MongoDBOpsRequestTypeValues returns a list of the values for MongoDBOpsRequestType func MongoDBOpsRequestTypeValues() []MongoDBOpsRequestType { return []MongoDBOpsRequestType{ - MongoDBOpsRequestTypeUpgrade, MongoDBOpsRequestTypeUpdateVersion, MongoDBOpsRequestTypeHorizontalScaling, MongoDBOpsRequestTypeVerticalScaling, @@ -81,7 +77,6 @@ func (x MongoDBOpsRequestType) IsValid() bool { } var _MongoDBOpsRequestTypeValue = map[string]MongoDBOpsRequestType{ - "Upgrade": MongoDBOpsRequestTypeUpgrade, "UpdateVersion": MongoDBOpsRequestTypeUpdateVersion, "HorizontalScaling": MongoDBOpsRequestTypeHorizontalScaling, "VerticalScaling": MongoDBOpsRequestTypeVerticalScaling, diff --git a/apis/ops/v1alpha1/mysql_ops_helpers.go b/apis/ops/v1alpha1/mysql_ops_helpers.go index 52d24fe096..cd93ddb91d 100644 --- a/apis/ops/v1alpha1/mysql_ops_helpers.go +++ b/apis/ops/v1alpha1/mysql_ops_helpers.go @@ -64,21 +64,6 @@ func (m *MySQLOpsRequest) GetObjectMeta() metav1.ObjectMeta { return m.ObjectMeta } -func (m MySQLOpsRequest) GetRequestType() any { - switch m.Spec.Type { - case MySQLOpsRequestTypeUpgrade: - return MySQLOpsRequestTypeUpdateVersion - } - return m.Spec.Type -} - -func (m MySQLOpsRequest) GetUpdateVersionSpec() *MySQLUpdateVersionSpec { - if m.Spec.UpdateVersion != nil { - return m.Spec.UpdateVersion - } - return m.Spec.Upgrade -} - func (m *MySQLOpsRequest) GetDBRefName() string { return m.Spec.DatabaseRef.Name } diff --git a/apis/ops/v1alpha1/mysql_ops_types.go b/apis/ops/v1alpha1/mysql_ops_types.go index 54eea91026..fb3b87b973 100644 --- a/apis/ops/v1alpha1/mysql_ops_types.go +++ b/apis/ops/v1alpha1/mysql_ops_types.go @@ -57,9 +57,6 @@ type MySQLOpsRequestSpec struct { Type MySQLOpsRequestType `json:"type"` // Specifies information necessary for upgrading MySQL UpdateVersion *MySQLUpdateVersionSpec `json:"updateVersion,omitempty"` - // Specifies information necessary for upgrading MySQL - // Deprecated: use UpdateVersion - Upgrade *MySQLUpdateVersionSpec `json:"upgrade,omitempty"` // Specifies information necessary for horizontal scaling HorizontalScaling *MySQLHorizontalScalingSpec `json:"horizontalScaling,omitempty"` // Specifies information necessary for vertical scaling @@ -80,7 +77,7 @@ type MySQLOpsRequestSpec struct { } // +kubebuilder:validation:Enum=Upgrade;UpdateVersion;HorizontalScaling;VerticalScaling;VolumeExpansion;Restart;Reconfigure;ReconfigureTLS -// ENUM(Upgrade, UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS) +// ENUM(UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS) type MySQLOpsRequestType string // MySQLReplicaReadinessCriteria is the criteria for checking readiness of a MySQL pod diff --git a/apis/ops/v1alpha1/mysql_ops_types_enum.go b/apis/ops/v1alpha1/mysql_ops_types_enum.go index c8a707fb2e..7b9950f965 100644 --- a/apis/ops/v1alpha1/mysql_ops_types_enum.go +++ b/apis/ops/v1alpha1/mysql_ops_types_enum.go @@ -12,8 +12,6 @@ import ( ) const ( - // MySQLOpsRequestTypeUpgrade is a MySQLOpsRequestType of type Upgrade. - MySQLOpsRequestTypeUpgrade MySQLOpsRequestType = "Upgrade" // MySQLOpsRequestTypeUpdateVersion is a MySQLOpsRequestType of type UpdateVersion. MySQLOpsRequestTypeUpdateVersion MySQLOpsRequestType = "UpdateVersion" // MySQLOpsRequestTypeHorizontalScaling is a MySQLOpsRequestType of type HorizontalScaling. @@ -33,7 +31,6 @@ const ( var ErrInvalidMySQLOpsRequestType = fmt.Errorf("not a valid MySQLOpsRequestType, try [%s]", strings.Join(_MySQLOpsRequestTypeNames, ", ")) var _MySQLOpsRequestTypeNames = []string{ - string(MySQLOpsRequestTypeUpgrade), string(MySQLOpsRequestTypeUpdateVersion), string(MySQLOpsRequestTypeHorizontalScaling), string(MySQLOpsRequestTypeVerticalScaling), @@ -53,7 +50,6 @@ func MySQLOpsRequestTypeNames() []string { // MySQLOpsRequestTypeValues returns a list of the values for MySQLOpsRequestType func MySQLOpsRequestTypeValues() []MySQLOpsRequestType { return []MySQLOpsRequestType{ - MySQLOpsRequestTypeUpgrade, MySQLOpsRequestTypeUpdateVersion, MySQLOpsRequestTypeHorizontalScaling, MySQLOpsRequestTypeVerticalScaling, @@ -77,7 +73,6 @@ func (x MySQLOpsRequestType) IsValid() bool { } var _MySQLOpsRequestTypeValue = map[string]MySQLOpsRequestType{ - "Upgrade": MySQLOpsRequestTypeUpgrade, "UpdateVersion": MySQLOpsRequestTypeUpdateVersion, "HorizontalScaling": MySQLOpsRequestTypeHorizontalScaling, "VerticalScaling": MySQLOpsRequestTypeVerticalScaling, diff --git a/apis/ops/v1alpha1/openapi_generated.go b/apis/ops/v1alpha1/openapi_generated.go index b6ed5696e1..fb0e752320 100644 --- a/apis/ops/v1alpha1/openapi_generated.go +++ b/apis/ops/v1alpha1/openapi_generated.go @@ -22370,12 +22370,6 @@ func schema_apimachinery_apis_ops_v1alpha1_ElasticsearchOpsRequestSpec(ref commo Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.ElasticsearchUpdateVersionSpec"), }, }, - "upgrade": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies information necessary for upgrading Elasticsearch Deprecated: use UpdateVersion", - Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.ElasticsearchUpdateVersionSpec"), - }, - }, "horizontalScaling": { SchemaProps: spec.SchemaProps{ Description: "Specifies information necessary for horizontal scaling", @@ -23658,12 +23652,6 @@ func schema_apimachinery_apis_ops_v1alpha1_MariaDBOpsRequestSpec(ref common.Refe Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.MariaDBUpdateVersionSpec"), }, }, - "upgrade": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies information necessary for upgrading MariaDB Deprecated: use UpdateVersion", - Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.MariaDBUpdateVersionSpec"), - }, - }, "horizontalScaling": { SchemaProps: spec.SchemaProps{ Description: "Specifies information necessary for horizontal scaling", @@ -24046,12 +24034,6 @@ func schema_apimachinery_apis_ops_v1alpha1_MemcachedOpsRequestSpec(ref common.Re Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.MemcachedUpdateVersionSpec"), }, }, - "upgrade": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies information necessary for upgrading Memcached Deprecated: use UpdateVersion", - Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.MemcachedUpdateVersionSpec"), - }, - }, "horizontalScaling": { SchemaProps: spec.SchemaProps{ Description: "Specifies information necessary for horizontal scaling", @@ -24432,12 +24414,6 @@ func schema_apimachinery_apis_ops_v1alpha1_MongoDBOpsRequestSpec(ref common.Refe Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.MongoDBUpdateVersionSpec"), }, }, - "upgrade": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies information necessary for upgrading MongoDB Deprecated: use UpdateVersion", - Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.MongoDBUpdateVersionSpec"), - }, - }, "horizontalScaling": { SchemaProps: spec.SchemaProps{ Description: "Specifies information necessary for horizontal scaling", @@ -24875,12 +24851,6 @@ func schema_apimachinery_apis_ops_v1alpha1_MySQLOpsRequestSpec(ref common.Refere Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.MySQLUpdateVersionSpec"), }, }, - "upgrade": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies information necessary for upgrading MySQL Deprecated: use UpdateVersion", - Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.MySQLUpdateVersionSpec"), - }, - }, "horizontalScaling": { SchemaProps: spec.SchemaProps{ Description: "Specifies information necessary for horizontal scaling", @@ -25396,12 +25366,6 @@ func schema_apimachinery_apis_ops_v1alpha1_PerconaXtraDBOpsRequestSpec(ref commo Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.PerconaXtraDBUpdateVersionSpec"), }, }, - "upgrade": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies information necessary for upgrading PerconaXtraDB Deprecated: use UpdateVersion", - Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.PerconaXtraDBUpdateVersionSpec"), - }, - }, "horizontalScaling": { SchemaProps: spec.SchemaProps{ Description: "Specifies information necessary for horizontal scaling", @@ -26115,12 +26079,6 @@ func schema_apimachinery_apis_ops_v1alpha1_PostgresOpsRequestSpec(ref common.Ref Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresUpdateVersionSpec"), }, }, - "upgrade": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies information necessary for upgrading Postgres Deprecated: use UpdateVersion", - Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresUpdateVersionSpec"), - }, - }, "horizontalScaling": { SchemaProps: spec.SchemaProps{ Description: "Specifies information necessary for horizontal scaling", diff --git a/apis/ops/v1alpha1/perconaxtradb_ops_helpers.go b/apis/ops/v1alpha1/perconaxtradb_ops_helpers.go index 9f6b3782d3..ee3462a055 100644 --- a/apis/ops/v1alpha1/perconaxtradb_ops_helpers.go +++ b/apis/ops/v1alpha1/perconaxtradb_ops_helpers.go @@ -63,21 +63,6 @@ func (p *PerconaXtraDBOpsRequest) GetObjectMeta() metav1.ObjectMeta { return p.ObjectMeta } -func (p PerconaXtraDBOpsRequest) GetRequestType() any { - switch p.Spec.Type { - case PerconaXtraDBOpsRequestTypeUpgrade: - return PerconaXtraDBOpsRequestTypeUpdateVersion - } - return p.Spec.Type -} - -func (p PerconaXtraDBOpsRequest) GetUpdateVersionSpec() *PerconaXtraDBUpdateVersionSpec { - if p.Spec.UpdateVersion != nil { - return p.Spec.UpdateVersion - } - return p.Spec.Upgrade -} - func (p *PerconaXtraDBOpsRequest) GetDBRefName() string { return p.Spec.DatabaseRef.Name } diff --git a/apis/ops/v1alpha1/perconaxtradb_ops_types.go b/apis/ops/v1alpha1/perconaxtradb_ops_types.go index cb056b76e2..9bca199efb 100644 --- a/apis/ops/v1alpha1/perconaxtradb_ops_types.go +++ b/apis/ops/v1alpha1/perconaxtradb_ops_types.go @@ -57,9 +57,6 @@ type PerconaXtraDBOpsRequestSpec struct { Type PerconaXtraDBOpsRequestType `json:"type"` // Specifies information necessary for upgrading PerconaXtraDB UpdateVersion *PerconaXtraDBUpdateVersionSpec `json:"updateVersion,omitempty"` - // Specifies information necessary for upgrading PerconaXtraDB - // Deprecated: use UpdateVersion - Upgrade *PerconaXtraDBUpdateVersionSpec `json:"upgrade,omitempty"` // Specifies information necessary for horizontal scaling HorizontalScaling *PerconaXtraDBHorizontalScalingSpec `json:"horizontalScaling,omitempty"` // Specifies information necessary for vertical scaling @@ -80,7 +77,7 @@ type PerconaXtraDBOpsRequestSpec struct { } // +kubebuilder:validation:Enum=Upgrade;UpdateVersion;HorizontalScaling;VerticalScaling;VolumeExpansion;Restart;Reconfigure;ReconfigureTLS -// ENUM(Upgrade, UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS) +// ENUM(UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS) type PerconaXtraDBOpsRequestType string // PerconaXtraDBReplicaReadinessCriteria is the criteria for checking readiness of an PerconaXtraDB database diff --git a/apis/ops/v1alpha1/perconaxtradb_ops_types_enum.go b/apis/ops/v1alpha1/perconaxtradb_ops_types_enum.go index 5a2dbe71fd..36637c5b59 100644 --- a/apis/ops/v1alpha1/perconaxtradb_ops_types_enum.go +++ b/apis/ops/v1alpha1/perconaxtradb_ops_types_enum.go @@ -12,8 +12,6 @@ import ( ) const ( - // PerconaXtraDBOpsRequestTypeUpgrade is a PerconaXtraDBOpsRequestType of type Upgrade. - PerconaXtraDBOpsRequestTypeUpgrade PerconaXtraDBOpsRequestType = "Upgrade" // PerconaXtraDBOpsRequestTypeUpdateVersion is a PerconaXtraDBOpsRequestType of type UpdateVersion. PerconaXtraDBOpsRequestTypeUpdateVersion PerconaXtraDBOpsRequestType = "UpdateVersion" // PerconaXtraDBOpsRequestTypeHorizontalScaling is a PerconaXtraDBOpsRequestType of type HorizontalScaling. @@ -33,7 +31,6 @@ const ( var ErrInvalidPerconaXtraDBOpsRequestType = fmt.Errorf("not a valid PerconaXtraDBOpsRequestType, try [%s]", strings.Join(_PerconaXtraDBOpsRequestTypeNames, ", ")) var _PerconaXtraDBOpsRequestTypeNames = []string{ - string(PerconaXtraDBOpsRequestTypeUpgrade), string(PerconaXtraDBOpsRequestTypeUpdateVersion), string(PerconaXtraDBOpsRequestTypeHorizontalScaling), string(PerconaXtraDBOpsRequestTypeVerticalScaling), @@ -53,7 +50,6 @@ func PerconaXtraDBOpsRequestTypeNames() []string { // PerconaXtraDBOpsRequestTypeValues returns a list of the values for PerconaXtraDBOpsRequestType func PerconaXtraDBOpsRequestTypeValues() []PerconaXtraDBOpsRequestType { return []PerconaXtraDBOpsRequestType{ - PerconaXtraDBOpsRequestTypeUpgrade, PerconaXtraDBOpsRequestTypeUpdateVersion, PerconaXtraDBOpsRequestTypeHorizontalScaling, PerconaXtraDBOpsRequestTypeVerticalScaling, @@ -77,7 +73,6 @@ func (x PerconaXtraDBOpsRequestType) IsValid() bool { } var _PerconaXtraDBOpsRequestTypeValue = map[string]PerconaXtraDBOpsRequestType{ - "Upgrade": PerconaXtraDBOpsRequestTypeUpgrade, "UpdateVersion": PerconaXtraDBOpsRequestTypeUpdateVersion, "HorizontalScaling": PerconaXtraDBOpsRequestTypeHorizontalScaling, "VerticalScaling": PerconaXtraDBOpsRequestTypeVerticalScaling, diff --git a/apis/ops/v1alpha1/pgbouncer_ops_helpers.go b/apis/ops/v1alpha1/pgbouncer_ops_helpers.go index 4ee52ba3c1..b01b786583 100644 --- a/apis/ops/v1alpha1/pgbouncer_ops_helpers.go +++ b/apis/ops/v1alpha1/pgbouncer_ops_helpers.go @@ -63,14 +63,6 @@ func (p *PgBouncerOpsRequest) GetObjectMeta() metav1.ObjectMeta { return p.ObjectMeta } -func (p PgBouncerOpsRequest) GetRequestType() any { - return p.Spec.Type -} - -func (p PgBouncerOpsRequest) GetUpdateVersionSpec() *PgBouncerUpdateVersionSpec { - return p.Spec.UpdateVersion -} - func (p *PgBouncerOpsRequest) GetDBRefName() string { return p.Spec.ServerRef.Name } diff --git a/apis/ops/v1alpha1/postgres_ops_helpers.go b/apis/ops/v1alpha1/postgres_ops_helpers.go index 8679b82003..dbbb1d761a 100644 --- a/apis/ops/v1alpha1/postgres_ops_helpers.go +++ b/apis/ops/v1alpha1/postgres_ops_helpers.go @@ -63,21 +63,6 @@ func (p *PostgresOpsRequest) GetObjectMeta() metav1.ObjectMeta { return p.ObjectMeta } -func (p PostgresOpsRequest) GetRequestType() any { - switch p.Spec.Type { - case PostgresOpsRequestTypeUpgrade: - return PostgresOpsRequestTypeUpdateVersion - } - return p.Spec.Type -} - -func (p PostgresOpsRequest) GetUpdateVersionSpec() *PostgresUpdateVersionSpec { - if p.Spec.UpdateVersion != nil { - return p.Spec.UpdateVersion - } - return p.Spec.Upgrade -} - func (p *PostgresOpsRequest) GetDBRefName() string { return p.Spec.DatabaseRef.Name } diff --git a/apis/ops/v1alpha1/postgres_ops_types.go b/apis/ops/v1alpha1/postgres_ops_types.go index 87255cdf44..f2312d6175 100644 --- a/apis/ops/v1alpha1/postgres_ops_types.go +++ b/apis/ops/v1alpha1/postgres_ops_types.go @@ -70,9 +70,6 @@ type PostgresOpsRequestSpec struct { Type PostgresOpsRequestType `json:"type"` // Specifies information necessary for upgrading Postgres UpdateVersion *PostgresUpdateVersionSpec `json:"updateVersion,omitempty"` - // Specifies information necessary for upgrading Postgres - // Deprecated: use UpdateVersion - Upgrade *PostgresUpdateVersionSpec `json:"upgrade,omitempty"` // Specifies information necessary for horizontal scaling HorizontalScaling *PostgresHorizontalScalingSpec `json:"horizontalScaling,omitempty"` // Specifies information necessary for vertical scaling @@ -93,7 +90,7 @@ type PostgresOpsRequestSpec struct { } // +kubebuilder:validation:Enum=Upgrade;UpdateVersion;HorizontalScaling;VerticalScaling;VolumeExpansion;Restart;Reconfigure;ReconfigureTLS -// ENUM(Upgrade, UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS) +// ENUM(UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS) type PostgresOpsRequestType string type PostgresUpdateVersionSpec struct { diff --git a/apis/ops/v1alpha1/postgres_ops_types_enum.go b/apis/ops/v1alpha1/postgres_ops_types_enum.go index 1194026ba9..4ec97d61ba 100644 --- a/apis/ops/v1alpha1/postgres_ops_types_enum.go +++ b/apis/ops/v1alpha1/postgres_ops_types_enum.go @@ -12,8 +12,6 @@ import ( ) const ( - // PostgresOpsRequestTypeUpgrade is a PostgresOpsRequestType of type Upgrade. - PostgresOpsRequestTypeUpgrade PostgresOpsRequestType = "Upgrade" // PostgresOpsRequestTypeUpdateVersion is a PostgresOpsRequestType of type UpdateVersion. PostgresOpsRequestTypeUpdateVersion PostgresOpsRequestType = "UpdateVersion" // PostgresOpsRequestTypeHorizontalScaling is a PostgresOpsRequestType of type HorizontalScaling. @@ -33,7 +31,6 @@ const ( var ErrInvalidPostgresOpsRequestType = fmt.Errorf("not a valid PostgresOpsRequestType, try [%s]", strings.Join(_PostgresOpsRequestTypeNames, ", ")) var _PostgresOpsRequestTypeNames = []string{ - string(PostgresOpsRequestTypeUpgrade), string(PostgresOpsRequestTypeUpdateVersion), string(PostgresOpsRequestTypeHorizontalScaling), string(PostgresOpsRequestTypeVerticalScaling), @@ -53,7 +50,6 @@ func PostgresOpsRequestTypeNames() []string { // PostgresOpsRequestTypeValues returns a list of the values for PostgresOpsRequestType func PostgresOpsRequestTypeValues() []PostgresOpsRequestType { return []PostgresOpsRequestType{ - PostgresOpsRequestTypeUpgrade, PostgresOpsRequestTypeUpdateVersion, PostgresOpsRequestTypeHorizontalScaling, PostgresOpsRequestTypeVerticalScaling, @@ -77,7 +73,6 @@ func (x PostgresOpsRequestType) IsValid() bool { } var _PostgresOpsRequestTypeValue = map[string]PostgresOpsRequestType{ - "Upgrade": PostgresOpsRequestTypeUpgrade, "UpdateVersion": PostgresOpsRequestTypeUpdateVersion, "HorizontalScaling": PostgresOpsRequestTypeHorizontalScaling, "VerticalScaling": PostgresOpsRequestTypeVerticalScaling, diff --git a/apis/ops/v1alpha1/proxysql_ops_helpers.go b/apis/ops/v1alpha1/proxysql_ops_helpers.go index 0ca26db7e0..c778c34293 100644 --- a/apis/ops/v1alpha1/proxysql_ops_helpers.go +++ b/apis/ops/v1alpha1/proxysql_ops_helpers.go @@ -59,14 +59,6 @@ func (p *ProxySQLOpsRequest) GetObjectMeta() metav1.ObjectMeta { return p.ObjectMeta } -func (p ProxySQLOpsRequest) GetRequestType() any { - return p.Spec.Type -} - -func (p ProxySQLOpsRequest) GetUpdateVersionSpec() *ProxySQLUpdateVersionSpec { - return p.Spec.UpdateVersion -} - func (p *ProxySQLOpsRequest) GetDBRefName() string { return p.Spec.ProxyRef.Name } diff --git a/apis/ops/v1alpha1/redis_ops_helpers.go b/apis/ops/v1alpha1/redis_ops_helpers.go index b88736bf75..19e24d11e0 100644 --- a/apis/ops/v1alpha1/redis_ops_helpers.go +++ b/apis/ops/v1alpha1/redis_ops_helpers.go @@ -63,14 +63,6 @@ func (r *RedisOpsRequest) GetObjectMeta() metav1.ObjectMeta { return r.ObjectMeta } -func (r RedisOpsRequest) GetRequestType() any { - return r.Spec.Type -} - -func (r RedisOpsRequest) GetUpdateVersionSpec() *RedisUpdateVersionSpec { - return r.Spec.UpdateVersion -} - func (r *RedisOpsRequest) GetDBRefName() string { return r.Spec.DatabaseRef.Name } diff --git a/apis/ops/v1alpha1/redis_sentinel_ops_helpers.go b/apis/ops/v1alpha1/redis_sentinel_ops_helpers.go index 261b038aa2..d68a85b0c7 100644 --- a/apis/ops/v1alpha1/redis_sentinel_ops_helpers.go +++ b/apis/ops/v1alpha1/redis_sentinel_ops_helpers.go @@ -63,14 +63,6 @@ func (r *RedisSentinelOpsRequest) GetObjectMeta() metav1.ObjectMeta { return r.ObjectMeta } -func (r RedisSentinelOpsRequest) GetRequestType() any { - return r.Spec.Type -} - -func (r RedisSentinelOpsRequest) GetUpdateVersionSpec() *RedisSentinelUpdateVersionSpec { - return r.Spec.UpdateVersion -} - func (r *RedisSentinelOpsRequest) GetDBRefName() string { return r.Spec.DatabaseRef.Name } diff --git a/apis/ops/v1alpha1/type.go b/apis/ops/v1alpha1/type.go index 7b5ebc5904..fa41c87625 100644 --- a/apis/ops/v1alpha1/type.go +++ b/apis/ops/v1alpha1/type.go @@ -98,7 +98,6 @@ const ( type Accessor interface { GetObjectMeta() metav1.ObjectMeta GetDBRefName() string - GetRequestType() any GetStatus() OpsRequestStatus SetStatus(_ OpsRequestStatus) } diff --git a/apis/ops/v1alpha1/zz_generated.deepcopy.go b/apis/ops/v1alpha1/zz_generated.deepcopy.go index 50068e7ece..d77f82930c 100644 --- a/apis/ops/v1alpha1/zz_generated.deepcopy.go +++ b/apis/ops/v1alpha1/zz_generated.deepcopy.go @@ -274,11 +274,6 @@ func (in *ElasticsearchOpsRequestSpec) DeepCopyInto(out *ElasticsearchOpsRequest *out = new(ElasticsearchUpdateVersionSpec) **out = **in } - if in.Upgrade != nil { - in, out := &in.Upgrade, &out.Upgrade - *out = new(ElasticsearchUpdateVersionSpec) - **out = **in - } if in.HorizontalScaling != nil { in, out := &in.HorizontalScaling, &out.HorizontalScaling *out = new(ElasticsearchHorizontalScalingSpec) @@ -1312,11 +1307,6 @@ func (in *MariaDBOpsRequestSpec) DeepCopyInto(out *MariaDBOpsRequestSpec) { *out = new(MariaDBUpdateVersionSpec) **out = **in } - if in.Upgrade != nil { - in, out := &in.Upgrade, &out.Upgrade - *out = new(MariaDBUpdateVersionSpec) - **out = **in - } if in.HorizontalScaling != nil { in, out := &in.HorizontalScaling, &out.HorizontalScaling *out = new(MariaDBHorizontalScalingSpec) @@ -1606,11 +1596,6 @@ func (in *MemcachedOpsRequestSpec) DeepCopyInto(out *MemcachedOpsRequestSpec) { *out = new(MemcachedUpdateVersionSpec) (*in).DeepCopyInto(*out) } - if in.Upgrade != nil { - in, out := &in.Upgrade, &out.Upgrade - *out = new(MemcachedUpdateVersionSpec) - (*in).DeepCopyInto(*out) - } if in.HorizontalScaling != nil { in, out := &in.HorizontalScaling, &out.HorizontalScaling *out = new(MemcachedHorizontalScalingSpec) @@ -1918,11 +1903,6 @@ func (in *MongoDBOpsRequestSpec) DeepCopyInto(out *MongoDBOpsRequestSpec) { *out = new(MongoDBUpdateVersionSpec) **out = **in } - if in.Upgrade != nil { - in, out := &in.Upgrade, &out.Upgrade - *out = new(MongoDBUpdateVersionSpec) - **out = **in - } if in.HorizontalScaling != nil { in, out := &in.HorizontalScaling, &out.HorizontalScaling *out = new(MongoDBHorizontalScalingSpec) @@ -2264,11 +2244,6 @@ func (in *MySQLOpsRequestSpec) DeepCopyInto(out *MySQLOpsRequestSpec) { *out = new(MySQLUpdateVersionSpec) (*in).DeepCopyInto(*out) } - if in.Upgrade != nil { - in, out := &in.Upgrade, &out.Upgrade - *out = new(MySQLUpdateVersionSpec) - (*in).DeepCopyInto(*out) - } if in.HorizontalScaling != nil { in, out := &in.HorizontalScaling, &out.HorizontalScaling *out = new(MySQLHorizontalScalingSpec) @@ -2625,11 +2600,6 @@ func (in *PerconaXtraDBOpsRequestSpec) DeepCopyInto(out *PerconaXtraDBOpsRequest *out = new(PerconaXtraDBUpdateVersionSpec) **out = **in } - if in.Upgrade != nil { - in, out := &in.Upgrade, &out.Upgrade - *out = new(PerconaXtraDBUpdateVersionSpec) - **out = **in - } if in.HorizontalScaling != nil { in, out := &in.HorizontalScaling, &out.HorizontalScaling *out = new(PerconaXtraDBHorizontalScalingSpec) @@ -3165,11 +3135,6 @@ func (in *PostgresOpsRequestSpec) DeepCopyInto(out *PostgresOpsRequestSpec) { *out = new(PostgresUpdateVersionSpec) **out = **in } - if in.Upgrade != nil { - in, out := &in.Upgrade, &out.Upgrade - *out = new(PostgresUpdateVersionSpec) - **out = **in - } if in.HorizontalScaling != nil { in, out := &in.HorizontalScaling, &out.HorizontalScaling *out = new(PostgresHorizontalScalingSpec) diff --git a/crds/ops.kubedb.com_elasticsearchopsrequests.yaml b/crds/ops.kubedb.com_elasticsearchopsrequests.yaml index a3352a917c..a898c42c59 100644 --- a/crds/ops.kubedb.com_elasticsearchopsrequests.yaml +++ b/crds/ops.kubedb.com_elasticsearchopsrequests.yaml @@ -244,11 +244,6 @@ spec: targetVersion: type: string type: object - upgrade: - properties: - targetVersion: - type: string - type: object verticalScaling: properties: exporter: diff --git a/crds/ops.kubedb.com_mariadbopsrequests.yaml b/crds/ops.kubedb.com_mariadbopsrequests.yaml index dadc8ab427..85b5939437 100644 --- a/crds/ops.kubedb.com_mariadbopsrequests.yaml +++ b/crds/ops.kubedb.com_mariadbopsrequests.yaml @@ -207,11 +207,6 @@ spec: targetVersion: type: string type: object - upgrade: - properties: - targetVersion: - type: string - type: object verticalScaling: properties: coordinator: diff --git a/crds/ops.kubedb.com_memcachedopsrequests.yaml b/crds/ops.kubedb.com_memcachedopsrequests.yaml index 80f464ed30..8584e7d5e8 100644 --- a/crds/ops.kubedb.com_memcachedopsrequests.yaml +++ b/crds/ops.kubedb.com_memcachedopsrequests.yaml @@ -183,13 +183,6 @@ spec: targetVersion: type: string type: object - upgrade: - properties: - readinessCriteria: - type: object - targetVersion: - type: string - type: object verticalScaling: properties: readinessCriteria: diff --git a/crds/ops.kubedb.com_mongodbopsrequests.yaml b/crds/ops.kubedb.com_mongodbopsrequests.yaml index e2cf502ca5..ef21a8ff3c 100644 --- a/crds/ops.kubedb.com_mongodbopsrequests.yaml +++ b/crds/ops.kubedb.com_mongodbopsrequests.yaml @@ -349,11 +349,6 @@ spec: targetVersion: type: string type: object - upgrade: - properties: - targetVersion: - type: string - type: object verticalScaling: properties: arbiter: diff --git a/crds/ops.kubedb.com_mysqlopsrequests.yaml b/crds/ops.kubedb.com_mysqlopsrequests.yaml index c9909e43bb..2b41bfe0b0 100644 --- a/crds/ops.kubedb.com_mysqlopsrequests.yaml +++ b/crds/ops.kubedb.com_mysqlopsrequests.yaml @@ -202,13 +202,6 @@ spec: targetVersion: type: string type: object - upgrade: - properties: - readinessCriteria: - type: object - targetVersion: - type: string - type: object verticalScaling: properties: coordinator: diff --git a/crds/ops.kubedb.com_perconaxtradbopsrequests.yaml b/crds/ops.kubedb.com_perconaxtradbopsrequests.yaml index 5deed27e69..d1d1ade9c4 100644 --- a/crds/ops.kubedb.com_perconaxtradbopsrequests.yaml +++ b/crds/ops.kubedb.com_perconaxtradbopsrequests.yaml @@ -207,11 +207,6 @@ spec: targetVersion: type: string type: object - upgrade: - properties: - targetVersion: - type: string - type: object verticalScaling: properties: coordinator: diff --git a/crds/ops.kubedb.com_postgresopsrequests.yaml b/crds/ops.kubedb.com_postgresopsrequests.yaml index 48df4a95ce..2ad32cd9a5 100644 --- a/crds/ops.kubedb.com_postgresopsrequests.yaml +++ b/crds/ops.kubedb.com_postgresopsrequests.yaml @@ -225,11 +225,6 @@ spec: targetVersion: type: string type: object - upgrade: - properties: - targetVersion: - type: string - type: object verticalScaling: properties: coordinator: