gerlowskija commented on a change in pull request #302: URL: https://github.com/apache/solr-operator/pull/302#discussion_r706104773
########## File path: api/v1beta1/solrcloud_types.go ########## @@ -325,20 +329,158 @@ type SolrEphemeralDataStorageOptions struct { EmptyDir *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"` } +func (backupOptions *SolrBackupRestoreOptions) IsManaged() bool { + return true +} + +func (backupOptions *SolrBackupRestoreOptions) GetVolumeSource() corev1.VolumeSource { + return *backupOptions.Volume +} + +func (backupOptions *SolrBackupRestoreOptions) GetDirectory() string { + return backupOptions.Directory +} + +func (backupOptions *SolrBackupRestoreOptions) GetSolrMountPath() string { + return BaseBackupRestorePath +} + +func (backupOptions *SolrBackupRestoreOptions) GetInitPodMountPath() string { + return BackupRestoreInitContainerPath +} + +func (backupOptions *SolrBackupRestoreOptions) GetBackupPath(backupName string) string { + return backupOptions.GetSolrMountPath() + "/backups/" + backupName +} + +func (backupOptions *SolrBackupRestoreOptions) GetVolumeName() string { + return BackupRestoreVolume +} + type SolrBackupRestoreOptions struct { + // TODO Do we need to support this (Volume) here for backcompat, or can it live exclusively in ManagedStorage? Review comment: Just to double-check: when you say "auto-move" you're suggesting that early in its processing loop the operator would restructure and 'SolrBackupRestoreOptions' it sees so that any value held by 'Value' here is moved over to be a 'ManagedRepository' entry. (And that way the rest of the operator can ignore the 'Volume' field). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org