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

feat: add support to backup applicationsets #6095

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

chetan-rns
Copy link
Member

Currently, users can backup Argo CD data using argocd-util export command. This commit adds support to export and import ApplicationSets along with other Argo CD resources.

Closes: #5240

Example:
The following command will also export ApplicationSets if they're present.

argocd-util export -o backup.yaml

Signed-off-by: Chetan Banavikalmutt chetanrns1997@gmail.com

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

This commit adds support to export and import applicationset objects along with other Argo CD resources

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
@codecov
Copy link

codecov bot commented Apr 23, 2021

Codecov Report

Merging #6095 (6d02b06) into master (bfd0b15) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6095      +/-   ##
==========================================
- Coverage   40.93%   40.87%   -0.07%     
==========================================
  Files         147      147              
  Lines       19729    19848     +119     
==========================================
+ Hits         8077     8113      +36     
- Misses      10541    10614      +73     
- Partials     1111     1121      +10     
Impacted Files Coverage Δ
cmd/argocd-util/commands/argocd_util.go 14.51% <0.00%> (-0.12%) ⬇️
cmd/argocd-util/commands/backup.go 0.00% <0.00%> (ø)
server/application/application.go 30.91% <0.00%> (+0.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfd0b15...6d02b06. Read the comment docs.

@chetan-rns
Copy link
Member Author

Wanted to add an e2e test for this. But the test server doesn't add appset CRD. Any pointers on how to overcome this would be helpful.

@jannfis
Copy link
Member

jannfis commented Apr 24, 2021

Wanted to add an e2e test for this. But the test server doesn't add appset CRD. Any pointers on how to overcome this would be helpful.

Hey @chetan-rns, you could add the applicationset CRD to https://github.com/argoproj/argo-cd/blob/master/test/manifests/base/kustomization.yaml - this is what gets installed to the K8s cluster used for end-to-end tests here

Maybe this could even be included as a remote resource from the applicationset repo.

@chetan-rns
Copy link
Member Author

Thanks @jannfis 👍

Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @chetan-rns

As it turns out, argocd-util is not (yet) included in e2e tests at all. From my PoV, e2e tests are not a requirement for this PR.

@jannfis jannfis merged commit 4c01224 into argoproj:master Apr 30, 2021
@jannfis jannfis added the needs-verification PR requires pre-release verification label Jun 25, 2021
@alexmt alexmt added this to the v2.1 milestone Jul 28, 2021
@jgwest jgwest removed the needs-verification PR requires pre-release verification label Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include ApplicationSet in argocd-util export scope
4 participants