Skip to content
1 change: 1 addition & 0 deletions applicationset/controllers/applicationset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,7 @@ func (r *ApplicationSetReconciler) updateResourcesStatus(ctx context.Context, lo
statusMap := status.GetResourceStatusMap(appset)
statusMap = status.BuildResourceStatus(statusMap, apps)

// add a comment for test coverage
statuses := []argov1alpha1.ResourceStatus{}
for _, status := range statusMap {
statuses = append(statuses, status)
Expand Down
9 changes: 6 additions & 3 deletions cmd/argocd-repo-server/commands/argocd_repo_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
"github.com/argoproj/argo-cd/v3/util/gpg"
"github.com/argoproj/argo-cd/v3/util/healthz"
utilio "github.com/argoproj/argo-cd/v3/util/io"
"github.com/argoproj/argo-cd/v3/util/profile"
"github.com/argoproj/argo-cd/v3/util/tls"
traceutil "github.com/argoproj/argo-cd/v3/util/trace"
)
Expand Down Expand Up @@ -177,7 +178,8 @@ func NewCommand() *cobra.Command {
listener, err := lc.Listen(ctx, "tcp", fmt.Sprintf("%s:%d", listenHost, listenPort))
errors.CheckError(err)

healthz.ServeHealthCheck(http.DefaultServeMux, func(r *http.Request) error {
mux := http.NewServeMux()
healthz.ServeHealthCheck(mux, func(r *http.Request) error {
if val, ok := r.URL.Query()["full"]; ok && len(val) > 0 && val[0] == "true" {
// connect to itself to make sure repo server is able to serve connection
// used by liveness probe to auto restart repo server
Expand All @@ -199,8 +201,9 @@ func NewCommand() *cobra.Command {
}
return nil
})
http.Handle("/metrics", metricsServer.GetHandler())
go func() { errors.CheckError(http.ListenAndServe(fmt.Sprintf("%s:%d", metricsHost, metricsPort), nil)) }()
mux.Handle("/metrics", metricsServer.GetHandler())
profile.RegisterProfiler(mux)
go func() { errors.CheckError(http.ListenAndServe(fmt.Sprintf("%s:%d", metricsHost, metricsPort), mux)) }()
go func() { errors.CheckError(askPassServer.Run()) }()

if gpg.IsGPGEnabled() {
Expand Down
2 changes: 2 additions & 0 deletions docs/operator-manual/argocd-cmd-params-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions docs/operator-manual/high_availability.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,13 @@ spec:
name: var-files
- emptyDir: {}
name: plugins
- name: argocd-cmd-params-cm
configMap:
optional: true
name: argocd-cmd-params-cm
items:
- key: reposerver.profile.enabled
path: profiler.enabled
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand Down
7 changes: 7 additions & 0 deletions manifests/core-install-with-hydrator.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions manifests/core-install.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions manifests/ha/install-with-hydrator.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions manifests/ha/install.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions manifests/ha/namespace-install-with-hydrator.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions manifests/ha/namespace-install.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions manifests/install-with-hydrator.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions manifests/install.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions manifests/namespace-install-with-hydrator.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions manifests/namespace-install.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading