Repository navigation
fix/resources: Drop unused ports, Services, Role verbs, and settings - #1016
Open
marcleblanc2 wants to merge 7 commits into
Open
marcleblanc2 wants to merge 7 commits into
marcleblanc2 wants to merge 7 commits into
Conversation
Executors stopped serving port 6060 in Sourcegraph 4.1, before this chart existed, so the container port and the Service that fronts it have never had a listener. The chart's probes use pgrep, and executor metrics reach Prometheus through worker's worker-executors Service. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d140-e6de-7173-8b4f-187543b7833c Co-authored-by: Amp <amp@ampcode.com>
marcleblanc2
enabled auto-merge (squash)
November 13, 2026 00:56
Neither port has a listener reachable from outside its pod: - otel-agent zpages binds localhost:55679, so hostPort 55679 only reserved the port on every node - dockerd in the dind sidecar binds 127.0.0.1:2375, and the executor reaches it over localhost Amp-Thread-ID: https://ampcode.com/threads/T-01a1d269-2788-7075-b66b-b87e3087047d Co-authored-by: Amp <amp@ampcode.com>
Nothing ever asked Jaeger for sampling strategies: no Service exposed 5778, Sourcegraph and zoekt used a constant sampler while they had Jaeger clients, and both use OpenTelemetry since Sourcegraph 4.0. jaeger.config.samplingDefaultProbability is removed with it. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d269-2788-7075-b66b-b87e3087047d Co-authored-by: Amp <amp@ampcode.com>
The executor watches Pods, gets pods/log, and creates and deletes Jobs, Secrets, and PVCs. It has not called get or list on Pods, Secrets, or PVCs since Sourcegraph 5.1; 30 days of EKS audit logs on two test instances show no such calls. SRC_TRACE_LOG has been unread since Sourcegraph 5.2. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d269-2788-7075-b66b-b87e3087047d Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a1d269-2788-7075-b66b-b87e3087047d Co-authored-by: Amp <amp@ampcode.com>
The jaeger pod asked Prometheus to scrape port 16686, which serves the UI and returns 404 for /metrics. The kubernetes-services job probed through a blackbox exporter the chart does not ship, and no Service opts in. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d269-2788-7075-b66b-b87e3087047d Co-authored-by: Amp <amp@ampcode.com>
…move-debug-port Amp-Thread-ID: https://ampcode.com/threads/T-01a1d269-2788-7075-b66b-b87e3087047d Co-authored-by: Amp <amp@ampcode.com> # Conflicts: # charts/sourcegraph-executor/CHANGELOG.md # charts/sourcegraph/CHANGELOG.md
marcleblanc2
added a commit
that referenced
this pull request
Nov 13, 2026
…does #1016 deletes the executor-<queueName> Service, which fronts a port the executor has not served since 4.1, and the kubernetes-services scrape job, which probes through a blackbox exporter the chart does not ship. Making the same deletions here keeps this PR and #1016 from conflicting in those files. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d269-2788-7075-b66b-b87e3087047d Co-authored-by: Amp <amp@ampcode.com>
marcleblanc2
added a commit
that referenced
this pull request
Nov 13, 2026
#1016 deletes the executor's http-debug port 6060 and the executor-<queueName> Service in front of it: the executor has not served that port since Sourcegraph 4.1. Making the same deletions here keeps this PR and #1016 from conflicting in those files. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d269-2788-7075-b66b-b87e3087047d Co-authored-by: Amp <amp@ampcode.com>
This was referenced Nov 13, 2026
marcleblanc2
disabled auto-merge
November 13, 2026 05:26
marcleblanc2
added a commit
that referenced
this pull request
Nov 13, 2026
This replaces 4dc65cf, which served Jaeger's metrics on 0.0.0.0:8888 and pointed the pod's prometheus.io/port annotation there. #1016 removes the scrape annotations instead: they pointed at port 16686, which has no /metrics, and Jaeger's own otelcol_* metrics would otherwise mix into the OpenTelemetry Collector dashboards. Making the same change here keeps this PR and #1016 from conflicting in the Jaeger Deployment and the README. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d269-2788-7075-b66b-b87e3087047d Co-authored-by: Amp <amp@ampcode.com>
marcleblanc2
added a commit
that referenced
this pull request
Nov 13, 2026
…does #1016 deletes the executor-<queueName> Service, which fronts a port the executor has not served since 4.1, and the kubernetes-services scrape job, which probes through a blackbox exporter the chart does not ship. Making the same deletions here keeps this PR and #1016 from conflicting in those files. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d269-2788-7075-b66b-b87e3087047d Co-authored-by: Amp <amp@ampcode.com>
marcleblanc2
added a commit
that referenced
this pull request
Nov 13, 2026
This replaces 4dc65cf, which served Jaeger's metrics on 0.0.0.0:8888 and pointed the pod's prometheus.io/port annotation there. #1016 removes the scrape annotations instead: they pointed at port 16686, which has no /metrics, and Jaeger's own otelcol_* metrics would otherwise mix into the OpenTelemetry Collector dashboards. Making the same change here keeps this PR and #1016 from conflicting in the Jaeger Deployment and the README. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d269-2788-7075-b66b-b87e3087047d Co-authored-by: Amp <amp@ampcode.com>
This branch has not been deployed
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
I checked every object, port, and setting the four charts render against what actually uses it, and opened this PR to remove the eight things that are not used
http-debug) and theexecutor-<queueName>Servicegetandliston Pods, Secrets, and PVCs in its RoleSRC_TRACE_LOGin its ConfigMapdindsidecardockerdlistens on127.0.0.1only; the executor reaches it overlocalhostotel-agent: port 55679 (http-zpages) and itshostPortlocalhostonlyremote_samplingextension and port 5778/metrics. The scrape always failedkubernetes-servicesscrape jobblackboxexporter the chart doesn't ship, and no Service opts inThese values go with them and are ignored if still set:
openTelemetry.agent.hostPorts.httpZpages,jaeger.config.samplingDefaultProbability,executor.log.trace, and the undocumentedexecutor.serviceAnnotations,executor.serviceLabels, andexecutor.serviceType.Upgrade impact
executor-<queueName>Serviceotel-agent, andjaegerpods restart oncefrontendwith each heartbeat, and Prometheus scrapes them fromworker-executorsEvidence
mandm5: no process listens on 6060, connecting to the pod or the Service on 6060 fails, andworker-executors:6996/metricsreturns 200mandm5show 365 requests, all create/delete on Jobs and Secrets, watch on Pods, or get onpods/logotel-agent, onm5: listens on127.0.0.1:55679only, and connecting on the pod IP or node IP fails.kubectl port-forwardstill reaches zpages16686/metricsreturns 404lint.sh,helm unittest, and helm-docs pass.helm templateagainstmaindiffers only in the removed linesReview
Reviewed on 2026-11-13 (review thread), at
bc281c3. No open issues.Tested on the EKS test instance
m5, by upgrading frommainto this branch merged ontomain:Forbidden, and a batch spec completes onmainand on this branchotel-agent: only ports 4317, 4318, and 8888 remain, and the node's port 55679 is closedotel-agentnode port shows up in the Jaeger UIkubernetes-servicesjob once the pod restarts, and the other targets are unchanged. Onmainnothing restarts the pod for a config change; Render sourcegraph.labels on every object, and add storage and ServiceAccount labels #1008 and fix/rbac: Fix Prometheus' defaults, privileged: false, and scope discovery down to the same namespace #1015 add thatmainand on this branch (step.docker.step.0.postexits 1), so that is a problem with the test instance, not this PRNot tested: an auto-indexing job (not enabled on the instance), and traces sent by Sourcegraph itself (the instance's collector is configured to log traces, not forward them).
Small ones, none blocking:
zpagesextension still runs inotel-agent, onlocalhostonly