Skip to content
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

Support app sync --dry-run --local when automatic sync policy is enabled #3614

Closed
chancez opened this issue May 19, 2020 · 2 comments · Fixed by #3675
Closed

Support app sync --dry-run --local when automatic sync policy is enabled #3614

chancez opened this issue May 19, 2020 · 2 comments · Fixed by #3675
Labels
component:cli Affects the Argo CD CLI enhancement New feature or request good first issue Good for newcomers type:usability Enhancement of an existing feature

Comments

@chancez
Copy link
Contributor

chancez commented May 19, 2020

Summary

Currently you will get an error if you try to do a local sync with a sync policy of automatic, even if --dry-run is specified:

argocd app sync my-app --dry-run --local
FATA[0000] Cannot use local sync when Automatic Sync Policy is enabled

Dry run should not affect the cluster state, so it shouldn't matter what the sync policy is, so this should be allowed.

Motivation

I'd like to use this to produce the output YAML that ArgoCD would produce so that I can use it with kubectl diff during CI before we merge the changes, so that we can have a preview of the changes before they're applied (similar to terraform plan).

Proposal

ArgoCD should support --local when --dry-run is specified, even if the application has an automatic sync policy configured.

Generally speaking, I think argocd app diff --local works similar to what I would want, but I'd also like to have the capability to do this using kubectl.

@chancez chancez added the enhancement New feature or request label May 19, 2020
@alexmt alexmt added type:usability Enhancement of an existing feature component:cli Affects the Argo CD CLI labels May 19, 2020
@jannfis jannfis added the good first issue Good for newcomers label May 22, 2020
@pacoguzman
Copy link
Contributor

@chancez did you find a way to use kubectl diff on pull requests as a way to validate review them?

Thanks in advance

@MeNsaaH
Copy link
Contributor

MeNsaaH commented Mar 1, 2022

Same here. wondering how to display diffs to validate PRs. @pacoguzman . Can't seem to get argod app diff --local working. Seems all repo must be local even remote charts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:cli Affects the Argo CD CLI enhancement New feature or request good first issue Good for newcomers type:usability Enhancement of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants