Skip to content

Commit

Permalink
Merge pull request txn2#117 from calmkart/master
Browse files Browse the repository at this point in the history
FIX: waiting for pod runnning, watch event.Object bug
  • Loading branch information
cjimti authored Apr 21, 2020
2 parents 40d3afb + 5f059eb commit c46c6c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/fwdport/fwdport.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ func (pfo *PortForwardOpts) WaitForPodRunning(signalsChan chan struct{}) (*v1.Po
// watcher until the pod status is running
for {
event, ok := <-watcher.ResultChan()
if !ok {
if !ok || event.Type == "ERROR" {
break
}
if event.Object != nil {
if event.Object != nil && event.Type == "MODIFIED" {
changedPod := event.Object.(*v1.Pod)
if changedPod.Status.Phase == v1.PodRunning {
return changedPod, nil
Expand Down

0 comments on commit c46c6c9

Please sign in to comment.