Skip to content

Commit 263afb4

Browse files
committed
add const for vm prefix
Signed-off-by: Andrey Kolkov <[email protected]>
1 parent 78fd140 commit 263afb4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎internal/backupcontroller/velerostrategy_controller.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ const (
6464
defaultRequeueAfter = 5 * time.Second
6565
defaultActiveJobPollingInterval = defaultRequeueAfter
6666
// Velero requires API objects and secrets to be in the cozy-velero namespace
67-
veleroNamespace = "cozy-velero"
67+
veleroNamespace = "cozy-velero"
68+
virtualMachinePrefix = "virtual-machine-"
6869
)
6970

7071
func storageS3SecretName(namespace, backupJobName string) string {
@@ -631,7 +632,7 @@ func (r *BackupJobReconciler) createVeleroBackup(ctx context.Context, backupJob
631632
VolumeSnapshotLocations: []string{locationName},
632633
LabelSelector: &metav1.LabelSelector{
633634
MatchLabels: map[string]string{
634-
"app.kubernetes.io/instance": "virtual-machine-" + backupJob.Spec.ApplicationRef.Name,
635+
"app.kubernetes.io/instance": virtualMachinePrefix + backupJob.Spec.ApplicationRef.Name,
635636
},
636637
},
637638
},

0 commit comments

Comments
 (0)