soluble-ai / kubetap

Kubectl plugin to interactively proxy Kubernetes Services with ease
https://soluble-ai.github.io/kubetap/
Apache License 2.0
548 stars 44 forks source link

Add an flag setting kubetap-mitmproxy repo to pull #17

Open mengzyou opened 2 years ago

mengzyou commented 2 years ago

Feature Description

Kubetap is a great tool to debug web application running k8s cluster.
But it's depend on a kubetap-mitmproxy image default from gcr.io registry.
I'm in China, and can not access to gcr.io normally, so allways fails when I execute kubectl tap on command.

Failed to pull image "gcr.io/soluble-oss/kubetap-mitmproxy:latest": rpc error: code = Unknown desc = Error response from daemon: Get https://gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Hope can add an option flag to set this image repo to pull. Then we can push this image to other registry (like dockerhub).

Proposed Solution

Add a flag (for example --proxy-image) to set a image repo replacing default one.

mengzyou commented 2 years ago

Sorry, seems it will use 3 images:

    defaultImageHTTP = "gcr.io/soluble-oss/kubetap-mitmproxy:latest"
    defaultImageRaw  = "gcr.io/soluble-oss/kubetap-raw:latest"
    defaultImageGRPC = "gcr.io/soluble-oss/kubetap-grpc:latest"

Maybe take another solution is adding a flag

--registry=[gcr|dockerhub|...]

and sync the images to other registies.