In case of tap re-run, update the config and start a proxy

This commit is contained in:
M. Mert Yildiran
2023-09-25 23:21:38 +03:00
parent 41dacbff1a
commit 5bd44b57f4
7 changed files with 94 additions and 18 deletions

View File

@@ -106,7 +106,7 @@ func getRerouteHttpHandlerSelfStatic(proxyHandler http.Handler, selfNamespace st
}
func NewPortForward(kubernetesProvider *Provider, namespace string, podRegex *regexp.Regexp, srcPort uint16, dstPort uint16, ctx context.Context) (*portforward.PortForwarder, error) {
pods, err := kubernetesProvider.ListPodsByAppLabel(ctx, namespace, map[string]string{"app.kubeshark.co/app": "hub"})
pods, err := kubernetesProvider.ListPodsByAppLabel(ctx, namespace, map[string]string{"app.kubeshark.co/app": "front"})
if err != nil {
return nil, err
} else if len(pods) == 0 {