Add nonadmin backup delete cli support#12
Merged
Merged
Conversation
kaovilai
reviewed
Jul 3, 2025
kaovilai
reviewed
Jul 3, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces CLI support for deleting non-admin backups, replaces the installation script with a Makefile, and updates documentation accordingly.
- Adds a
deletecommand undercmd/non-admin/backupto mark backups for deletion. - Introduces a Makefile for build, test, and install workflows and removes the old
quick-create.sh. - Updates README to use Makefile targets and removes the design document.
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| quick-create.sh | Removed quick installation script in favor of Makefile. |
| kubectl-oadp-design.md | Removed outdated design document. |
| cmd/non-admin/backup/nonadminbackup_builder.go | Added getCurrentNamespace helper for namespace detection. |
| cmd/non-admin/backup/delete.go | Implemented delete command to set DeleteBackup field. |
| cmd/non-admin/backup/create.go | Removed duplicate getCurrentNamespace definition. |
| cmd/non-admin/backup/backup.go | Enabled delete subcommand and cleaned up command list. |
| README.md | Updated installation and development workflow to use Makefile. |
| Makefile | Added build, install, test, status, clean targets. |
Comments suppressed due to low confidence (2)
cmd/non-admin/backup/backup.go:33
- [nitpick] The commented-out commands block clutters the code; consider removing unused commented lines or extracting them into documentation for clarity.
c.AddCommand(
cmd/non-admin/backup/delete.go:1
- New delete functionality should be covered by unit or integration tests—consider adding tests for
DeleteOptions.RunanddeleteBackup.
package backup
NicholasYancey
approved these changes
Jul 7, 2025
NicholasYancey
left a comment
Contributor
There was a problem hiding this comment.
Make file and delete.go looks good to merge.
kaovilai
reviewed
Jul 7, 2025
kaovilai
reviewed
Jul 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for nonadmin backup delete
Works by manually editing the nab spec to set the
DeleteBackupfield to trueAdd Makefile