Skip to content

Commit

Permalink
Remove spurious warning
Browse files Browse the repository at this point in the history
Signed-off-by: David Gageot <[email protected]>
  • Loading branch information
dgageot committed Jan 8, 2019
1 parent e374ba5 commit aae371e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/skaffold/kubernetes/port_forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,11 @@ func (p *PortForwarder) Start(ctx context.Context) error {
if !ok {
continue
}
// If the event's type is "DELETED", warn and continue.
// If the event's type is "DELETED", continue.
if evt.Type == watch.Deleted {
logrus.Warnf("got unexpected event of type %s for pod %s/%s", evt.Type, pod.Namespace, pod.Name)
continue
}

// At this point, we know the event's type if "ADDED" or "MODIFIED".
// We must take both types into account as it is possible for the pod to have become ready for port-forwarding before we established the watch.
if p.podSelector.Select(pod) && pod.Status.Phase == v1.PodRunning && pod.DeletionTimestamp == nil {
Expand Down

0 comments on commit aae371e

Please sign in to comment.