-
Notifications
You must be signed in to change notification settings - Fork 29
Add OADP toolset for managing Velero backups and restores #122
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: main
Are you sure you want to change the base?
Add OADP toolset for managing Velero backups and restores #122
Conversation
This adds an OADP (OpenShift API for Data Protection) toolset that enables AI agents to manage backup and restore operations on OpenShift clusters through the MCP server. New tools (21 total): - Backup: list, get, create, delete, logs - Restore: list, get, create, delete, logs - Schedule: list, get, create, delete, pause - Storage Locations: BSL and VSL list/get - DataProtectionApplication: list, get Fixes: OADP-7194
Add documentation for the OADP (OpenShift API for Data Protection) toolset including all 21 tools for managing Velero backups, restores, schedules, storage locations, and DataProtectionApplications.
|
|
||
| const ( | ||
| // VeleroGroup is the API group for Velero resources | ||
| VeleroGroup = "velero.io" |
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.
is this the upstream version of OADP?
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.
Yes, velero.io is the upstream Velero API group. OADP reuses these same CRDs, it doesn't define its own Backup/Restore resources
|
/assign matzew |
|
woot! thanks @shubham-pampattiwar |
Complete OADP toolset implementation covering all CRDs shipped by OADP: Velero v1 CRDs: - BackupRepository: list, get, delete - DeleteBackupRequest: list, get - DownloadRequest: list, get, create, delete - PodVolumeBackup: list, get - PodVolumeRestore: list, get - ServerStatusRequest: list, get, create, delete Velero v2alpha1 CRDs: - DataUpload: list, get, cancel - DataDownload: list, get, cancel OADP CRDs: - CloudStorage: list, get, create, delete - DataProtectionTest: list, get, create, delete - DPA: create, update, delete (added to existing list, get) NAC CRDs: - NonAdminBackup: list, get, create, delete - NonAdminRestore: list, get, create, delete - NonAdminBackupStorageLocation: list, get, create, update, delete - NonAdminBackupStorageLocationRequest: list, get, approve - NonAdminDownloadRequest: list, get, create, delete VM CRDs: - VirtualMachineBackupsDiscovery: list, get, create, delete - VirtualMachineFileRestore: list, get, create, delete Existing CRD updates: - BSL: create, update, delete (added to existing list, get) - VSL: create, update, delete (added to existing list, get) - Schedule: update (added to existing list, get, create, delete, pause) Includes comprehensive unit tests for all CRUD operations.
- Update README.md OADP section with all 90 tools covering 23 CRDs - Add docs/OADP.md with detailed toolset documentation - Update docs/README.md to include OADP and Observability links
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: shubham-pampattiwar The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@shubham-pampattiwar: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
/assign @Cali0707 |
|
@shubham-pampattiwar thanks for contributing a new toolset! A few thoughts:
Our experience with the core toolset and others so far is that in general we want to try to minimize the number of tools in the server, so that we don't overwhelm the model's context. E.g. cursor will return a warning to users when somewhere in the realm of 20-60 tools are loaded (and this is providing 90!) IMO we should be working to drastically reduce the number of tools provided by this toolset. A few things that can likely help:
For example, in the kubevirt toolset they made the action to be done to a VM a parameter of the tool, rather than having one tool for each action: openshift-mcp-server/pkg/toolsets/kubevirt/vm/lifecycle/tool.go Lines 40 to 44 in f13d475
Happy to discuss further on how to reduce the count of the tools while still ensuring agents can take all the actions they need to! |
Hey @Cali0707, thanks for the feedback! Makes sense - 90 tools is definitely too many. Here's my plan to reduce to ~9 tools using the action parameter pattern like kubevirt: Less common CRDs (DeleteBackupRequest, DownloadRequest, ServerStatusRequest, PodVolumeBackup/Restore) can use generic resources_* tools. Let me know if this approach works! |
|
Reducing the number of tools sounds like a good idea, as well leveraging core tools (e.g. A good idea is to also look at providing evals, like other toolsets (kubevirt for instance) We use mcpchecker, which now has also quickstarts for get going! |
Summary
CRDs Covered
Tools by Category
Backup/Restore/Schedule:
oadp_backup_list/get/create/delete/logsoadp_restore_list/get/create/delete/logsoadp_schedule_list/get/create/update/delete/pauseStorage Locations:
oadp_backup_storage_location_list/get/create/update/deleteoadp_volume_snapshot_location_list/get/create/update/deleteDPA & Infrastructure:
oadp_dpa_list/get/create/update/deleteoadp_backup_repository_list/get/deleteoadp_server_status_request_list/get/create/deleteData Mover (v2alpha1):
oadp_data_upload_list/get/canceloadp_data_download_list/get/cancelOADP-Specific:
oadp_cloud_storage_list/get/create/deleteoadp_data_protection_test_list/get/create/deleteoadp_delete_backup_request_list/getoadp_download_request_list/get/create/deleteoadp_pod_volume_backup_list/getoadp_pod_volume_restore_list/getNon-Admin Controller:
oadp_non_admin_backup_list/get/create/deleteoadp_non_admin_restore_list/get/create/deleteoadp_non_admin_bsl_list/get/create/update/deleteoadp_non_admin_bsl_request_list/get/approveoadp_non_admin_download_request_list/get/create/deleteVM Restore:
oadp_vm_backup_discovery_list/get/create/deleteoadp_vm_file_restore_list/get/create/deleteTest plan
go test -v ./pkg/toolsets/oadp/...)go test -v ./pkg/oadp/...)make build && make lint)