Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ const (
// informerSyncTimeoutDuration is the maximum duration of time allowed
// for the informers to sync to prevent the controller from hanging indefinitely.
informerSyncTimeoutDuration = 60 * time.Second

// deploymentRecordClientTimeoutSeconds sets the HTTP timeout for calls to the
// deployment record API. The timeout is generous to accommodate longer running
// calls like posting a cluster job.
deploymentRecordClientTimeoutSeconds = 30
)

type ttlCache interface {
Expand Down Expand Up @@ -133,6 +138,7 @@ func New(clientset kubernetes.Interface, metadataAggregator podMetadataAggregato
cfg.GHAppPrivateKeyPath,
))
}
clientOpts = append(clientOpts, deploymentrecord.WithTimeout(deploymentRecordClientTimeoutSeconds))

apiClient, err := deploymentrecord.NewClient(
cfg.BaseURL,
Expand Down