@@ -11,8 +11,6 @@ import (
1111
1212// PerconaServerMongoDBBackupSpec defines the desired state of PerconaServerMongoDBBackup
1313type PerconaServerMongoDBBackupSpec struct {
14- // Deprecated: Use ClusterName instead
15- PSMDBCluster string `json:"psmdbCluster,omitempty"` // TODO: Remove after v1.15
1614 ClusterName string `json:"clusterName,omitempty"`
1715 StorageName string `json:"storageName,omitempty"`
1816 Compression compress.CompressionType `json:"compressionType,omitempty"`
@@ -94,7 +92,7 @@ func (p *PerconaServerMongoDBBackup) CheckFields() error {
9492 return fmt .Errorf ("spec storageName field is empty" )
9593 }
9694 if len (p .Spec .GetClusterName ()) == 0 {
97- return fmt .Errorf ("spec clusterName and deprecated psmdbCluster fields are empty" )
95+ return fmt .Errorf ("spec clusterName is empty" )
9896 }
9997 if string (p .Spec .Type ) == "" {
10098 p .Spec .Type = defs .LogicalBackup
@@ -120,11 +118,7 @@ func (p *PerconaServerMongoDBBackup) IsBackupTypeIncrementalBase() bool {
120118 return p .Spec .Type == BackupTypeIncrementalBase
121119}
122120
123- // GetClusterName returns ClusterName if it's not empty. Otherwise, it will return PSMDBCluster.
124- // TODO: Remove after v1.15
121+ // GetClusterName returns ClusterName.
125122func (p * PerconaServerMongoDBBackupSpec ) GetClusterName () string {
126- if len (p .ClusterName ) > 0 {
127- return p .ClusterName
128- }
129- return p .PSMDBCluster
123+ return p .ClusterName
130124}
0 commit comments