Created
January 6, 2026 12:22
-
-
Save rikatz/f5a07945038f705c9d10625eceb99932 to your computer and use it in GitHub Desktop.
Istio remote debugging patches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pilot/docker/Dockerfile.pilot b/pilot/docker/Dockerfile.pilot | |
| index e5d6bca10c..62bdf954bc 100644 | |
| --- a/pilot/docker/Dockerfile.pilot | |
| +++ b/pilot/docker/Dockerfile.pilot | |
| @@ -8,6 +8,9 @@ ARG ISTIO_BASE_REGISTRY=gcr.io/istio-release | |
| # The following section is used as base image if BASE_DISTRIBUTION=debug | |
| FROM ${ISTIO_BASE_REGISTRY}/base:${BASE_VERSION} AS debug | |
| +FROM golang:1.25 AS dlv | |
| +RUN go install github.com/go-delve/delve/cmd/dlv@latest | |
| + | |
| # The following section is used as base image if BASE_DISTRIBUTION=distroless | |
| FROM ${ISTIO_BASE_REGISTRY}/distroless:${BASE_VERSION} AS distroless | |
| @@ -17,7 +20,9 @@ FROM ${BASE_DISTRIBUTION:-debug} | |
| ARG TARGETARCH | |
| COPY ${TARGETARCH:-amd64}/pilot-discovery /usr/local/bin/pilot-discovery | |
| +COPY --from=dlv /go/bin/dlv /usr/local/bin/dlv | |
| USER 1337:1337 | |
| -ENTRYPOINT ["/usr/local/bin/pilot-discovery"] | |
| +EXPOSE 40000 | |
| +ENTRYPOINT ["/usr/local/bin/dlv", "--continue", "--accept-multiclient", "--listen=:40000", "--check-go-version=false", "--headless=true", "--api-version=2", "--log=true", "--log-output=debugger,debuglineerr,gdbwire,lldbout,rpc", "exec", "/usr/local/bin/pilot-discovery", "--"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment