Add a flag for enabling pprof on the controller manager (#4449)
(gha) E2E Tests / default-setup (push) Has been cancelled
(gha) E2E Tests / default-setup-v2 (push) Has been cancelled
(gha) E2E Tests / single-namespace-setup (push) Has been cancelled
(gha) E2E Tests / single-namespace-setup-v2 (push) Has been cancelled
(gha) E2E Tests / dind-mode-setup (push) Has been cancelled
(gha) E2E Tests / dind-mode-setup-v2 (push) Has been cancelled
(gha) E2E Tests / kubernetes-mode-setup (push) Has been cancelled
(gha) E2E Tests / kubernetes-mode-setup-v2 (push) Has been cancelled
(gha) E2E Tests / auth-proxy-setup (push) Has been cancelled
(gha) E2E Tests / auth-proxy-setup-v2 (push) Has been cancelled
(gha) E2E Tests / anonymous-proxy-setup (push) Has been cancelled
(gha) E2E Tests / anonymous-proxy-setup-v2 (push) Has been cancelled
(gha) E2E Tests / self-signed-ca-setup (push) Has been cancelled
(gha) E2E Tests / self-signed-ca-setup-v2 (push) Has been cancelled
(gha) E2E Tests / update-strategy-tests (push) Has been cancelled
(gha) E2E Tests / update-strategy-tests-v2 (push) Has been cancelled
(gha) E2E Tests / init-with-min-runners (push) Has been cancelled
(gha) E2E Tests / init-with-min-runners-v2 (push) Has been cancelled
(gha) Validate Helm Charts / Lint Chart (push) Has been cancelled
(gha) Validate Helm Charts / Test Chart (push) Has been cancelled
Publish Canary Images / Build and Publish Legacy Canary Image (push) Has been cancelled
Publish Canary Images / Build and Publish gha-runner-scale-set-controller Canary Image (push) Has been cancelled
Run CodeQL / Analyze (push) Has been cancelled
Go / fmt (push) Has been cancelled
Go / lint (push) Has been cancelled
Go / generate (push) Has been cancelled
Go / mocks (push) Has been cancelled
Go / test (push) Has been cancelled

This commit is contained in:
Junya Okabe
2026-04-24 10:03:26 +02:00
committed by GitHub
parent a401686bd5
commit 13a03302c8
3 changed files with 19 additions and 2 deletions
@@ -84,6 +84,9 @@ spec:
- "--listener-metrics-endpoint="
- "--metrics-addr=0"
{{- end }}
{{- if .Values.pprof.addr }}
- "--pprof-addr={{ .Values.pprof.addr }}"
{{- end }}
{{- range .Values.flags.excludeLabelPropagationPrefixes }}
- "--exclude-label-propagation-prefix={{ . }}"
{{- end }}
@@ -100,12 +103,19 @@ spec:
{{- end }}
command:
- "/manager"
{{- with .Values.metrics }}
{{- if or .Values.metrics .Values.pprof.addr }}
ports:
- containerPort: {{regexReplaceAll ":([0-9]+)" .controllerManagerAddr "${1}"}}
{{- end }}
{{- with .Values.metrics }}
- containerPort: {{ required "Values.metrics.controllerManagerAddr must end with a numeric port" (regexFind "[0-9]+$" .controllerManagerAddr) }}
protocol: TCP
name: metrics
{{- end }}
{{- if .Values.pprof.addr }}
- containerPort: {{ required "Values.pprof.addr must end with a numeric port" (regexFind "[0-9]+$" .Values.pprof.addr) }}
protocol: TCP
name: pprof
{{- end }}
env:
- name: CONTROLLER_MANAGER_CONTAINER_IMAGE
value: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
@@ -94,6 +94,10 @@ priorityClassName: ""
# listenerAddr: ":8080"
# listenerEndpoint: "/metrics"
## To enable pprof, uncomment the addr field below.
pprof: {}
# addr: ":6060"
flags:
## Log level can be set here with one of the following values: "debug", "info", "warn", "error".
## Defaults to "debug".