mirror of
https://github.com/rancher/norman.git
synced 2025-09-04 16:50:41 +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 {
|
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 {
|
} else {
|
||||||
netConn, err = dialer(message.proto, message.address)
|
netConn, err = dialer(message.proto, message.address)
|
||||||
}
|
}
|
||||||
|
@@ -21,7 +21,7 @@ func UnversionedRESTClientFor(config *rest.Config) (rest.Interface, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
newConfig := *config
|
newConfig := *config
|
||||||
newConfig.Timeout = time.Hour
|
newConfig.Timeout = 30 * time.Minute
|
||||||
watchClient, err := rest.UnversionedRESTClientFor(&newConfig)
|
watchClient, err := rest.UnversionedRESTClientFor(&newConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@@ -256,7 +256,7 @@ func (s *Store) realWatch(apiContext *types.APIContext, schema *types.Schema, op
|
|||||||
k8sClient = watchClient.WatchClient()
|
k8sClient = watchClient.WatchClient()
|
||||||
}
|
}
|
||||||
|
|
||||||
timeout := int64(60 * 60)
|
timeout := int64(60 * 30)
|
||||||
req := s.common(namespace, k8sClient.Get())
|
req := s.common(namespace, k8sClient.Get())
|
||||||
req.VersionedParams(&metav1.ListOptions{
|
req.VersionedParams(&metav1.ListOptions{
|
||||||
Watch: true,
|
Watch: true,
|
||||||
|
Reference in New Issue
Block a user