Skip to content

Conversation

@shubham-pampattiwar
Copy link
Member

@shubham-pampattiwar shubham-pampattiwar commented Jan 29, 2026

Summary

  • Adds comprehensive OADP (OpenShift API for Data Protection) toolset to the kubernetes-mcp-server
  • Provides 90 tools covering all 23 CRDs shipped by OADP
  • Enables AI agents to create, monitor, and manage data protection workflows

CRDs Covered

Category CRDs Tools
Velero v1 Core Backup, Restore, Schedule 17
Velero v1 Storage BackupStorageLocation, VolumeSnapshotLocation 10
Velero v1 Internal BackupRepository, DeleteBackupRequest, DownloadRequest, PodVolumeBackup, PodVolumeRestore, ServerStatusRequest 15
Velero v2alpha1 DataUpload, DataDownload 6
OADP DataProtectionApplication, CloudStorage, DataProtectionTest 13
Non-Admin Controller NonAdminBackup, NonAdminRestore, NonAdminBSL, NonAdminBSLRequest, NonAdminDownloadRequest 20
VM Restore VirtualMachineBackupsDiscovery, VirtualMachineFileRestore 8

Tools by Category

Backup/Restore/Schedule:

  • oadp_backup_list/get/create/delete/logs
  • oadp_restore_list/get/create/delete/logs
  • oadp_schedule_list/get/create/update/delete/pause

Storage Locations:

  • oadp_backup_storage_location_list/get/create/update/delete
  • oadp_volume_snapshot_location_list/get/create/update/delete

DPA & Infrastructure:

  • oadp_dpa_list/get/create/update/delete
  • oadp_backup_repository_list/get/delete
  • oadp_server_status_request_list/get/create/delete

Data Mover (v2alpha1):

  • oadp_data_upload_list/get/cancel
  • oadp_data_download_list/get/cancel

OADP-Specific:

  • oadp_cloud_storage_list/get/create/delete
  • oadp_data_protection_test_list/get/create/delete
  • oadp_delete_backup_request_list/get
  • oadp_download_request_list/get/create/delete
  • oadp_pod_volume_backup_list/get
  • oadp_pod_volume_restore_list/get

Non-Admin Controller:

  • oadp_non_admin_backup_list/get/create/delete
  • oadp_non_admin_restore_list/get/create/delete
  • oadp_non_admin_bsl_list/get/create/update/delete
  • oadp_non_admin_bsl_request_list/get/approve
  • oadp_non_admin_download_request_list/get/create/delete

VM Restore:

  • oadp_vm_backup_discovery_list/get/create/delete
  • oadp_vm_file_restore_list/get/create/delete

Test plan

  • Unit tests for all 90 tools (go test -v ./pkg/toolsets/oadp/...)
  • Unit tests for all CRUD operations (go test -v ./pkg/oadp/...)
  • Build passes with no lint errors (make build && make lint)
  • Tested with mcp-inspector against live OpenShift cluster with OADP installed

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.
@openshift-ci openshift-ci bot requested review from Cali0707 and matzew January 29, 2026 07:28

