mirror of
https://github.com/rancher/norman.git
synced 2025-08-31 14:51:57 +00:00
Adding code to address aks timeout issue
This commit is contained in:
committed by
Craig Jellick
parent
9ba19df9be
commit
61998c76e3
@@ -16,7 +16,11 @@ func clientDial(dialer Dialer, conn *connection, message *message) {
|
||||
)
|
||||
|
||||
if dialer == nil {
|
||||
netConn, err = net.DialTimeout(message.proto, message.address, time.Duration(message.deadline)*time.Millisecond)
|
||||
netDialer := &net.Dialer{
|
||||
Timeout: time.Duration(message.deadline) * time.Millisecond,
|
||||
KeepAlive: 30 * time.Second,
|
||||
}
|
||||
netConn, err = netDialer.Dial(message.proto, message.address)
|
||||
} else {
|
||||
netConn, err = dialer(message.proto, message.address)
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ func UnversionedRESTClientFor(config *rest.Config) (rest.Interface, error) {
|
||||
}
|
||||
|
||||
newConfig := *config
|
||||
newConfig.Timeout = time.Hour
|
||||
newConfig.Timeout = 30 * time.Minute
|
||||
watchClient, err := rest.UnversionedRESTClientFor(&newConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@@ -256,7 +256,7 @@ func (s *Store) realWatch(apiContext *types.APIContext, schema *types.Schema, op
|
||||
k8sClient = watchClient.WatchClient()
|
||||
}
|
||||
|
||||
timeout := int64(60 * 60)
|
||||
timeout := int64(60 * 30)
|
||||
req := s.common(namespace, k8sClient.Get())
|
||||
req.VersionedParams(&metav1.ListOptions{
|
||||
Watch: true,
|
||||
|
Reference in New Issue
Block a user