Update mizu.go

This commit is contained in:
up9-github 2021-04-22 13:22:30 +03:00
parent 6c4c67734a
commit cab2af7df1

View File

@ -25,10 +25,11 @@ func Run(podRegex *regexp.Regexp) {
go createPodAndPortForward(ctx, kubernetesProvider, cancel, podName) //TODO convert this to job for built in pod ttl or have the running app handle this
go watchPodsForTapping(ctx, kubernetesProvider, cancel, podRegex)
waitForFinish(ctx, cancel)
waitForFinish(ctx, cancel) //block until exit signal or error
// TODO handle incoming traffic from tapper using a channel
//cleanup
fmt.Printf("\nremoving pod %s\n", podName)
removalCtx, _ := context.WithTimeout(context.Background(), 2 * time.Second)
kubernetesProvider.RemovePod(removalCtx, podName)