From 279e3f6130a80f15570304281d6c2678c083e3ee Mon Sep 17 00:00:00 2001 From: Matt Cholick Date: Thu, 16 Nov 2017 08:02:10 -0800 Subject: [PATCH] fix(helm): Tunnel closing already closed channel k8s client-go closes the ready channel that's passed in (see https://github.com/kubernetes/client-go/blob/master/tools/portforward/portforward.go#L171) This means that Tunnel's Close will always panic, as the client-go library will have closed then channel. This isn't reproducible unless helm.Client is externally, as the helm cli runner doesn't actually invoke Close. --- pkg/kube/tunnel.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/kube/tunnel.go b/pkg/kube/tunnel.go index 6da0c4594..08280f25d 100644 --- a/pkg/kube/tunnel.go +++ b/pkg/kube/tunnel.go @@ -59,7 +59,6 @@ func NewTunnel(client rest.Interface, config *rest.Config, namespace, podName st // Close disconnects a tunnel connection func (t *Tunnel) Close() { close(t.stopChan) - close(t.readyChan) } // ForwardPort opens a tunnel to a kubernetes pod