File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -414,12 +414,11 @@ func (b *requestPatchBuilder) Build(cli rest.Interface) Requester {
414414 comps = append (comps , "namespaces" , b .namespace )
415415 }
416416
417- // Generate random suffix based on keySpaceSize
418- randomInt , _ := rand .Int (rand .Reader , big .NewInt (int64 (b .keySpaceSize )))
419- suffix := randomInt .Int64 ()
420-
421- // Create final resource name: name-{suffix}
422- finalName := fmt .Sprintf ("%s-%d" , b .name , suffix )
417+ finalName := b .name
418+ if b .keySpaceSize > 0 {
419+ randomInt , _ := rand .Int (rand .Reader , big .NewInt (int64 (b .keySpaceSize )))
420+ finalName = fmt .Sprintf ("%s-%d" , b .name , randomInt .Int64 ())
421+ }
423422 comps = append (comps , b .resource , finalName )
424423
425424 return & DiscardRequester {
You can’t perform that action at this time.
0 commit comments