Skip to content

Commit

Permalink
Fix out of bound
Browse files Browse the repository at this point in the history
Signed-off-by: Florent Poinsard <[email protected]>
  • Loading branch information
frouioui committed Jun 3, 2024
1 parent 1458329 commit 290b3a1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ func (r *ReconcileVitessBackupsSchedule) getVtctldServiceName(ctx context.Contex
}

if len(svcList.Items) > 0 {
service := svcList.Items[rand.IntN(len(svcList.Items)-1)]
service := svcList.Items[rand.IntN(len(svcList.Items))]
svcName = service.Name
for _, port := range service.Spec.Ports {
if port.Name == planetscalev2.DefaultGrpcPortName {
Expand Down

0 comments on commit 290b3a1

Please sign in to comment.