argo-cd icon indicating copy to clipboard operation
argo-cd copied to clipboard

CLI action for restarting deployments fails to discover Deployments not present in Git

Open joshuabaird opened this issue 7 months ago • 0 comments

Checklist:

  • [X] I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • [X] I've included steps to reproduce the bug.
  • [X] I've pasted the output of argocd version.

Describe the bug

When a user uses the CLI to restart deployments via an action, the CLI fails to discover and restart Deployments that are not present in Git -- such as Deployments created by an external operator.

This is presumably because the CLI is using managed resources (git) instead of the resource tree (git + children):

https://github.com/argoproj/argo-cd/blob/b39ca155dc325b14c246be7b50d49518887d9523/cmd/argocd/commands/app_actions.go#L179

To Reproduce

  • Find a Deployment that is created by an external operator and that is not defined in git
  • Use the CLI to restart all deployments in the namespace
argocd app actions run $appName restart --kind Deployment --all
  • See that these Deployments are not restarted

Expected behavior

All Deployments are restarted; regardless if they are present in git or not.

Version

v2.14.11

Paste the output from `argocd version` here.

Logs

Paste any relevant application logs here.

joshuabaird avatar Jun 02 '25 20:06 joshuabaird