Skip to content

Commit 836e463

Browse files
author
jmccormick2001
committed
shorten restore job name to avoid exceeding the kube label length limit
1 parent b97e52b commit 836e463

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

operator/backrest/restore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func Restore(restclient *rest.RESTClient, namespace string, clientset *kubernete
145145

146146
workflowID := task.Spec.Parameters[crv1.PgtaskWorkflowID]
147147
jobFields := restorejobTemplateFields{
148-
JobName: "backrest-restore-" + task.Spec.Parameters[util.LABEL_BACKREST_RESTORE_FROM_CLUSTER] + "-to-" + pvcName,
148+
JobName: "restore-" + task.Spec.Parameters[util.LABEL_BACKREST_RESTORE_FROM_CLUSTER] + "-" + util.RandStringBytesRmndr(4),
149149
ClusterName: task.Spec.Parameters[util.LABEL_BACKREST_RESTORE_FROM_CLUSTER],
150150
SecurityContext: util.CreateSecContext(storage.Fsgroup, storage.SupplementalGroups),
151151
ToClusterPVCName: pvcName,

0 commit comments

Comments
 (0)