Skip to content

Commit

Permalink
Merge pull request #93 from calmkart/hotfix
Browse files Browse the repository at this point in the history
FIX:fix the headless service forward twice bug
  • Loading branch information
cjimti authored Nov 14, 2019
2 parents 58f1568 + 3172cd5 commit 6a375ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/kubefwd/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,12 @@ func fwdServices(opts FwdServiceOpts) error {
}
}

podLoop(pods.Items[:1], false)

// headless service portforward all pods.
// normal service portforward the first pod.
if svc.Spec.ClusterIP == "None" {
podLoop(pods.Items, true)
} else {
podLoop([]v1.Pod{pods.Items[0]}, false)
}

}
Expand Down

0 comments on commit 6a375ee

Please sign in to comment.