Documentation
¶
Overview ¶
Package pprof serves Go profiles on a dedicated, opt-in listener.
It is OFF unless an address is configured, and the address it is meant to carry is a loopback one. Both choices are about what a heap dump contains: this agent's heap holds unredacted Secret values from the state watcher's informer cache and raw log lines from every collected pod. A profile endpoint is therefore an exfiltration path for exactly the data the agent exists to handle carefully, and it must not be reachable from the cluster network.
Binding 127.0.0.1 is what makes that true while keeping the endpoint usable: `kubectl port-forward` attaches to the pod's own network namespace, so an operator holding pods/portforward RBAC still reaches it and nothing else on the network does. For the same reason the chart neither publishes this port on the Service nor declares it as a containerPort -- both would advertise an exposure that is not intended.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves /debug/pprof on its own listener.
func NewServer ¶
NewServer returns a profile server bound to addr, or nil when addr is empty.
A nil Server is the disabled case and every method tolerates it, so callers wire it up unconditionally and the "off" path costs one nil check rather than a branch at every use.