-
Couldn't load subscription status.
- Fork 10
Document usage of NADR (NonAdminDownloadRequest) feature #307
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
base: oadp-dev
Are you sure you want to change the base?
Conversation
|
@kaovilai 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
|
Hi @Copilot. Thanks for your PR. I'm waiting for a migtools member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Co-authored-by: kaovilai <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
Pull Request Overview
This PR adds comprehensive documentation for the NonAdminDownloadRequest (NADR) feature, which was previously undocumented. The NADR feature allows non-admin users to download logs, backup contents, and other information from their NonAdminBackup and NonAdminRestore operations through secure, time-limited signed URLs.
- Complete documentation including usage guide, troubleshooting, and best practices
- OpenShift templates for common download scenarios (backup logs, contents, restore logs, resource lists)
- Automated helper script for streamlined download workflow
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
docs/nadr_usage.md |
Comprehensive usage guide with examples, troubleshooting, and supported download types |
hack/nadr-download.sh |
Automated script that handles NADR creation, processing, and file download |
hack/samples/downloads/ |
OpenShift templates for common download scenarios |
config/samples/oadp_v1alpha1_nonadmindownloadrequest.yaml |
Enhanced sample with detailed comments |
README.md |
Integrated NADR workflow into main user journey |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| local kind="$1" | ||
| local name="$2" | ||
| local timestamp=$(date +%Y%m%d-%H%M%S) | ||
| echo "${name}-${kind,,}-${timestamp}.tar.gz" |
Copilot
AI
Aug 19, 2025
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 use of ${kind,,} for case conversion may not be available in all shell environments. Consider using tr for better portability: echo "${name}-$(echo "$kind" | tr '[:upper:]' '[:lower:]')-${timestamp}.tar.gz"
| echo "${name}-${kind,,}-${timestamp}.tar.gz" | |
| echo "${name}-$(echo "$kind" | tr '[:upper:]' '[:lower:]')-${timestamp}.tar.gz" |
|
|
||
| # Set default request name if not provided | ||
| if [[ -z "$REQUEST_NAME" ]]; then | ||
| REQUEST_NAME="${NAME,,}-${KIND,,}-download-$(date +%s)" |
Copilot
AI
Aug 19, 2025
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 use of ${NAME,,} and ${KIND,,} for case conversion may not be available in all shell environments. Consider using tr for better portability: REQUEST_NAME="$(echo "$NAME" | tr '[:upper:]' '[:lower:]')-$(echo "$KIND" | tr '[:upper:]' '[:lower:]')-download-$(date +%s)"
| REQUEST_NAME="${NAME,,}-${KIND,,}-download-$(date +%s)" | |
| REQUEST_NAME="$(echo "$NAME" | tr '[:upper:]' '[:lower:]')-$(echo "$KIND" | tr '[:upper:]' '[:lower:]')-download-$(date +%s)" |
| # Check if the referenced backup/restore exists | ||
| if [[ "$KIND" == *"Backup"* || "$KIND" == *"backup"* ]]; then | ||
| log "Checking if NonAdminBackup '$NAME' exists in namespace '$NAMESPACE'" | ||
| if ! oc get nab "$NAME" -n "$NAMESPACE" &> /dev/null; then |
Copilot
AI
Aug 19, 2025
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.
[nitpick] The script uses shorthand 'nab' for NonAdminBackup which may not be clear to all users. Consider using the full resource name 'nonadminbackup' for clarity, or add a comment explaining the abbreviation.
| if ! oc get nab "$NAME" -n "$NAMESPACE" &> /dev/null; then | |
| if ! oc get nonadminbackup "$NAME" -n "$NAMESPACE" &> /dev/null; then |
| fi | ||
| else | ||
| log "Checking if NonAdminRestore '$NAME' exists in namespace '$NAMESPACE'" | ||
| if ! oc get nar "$NAME" -n "$NAMESPACE" &> /dev/null; then |
Copilot
AI
Aug 19, 2025
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.
[nitpick] The script uses shorthand 'nar' for NonAdminRestore which may not be clear to all users. Consider using the full resource name 'nonadminrestore' for clarity, or add a comment explaining the abbreviation.
| if ! oc get nar "$NAME" -n "$NAMESPACE" &> /dev/null; then | |
| if ! oc get nonadminrestore "$NAME" -n "$NAMESPACE" &> /dev/null; then |
This PR adds comprehensive documentation for the NonAdminDownloadRequest (NADR) feature, which was previously undocumented despite being fully implemented. The NADR feature allows non-admin users to download logs, backup contents, and other information related to their NonAdminBackup and NonAdminRestore operations through secure, time-limited signed URLs.
What's Added
📖 Comprehensive Documentation
docs/nadr_usage.md- Complete usage guide covering all aspects of NADRREADME.md- Integrated NADR workflow into the main user journey🛠️ Sample Templates & Examples
hack/samples/downloads/- OpenShift templates for common download scenarios:backup-logs.yaml- Download backup operation logsbackup-contents.yaml- Download backup metadata and manifestsrestore-logs.yaml- Download restore operation logsbackup-resource-list.yaml- Download list of backed up resources🚀 Automation Tools
hack/nadr-download.sh- Helper script that automates the entire download process:# Simple one-command download ./hack/nadr-download.sh -k BackupLog -n my-backup -ns my-namespace📋 Documentation Includes
Supported Download Types:
Multiple Usage Approaches:
Complete Examples:
wgetandcurlwith signed URLsTroubleshooting Guide:
Example Usage
The documentation provides production-ready guidance for users ranging from simple manual operations to full automation workflows, making the NADR feature accessible and easy to use.
Fixes #253.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.