Skip to content

Commit 92da85c

Browse files
authored
fix: increase http client timeout (#98)
1 parent fe863cc commit 92da85c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

internal/controller/controller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ const (
3939
// informerSyncTimeoutDuration is the maximum duration of time allowed
4040
// for the informers to sync to prevent the controller from hanging indefinitely.
4141
informerSyncTimeoutDuration = 60 * time.Second
42+
43+
// deploymentRecordClientTimeoutSeconds sets the HTTP timeout for calls to the
44+
// deployment record API. The timeout is generous to accommodate longer running
45+
// calls like posting a cluster job.
46+
deploymentRecordClientTimeoutSeconds = 30
4247
)
4348

4449
type ttlCache interface {
@@ -133,6 +138,7 @@ func New(clientset kubernetes.Interface, metadataAggregator podMetadataAggregato
133138
cfg.GHAppPrivateKeyPath,
134139
))
135140
}
141+
clientOpts = append(clientOpts, deploymentrecord.WithTimeout(deploymentRecordClientTimeoutSeconds))
136142

137143
apiClient, err := deploymentrecord.NewClient(
138144
cfg.BaseURL,

0 commit comments

Comments
 (0)