Skip to content

Commit 2b0761d

Browse files
committed
update const
Signed-off-by: SK Ali Arman <[email protected]>
1 parent 4640394 commit 2b0761d

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

apis/kubedb/constants.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,20 @@ const (
398398
MariaDBDistributedVolumeCapacityGetCommand = "get-volume-capacity"
399399
MariaDBDistributedBackupCommand = "take-backup"
400400
MariaDBDistributedRestoreCommand = "restore-backup"
401+
PVCRestorerSuffix = "pvc-restorer"
402+
MariaDBXtraBackupInfoFile = "/var/lib/mysql/mariadb_backup_binlog_info"
403+
MariaDBBackupInfoFile = "/var/lib/mysql/xtrabackup_binlog_info"
404+
405+
// Distributed Archiver
406+
BackupsessionAnnotation = "kubestash.com/backupsession"
407+
RestoresessionAnnotation = "kubestash.com/restoresession"
408+
BackupconfigurationAnnotation = "kubestash.com/backupconfiguration"
409+
DistributedSnapshotinfoAnnotation = "kubestash.com/distributedsnapshotinfo"
410+
SnapshotsKey = "snapshots"
411+
RestoreSessionKey = "restoresession"
412+
DistributedArchiverBackupCMNameSuffix = "backup"
413+
DistributedArchiverRestoreCMNameSuffix = "restore"
414+
DistributedArchiverSnapshotCMNameSuffix = "snapshots"
401415

402416
// Maxscale
403417
MaxscaleCommonName = "mx"

apis/kubedb/v1/mariadb_helpers.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ func (m MariaDB) OffshootMaxscaleLabels() map[string]string {
114114
return m.offshootLabels(m.OffshootMaxscaleSelectors(), nil)
115115
}
116116

117+
func (m MariaDB) GetPVCRestoreSessionName(ordinal int) string {
118+
return fmt.Sprintf("%s-%s-%v-%s", kubedb.DefaultVolumeClaimTemplateName, m.Name, ordinal, kubedb.PVCRestorerSuffix)
119+
}
120+
117121
func (m MariaDB) PodLabels() map[string]string {
118122
return m.offshootLabels(m.OffshootSelectors(), m.Spec.PodTemplate.Labels)
119123
}

pkg/utils/grpc/mariadb/protogen/api.pb.go

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

pkg/utils/grpc/mariadb/protogen/api_grpc.pb.go

Lines changed: 1 addition & 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)