feat(pprof): support Temporal Server pprof profiling via spec.pprof - #29
Open
Azerothian wants to merge 1 commit into
Open
feat(pprof): support Temporal Server pprof profiling via spec.pprof#29Azerothian wants to merge 1 commit into
Azerothian wants to merge 1 commit into
Conversation
Add an opt-in, cluster-wide spec.pprof block (enabled/port/host). When enabled the operator renders the temporal global.pprof config, declares a 'pprof' container port on every temporal service pod, and the webhook rejects any pprof port that collides with a service rpc/membership/http or metrics port. Defaults: port 7936, host 127.0.0.1 (reachable via kubectl port-forward without publishing on the pod network). Disabled by default to avoid exposing unauthenticated profiles. Refs #16
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
Adds opt-in support for Temporal Server's pprof profiling endpoint to the operator.
Closes #16.
What changed
spec.pprof(new, default-off): cluster-wide block withenabled,port(default7936), andhost(default127.0.0.1).global.pprofblock into the generated server config (all services share it).pprofcontainer port on every temporal service pod (frontend, internal-frontend, history, matching, worker), reachable viakubectl port-forward.rpc/membership/httpport or themetricsport.docs/features/pprof.mdpage.Rationale
pprof is the standard way to profile live Temporal components while debugging production memory/CPU issues. It is off by default because it serves unauthenticated profiles; binding defaults to loopback so nothing is exposed on the pod network unless the user opts in with
host: 0.0.0.0.Verification
go build ./...— passesgo vet ./...— passesKUBEBUILDER_ASSETSprovisioned): all packages pass, including newTestPProfSpecAccessors,TestPProfDefaults,TestValidatePProf, andTestConfigPProf{Disabled,Enabled}.kind); controller/suite tests pass under envtest.