You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a new service comes up but the pods are still starting up, I get a no pods error as the watcher tries too quickly to start forwarding ports. I added a retry and fixes it for me. Is this something I could PR or is there a better solution?
func (svcFwd*ServiceFWD) SyncPodForwards(forcebool) {
sync:=func() {
deferfunc() { svcFwd.LastSyncedAt=time.Now() }()
vark8sPods []v1.Pod;
fori:=1; i<=3||len(k8sPods) >0; i++ {
k8sPods=svcFwd.GetPodsForService()
iflen(k8sPods) >0 {
break;
}
log.Debugf("No Running Pods returned for service %s, attempt %d", svcFwd, i)
time.Sleep(5*time.Second)
}
// If no pods are found currently. Will try again next re-sync period.iflen(k8sPods) ==0 {
log.Warnf("WARNING: No Running Pods returned for service %s", svcFwd)
return
}
....
The text was updated successfully, but these errors were encountered:
When a new service comes up but the pods are still starting up, I get a no pods error as the watcher tries too quickly to start forwarding ports. I added a retry and fixes it for me. Is this something I could PR or is there a better solution?
The text was updated successfully, but these errors were encountered: