Skip to content

Commit

Permalink
Handle port forwarding rules in sequence (#4053)
Browse files Browse the repository at this point in the history
First, user defined rules.
Then, automatic rules.

Fixes #3563

Signed-off-by: David Gageot <[email protected]>
  • Loading branch information
dgageot authored Apr 30, 2020
1 parent d82eb3c commit cfe85f6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/skaffold/kubernetes/portforward/resource_forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ func (p *ResourceForwarder) Start(ctx context.Context) error {

// Port forward each resource individually in a goroutine
func (p *ResourceForwarder) portForwardResources(ctx context.Context, resources []*latest.PortForwardResource) {
for _, r := range resources {
r := r
go func() {
go func() {
for _, r := range resources {
p.portForwardResource(ctx, *r)
}()
}
}
}()
}

func (p *ResourceForwarder) portForwardResource(ctx context.Context, resource latest.PortForwardResource) {
Expand Down

0 comments on commit cfe85f6

Please sign in to comment.