Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Go profiling (pprof) to the trivy-operator by introducing a new configuration option that allows users to specify a bind address for the pprof HTTP server. This enables developers and operators to collect runtime profiling data for performance analysis and debugging.
- Added
OPERATOR_PPROF_BIND_ADDRESSenvironment variable to control pprof server binding - Integrated pprof configuration into the operator startup logic with conditional enabling
- Updated documentation and deployment configurations to include the new setting
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/operator/etc/config.go | Adds PprofBindAddress field to operator configuration struct |
| pkg/operator/operator.go | Implements pprof setup logic with conditional enabling based on configuration |
| docs/getting-started/installation/configuration.md | Documents the new pprof configuration option and fixes grammar issues |
| deploy/static/trivy-operator.yaml | Adds default empty value for pprof bind address in static deployment |
| deploy/helm/templates/configmaps/trivy-operator-config.yaml | Includes pprof configuration in Helm template |
|
@afdesk can you take a look? |
afdesk
left a comment
There was a problem hiding this comment.
LGTM, I left a small comment
| OPERATOR_METRICS_FINDINGS_ENABLED: {{ .Values.operator.metricsFindingsEnabled | quote }} | ||
| OPERATOR_METRICS_VULN_ID_ENABLED: {{ .Values.operator.metricsVulnIdEnabled | quote }} | ||
| OPERATOR_HEALTH_PROBE_BIND_ADDRESS: ":9090" | ||
| OPERATOR_PPROF_BIND_ADDRESS: {{ "" | quote }} |
There was a problem hiding this comment.
Would it make sense to add support for configuring this flag via a Helm value?
it allows to use prepared configs https://github.com/afdesk/to-values/blob/main/pprof.yaml
Description
dev: add support for pprof
Related issues
Checklist