Skip to content

Commit

Permalink
Merge pull request #1442 from dgageot/remove-spurious-warn
Browse files Browse the repository at this point in the history
Remove spurious warning
  • Loading branch information
dgageot authored Jan 9, 2019
2 parents cd4aeef + aae371e commit 3795677
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 3795677

Please sign in to comment.