-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add a flag for enabling pprof on the controller manager #4449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -84,6 +84,9 @@ spec: | |||||||||||||||||||||||||
| - "--listener-metrics-endpoint=" | ||||||||||||||||||||||||||
| - "--metrics-addr=0" | ||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||
| {{- with .Values.pprof }} | ||||||||||||||||||||||||||
| - "--pprof-addr={{ .addr }}" | ||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||
|
Comment on lines
+87
to
+89
|
||||||||||||||||||||||||||
| {{- range .Values.flags.excludeLabelPropagationPrefixes }} | ||||||||||||||||||||||||||
| - "--exclude-label-propagation-prefix={{ . }}" | ||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||
|
|
@@ -95,12 +98,19 @@ spec: | |||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||
| command: | ||||||||||||||||||||||||||
| - "/manager" | ||||||||||||||||||||||||||
| {{- with .Values.metrics }} | ||||||||||||||||||||||||||
| {{- if or .Values.metrics .Values.pprof }} | ||||||||||||||||||||||||||
| ports: | ||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||
| {{- with .Values.metrics }} | ||||||||||||||||||||||||||
| - containerPort: {{regexReplaceAll ":([0-9]+)" .controllerManagerAddr "${1}"}} | ||||||||||||||||||||||||||
| protocol: TCP | ||||||||||||||||||||||||||
| name: metrics | ||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||
| {{- with .Values.pprof }} | ||||||||||||||||||||||||||
| - containerPort: {{regexReplaceAll ":([0-9]+)" .addr "${1}"}} | ||||||||||||||||||||||||||
|
Comment on lines
105
to
+110
|
||||||||||||||||||||||||||
| - containerPort: {{regexReplaceAll ":([0-9]+)" .controllerManagerAddr "${1}"}} | |
| protocol: TCP | |
| name: metrics | |
| {{- end }} | |
| {{- with .Values.pprof }} | |
| - containerPort: {{regexReplaceAll ":([0-9]+)" .addr "${1}"}} | |
| - containerPort: {{ required "Values.metrics.controllerManagerAddr must end with a numeric port" (regexFind "[0-9]+$" .controllerManagerAddr) }} | |
| protocol: TCP | |
| name: metrics | |
| {{- end }} | |
| {{- with .Values.pprof }} | |
| - containerPort: {{ required "Values.pprof.addr must end with a numeric port" (regexFind "[0-9]+$" .addr) }} |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -94,6 +94,10 @@ priorityClassName: "" | |||||
| # listenerAddr: ":8080" | ||||||
| # listenerEndpoint: "/metrics" | ||||||
|
|
||||||
| ## To enable pprof, uncomment the following lines. | ||||||
| # pprof: | ||||||
| # addr: ":6060" | ||||||
|
||||||
| # addr: ":6060" | |
| # addr: "127.0.0.1:6060" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
with .Values.pprofblock will render--pprof-addr={{ .addr }}even ifaddris unset/empty (e.g.pprof: {}), which can produce--pprof-addr=<no value>and later an invalidcontainerPort. Consider conditioning on.Values.pprof.addrand/or usingrequiredto ensureaddris provided when pprof is configured.