Repository navigation
feat: monitor source-deployment probes against local app - #9
Merged
Merged
Conversation
vercel-eddie
force-pushed
the
eddie/probe-monitoring
branch
from
May 20, 2026 17:05
5382fe2 to
a0a40ee
Compare
vercel-eddie
force-pushed
the
eddie/probe-monitoring
branch
4 times, most recently
from
May 20, 2026 17:37
0d34126 to
34c4c96
Compare
Carry the source deployment's liveness, readiness, and startup probes through to the interceptor and run them continuously against the developer's local app inside the devcontainer. Surface the latest results through a new InterceptorService.GetStatus RPC so the CLI can report whether the local app is matching the cluster's expected health contract. - proxy.proto: add Probe + HTTPGet/TCPSocket/GRPC/Exec actions to GetMetadataResponse, plus source_app_port hint for port remapping. - interceptor.proto: new InterceptorService with GetStatus returning ProbeStatus per probe (pending/healthy/unhealthy + counters). - pkg/k8s/resources: convert corev1.Probe -> bridge.v1.Probe in injectProxyImage, JSON-encode via protojson, pass as CLI flags on the bridge server before nulling out the original probes. - pkg/proxy: accept and serve the probes via GetMetadata. - pkg/probe: per-probe Monitor goroutine implementing HTTP, TCP, gRPC health, and Exec checks with configurable timing/thresholds. - pkg/commands/intercept: build monitors from GetMetadata, applying source_app_port -> --app-port remap when the probe targets the primary port. - pkg/commands/intercept_health: interceptServer implements InterceptorService, surfacing each monitor's current ProbeStatus. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vercel-eddie
force-pushed
the
eddie/probe-monitoring
branch
from
May 20, 2026 18:27
34c4c96 to
b91084c
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
InterceptorServicewithGetStatusthat surfaces the live result of running the source deployment's liveness / readiness / startup probes against the developer's local app inside the devcontainer.GetMetadatafrom the proxy and run them on a per-probepkg/probeMonitor goroutine.--app-portlocally; other ports (e.g. dedicated/healthzports) pass through.Architecture
What's in this PR
Probe+HTTPGetAction/TCPSocketAction/GRPCAction/ExecAction/HTTPHeader; new fields onGetMetadataResponse:source_app_port,liveness_probe,readiness_probe,startup_probe.InterceptorService.GetStatus,ProbeStatus,ProbeHealthenum.convertProbe(corev1.Probe → bridge.v1.Probe), named-port resolution, JSON-encoded flag emission.injectProxyImagecaptures the source's probes before clobbering them and threads--liveness-probe/--readiness-probe/--startup-probe/--source-app-portinto the proxy command.proxy.Config.GetMetadata.Status()snapshot viaproto.Clone.source_app_port → --app-port).interceptServerimplementsInterceptorService;GetStatusreturnsReady+ per-probeProbeStatus.Design notes
pkg/probe): HTTP (2xx/3xx success, follows headers, TLS skip for local self-signed dev), TCP (dial-and-close), gRPC (usesgrpc_health_v1with optional service name), Exec (exec.CommandContext, exit code 0 = healthy).source_app_port(the source's first non-grpc port). The interceptor only remaps when a probe targets exactly that port — management ports (e.g./metricson 9090) keep their original target so health checks against dedicated endpoints still work.corev1defaults so behaviour is identical to in-cluster.GetStatusis safe to poll; it returns aproto.Cloneof the cached status (no fresh probe runs triggered).PROBE_HEALTH_PENDINGuntil enough consecutive successes/failures meet the thresholds.Test plan
go test ./pkg/...— all passprimaryAppPortcorner cases,injectProxyImageemits the new flags.GetStatusbefore ready, after ready + one monitor, all three monitors attached.bridge create -c userservice, run the local app,bridge execagainst the interceptor'sGetStatus(or curl the intercept gRPC) and confirm probe statuses match.🤖 Generated with Claude Code