-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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: application resource deletion protection #20497
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
23f4655
to
afdeee8
Compare
RequiresDeletionConfirmation: targetObj != nil && resourceutil.HasAnnotationOption(targetObj, synccommon.AnnotationSyncOptions, synccommon.SyncOptionDeleteRequireConfirm) || | ||
liveObj != nil && resourceutil.HasAnnotationOption(liveObj, synccommon.AnnotationSyncOptions, synccommon.SyncOptionDeleteRequireConfirm), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also need to deal with users deleting the resource directly like using actions to deleted the resource from the cluster? If so did we handle it already (couldn't find it so wanted to verify)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RequiresDeletionConfirmation
is used during app deletion finalizing. So if user delete resource manually then controller won't attempt to delete it and confirmation won't be necessary. I think this is expected behavior.
f4c0df5
to
ebc8581
Compare
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
ebc8581
to
7e64cd8
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20497 +/- ##
=========================================
Coverage ? 55.04%
=========================================
Files ? 322
Lines ? 54999
Branches ? 0
=========================================
Hits ? 30272
Misses ? 22127
Partials ? 2600 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com> Signed-off-by: Adrian Aneci <aneci@adobe.com>
Depends on argoproj/gitops-engine#630
PR implements resource deletion with confirmation proposal: introduces
Delete=confirm
andPrune=confirm
sync options that allow end users to require manual confirmation before pruning/deleting of annotated resources.argocd.argoproj.io/deletion-approved: <ISO formatted timestamp>
instead of justtrue
. This allows end user to confirm pruning multiple times for different sync operations.Screen.Recording.2024-10-22.at.11.17.50.PM.mov