Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit

Permalink
Merge pull request #103 from storageos/kube-client-timeout
Browse files Browse the repository at this point in the history
Set timeout for kube client just to be sure
  • Loading branch information
nolancon authored Nov 12, 2021
2 parents d069578 + 59d2729 commit a930e68
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,11 @@ func main() {
}
}

restConfig := ctrl.GetConfigOrDie()
restConfig.Timeout = time.Minute

// Only attempt to grab leader lock once we have an API connection.
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
mgr, err := ctrl.NewManager(restConfig, ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
Port: 9443,
Expand Down

0 comments on commit a930e68

Please sign in to comment.