Override scaleset client timeout to avoid long controller stalls

This commit is contained in:
Antoine Deschênes 2026-04-24 09:20:34 -04:00
parent 13a03302c8
commit 7f31ad0bf9
1 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import (
"net/url"
"strconv"
"sync"
"time"
"github.com/actions/actions-runner-controller/apis/actions.github.com/v1alpha1/appconfig"
"github.com/actions/actions-runner-controller/build"
@ -135,7 +136,10 @@ func (o *ClientForOptions) newClient() (*scaleset.Client, error) {
Subsystem: "gha-scale-set-controller",
}
var options []scaleset.HTTPOption
options := []scaleset.HTTPOption{
scaleset.WithTimeout(30 * time.Second),
scaleset.WithRetryMax(2),
}
if o.RootCAs != nil {
options = append(options, scaleset.WithRootCAs(o.RootCAs))
}