Skip to content

Commit

Permalink
fix(expose): add debugging information for when ssh tunnel transport …
Browse files Browse the repository at this point in the history
…dies (#25)
  • Loading branch information
jaredallard authored Dec 2, 2020
1 parent 5e0d7cf commit f83b964
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/function61/gokit v0.0.0-20200923114939-f8d7e065a5c3
github.com/go-logr/logr v0.3.0
github.com/golang/protobuf v1.4.3
github.com/imdario/mergo v0.3.8
github.com/imdario/mergo v0.3.8 // indirect
github.com/metal-stack/go-ipam v1.7.0
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.7.0
Expand Down
5 changes: 4 additions & 1 deletion internal/expose/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ func (p *ServiceForward) createTransport(ctx context.Context, po *corev1.Pod, lo
fw.Ready = make(chan struct{})

//nolint:errcheck
go fw.ForwardPorts()
go func() {
err := fw.ForwardPorts()
p.c.log.WithField("pod", po.Namespace+"/"+po.Name).WithError(err).Warn("underlying transport for ssh tunnel died, this requires a restart")
}()

p.c.log.Debug("waiting for transport to be marked as ready")
select {
Expand Down

0 comments on commit f83b964

Please sign in to comment.