const (
// VeleroGroup is the API group for Velero resources
VeleroGroup = "velero.io"
Copy link
Member

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?

Copy link
Member Author

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

@matzew
Copy link
Member

matzew commented Jan 29, 2026

/assign matzew

@weshayutin
Copy link

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
@openshift-ci
Copy link

openshift-ci bot commented Jan 29, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shubham-pampattiwar
Once this PR has been reviewed and has the lgtm label, please ask for approval from matzew. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link

openshift-ci bot commented Jan 29, 2026

@shubham-pampattiwar: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@Cali0707
Copy link

/assign @Cali0707

@Cali0707
Copy link

@shubham-pampattiwar thanks for contributing a new toolset! A few thoughts:

Provides 90 tools covering all 23 CRDs shipped by OADP

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:

  1. For any CRUD operations on CRs, there is the resources_<create|update|delete|list> tools from the core toolset, that can likely replace all your CR CRUD tools. Maybe we need to provide the model with more context on how to use your CRs specifically, but that is something we should look for in evals
  2. For operations that involve more than a simple CRUD operation against the kube API server, or which needs to use verbs not exposed through the generic resource tools (I'm thinking something around these ones: oadp_data_upload_list/get/cancel, oadp_data_download_list/get/cancel, specifically the cancel bit), let's try to make the verbs part of the parameters of the tool.

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:

"action": {
Type: "string",
Enum: []any{string(ActionStart), string(ActionStop), string(ActionRestart)},
Description: "The lifecycle action to perform: 'start' (changes runStrategy to Always), 'stop' (changes runStrategy to Halted), or 'restart' (stops then starts the VM)",
},

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!

@shubham-pampattiwar
Copy link
Member Author

@shubham-pampattiwar thanks for contributing a new toolset! A few thoughts:

Provides 90 tools covering all 23 CRDs shipped by OADP

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:

  1. For any CRUD operations on CRs, there is the resources_<create|update|delete|list> tools from the core toolset, that can likely replace all your CR CRUD tools. Maybe we need to provide the model with more context on how to use your CRs specifically, but that is something we should look for in evals
  2. For operations that involve more than a simple CRUD operation against the kube API server, or which needs to use verbs not exposed through the generic resource tools (I'm thinking something around these ones: oadp_data_upload_list/get/cancel, oadp_data_download_list/get/cancel, specifically the cancel bit), let's try to make the verbs part of the parameters of the tool.

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:

"action": {
Type: "string",
Enum: []any{string(ActionStart), string(ActionStop), string(ActionRestart)},
Description: "The lifecycle action to perform: 'start' (changes runStrategy to Always), 'stop' (changes runStrategy to Halted), or 'restart' (stops then starts the VM)",
},

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:

┌───────────────────────┬─────────────────────────────┬──────────────────────────────────────────┐                                                                       
│         Tool          │          Resources          │                 Actions                  │                                                                       
├───────────────────────┼─────────────────────────────┼──────────────────────────────────────────┤                                                                       
│ oadp_backup           │ Backup                      │ list, get, create, delete, logs          │                                                                       
├───────────────────────┼─────────────────────────────┼──────────────────────────────────────────┤                                                                       
│ oadp_restore          │ Restore                     │ list, get, create, delete, logs          │                                                                       
├───────────────────────┼─────────────────────────────┼──────────────────────────────────────────┤                                                                       
│ oadp_schedule         │ Schedule                    │ list, get, create, update, delete, pause │                                                                       
├───────────────────────┼─────────────────────────────┼──────────────────────────────────────────┤                                                                       
│ oadp_dpa              │ DataProtectionApplication   │ list, get, create, update, delete        │                                                                       
├───────────────────────┼─────────────────────────────┼──────────────────────────────────────────┤                                                                       
│ oadp_storage_location │ BSL + VSL (type param)      │ list, get, create, update, delete        │                                                                       
├───────────────────────┼─────────────────────────────┼──────────────────────────────────────────┤                                                                       
│ oadp_data_mover       │ DataUpload + DataDownload   │ list, get, cancel                        │                                                                       
├───────────────────────┼─────────────────────────────┼──────────────────────────────────────────┤                                                                       
│ oadp_repository       │ BackupRepository            │ list, get, delete                        │                                                                       
├───────────────────────┼─────────────────────────────┼──────────────────────────────────────────┤                                                                       
│ oadp_non_admin        │ All NonAdmin* resources     │ list, get, create, delete, approve       │                                                                       
├───────────────────────┼─────────────────────────────┼──────────────────────────────────────────┤                                                                       
│ oadp_vm_restore       │ VM discovery + file restore │ list, get, create, delete                │                                                                       
└───────────────────────┴─────────────────────────────┴──────────────────────────────────────────┘                                                                       

Less common CRDs (DeleteBackupRequest, DownloadRequest, ServerStatusRequest, PodVolumeBackup/Restore) can use generic resources_* tools.

Let me know if this approach works!

@matzew
Copy link
Member

matzew commented Jan 30, 2026

Reducing the number of tools sounds like a good idea, as well leveraging core tools (e.g. resources_*) for generic operations seem good.

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!

https://github.com/mcpchecker

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.

4 participants