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(cli): ignore tracking annotation on backup restore #18960

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

agaudreault
Copy link
Member

If an argocd instance in namespace X, managed by another argo instance needs to be backed up and restored in namespace Y, also managed as code by a "dr" argo instance, then the tracking annotation will cause OutOfSync and potentially shared resource error.

Solution:

  • Ignore the tracking annotation if the resource already exist. If the resource does not exist, then it is not managed "as code" in the DR instance and will not conflict.

Bonus:

  • Ignore the last-applied-configuration annotation

Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
@agaudreault agaudreault requested review from a team as code owners July 5, 2024 15:54
Copy link

bunnyshell bot commented Jul 5, 2024

✅ Preview Environment deployed on Bunnyshell

Component Endpoints
argocd https://argocd-zcalhs.bunnyenv.com/
argocd-ttyd https://argocd-web-cli-zcalhs.bunnyenv.com/

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔴 /bns:stop to stop the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

Copy link

bunnyshell bot commented Jul 5, 2024

✅ Preview Environment created on Bunnyshell but will not be auto-deployed

See: Environment Details

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@agaudreault agaudreault marked this pull request as draft July 5, 2024 15:59
Copy link

codecov bot commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 51.72414% with 14 lines in your changes missing coverage. Please review.

Project coverage is 50.66%. Comparing base (45b7593) to head (43044e5).

Files Patch % Lines
cmd/argocd/commands/admin/backup.go 62.50% 9 Missing ⚠️
cmd/argocd/commands/admin/admin.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #18960      +/-   ##
==========================================
- Coverage   50.66%   50.66%   -0.01%     
==========================================
  Files         315      315              
  Lines       43347    43370      +23     
==========================================
+ Hits        21963    21974      +11     
- Misses      18882    18893      +11     
- Partials     2502     2503       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
@agaudreault agaudreault marked this pull request as ready for review July 8, 2024 14:39
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.

None yet

1 participant