fix: register pprof endpoints in repo-server using the params config map (#26237)

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
This commit is contained in:
Papapetrou Patroklos
2026-02-12 18:16:17 +02:00
committed by GitHub
parent 8e636b78e5
commit 43ea991a25
14 changed files with 89 additions and 7 deletions

View File

@@ -279,6 +279,8 @@ data:
# _grpc_config.<hostname> are disabled to prevent excessive DNS queries that can cause timeouts in dual-stack environments.
# See https://github.com/argoproj/argo-cd/issues/24991
reposerver.grpc.enable.txt.service.config: "false"
# Enables profile endpoint on the internal metrics port
reposerver.profile.enabled: "false"
## Commit-server properties
# Listen on given address for incoming connections (default "0.0.0.0")

View File

@@ -522,12 +522,12 @@ Not all HTTP responses are eligible for retries. The following conditions will n
Argo CD optionally exposes a profiling endpoint that can be used to profile the CPU and memory usage of the Argo CD
component.
The profiling endpoint is available on metrics port of each component. See [metrics](./metrics.md) for more information
The profiling endpoint is available on the metrics port of each component. See [metrics](./metrics.md) for more information
about the port.
For security reasons, the profiling endpoint is disabled by default. The endpoint can be enabled by setting the
`server.profile.enabled`, `applicationsetcontroller.profile.enabled`, or `controller.profile.enabled` key
of [argocd-cmd-params-cm](argocd-cmd-params-cm.yaml) ConfigMap to `true`.
Once the endpoint is enabled, you can use go profile tool to collect the CPU and memory profiles. Example:
`server.profile.enabled`, `applicationsetcontroller.profile.enabled`, `reposerver.profile.enabled` or
`controller.profile.enabled` key of [argocd-cmd-params-cm](argocd-cmd-params-cm.yaml) ConfigMap to `true`.
Once the endpoint is enabled, you can use the go profile tool to collect the CPU and memory profiles. Example:
```bash
$ kubectl port-forward svc/argocd-metrics 8082:8082