This document describes the API surface and status details you need to build an interface (UI, CLI, or external orchestrator) to configure and orchestrate Disaster Recovery with Ramen.
Ramen does not expose its own REST API. All configuration and orchestration is done through the Kubernetes API using Custom Resource Definitions (CRDs). Your interface must:
- Talk to the Kubernetes API server (on the hub cluster for DRPolicy, DRCluster, DRPlacementControl; on each managed cluster for VolumeReplicationGroup).
- Use standard Kubernetes HTTP verbs and paths for these custom resources.
| Property | Value |
|---|---|
| API Group | ramendr.openshift.io |
| API Version | v1alpha1 |
| Base path (cluster-scoped) | /apis/ramendr.openshift.io/v1alpha1/{resource} |
| Base path (namespaced) | /apis/ramendr.openshift.io/v1alpha1/namespaces/{namespace}/{resource} |
All resources are accessed via the Kubernetes API. Typical usage:
| Operation | HTTP verb | Path pattern (examples) |
|---|---|---|
| List (cluster-scoped) | GET | /apis/ramendr.openshift.io/v1alpha1/drpolicies |
| List (namespaced) | GET | /apis/ramendr.openshift.io/v1alpha1/namespaces/{ns}/drplacementcontrols |
| Get | GET | .../drpolicies/{name} or .../namespaces/{ns}/drplacementcontrols/{name} |
| Create | POST | .../drpolicies or .../namespaces/{ns}/drplacementcontrols |
| Update | PUT/PATCH | Same as Get, with body |
| Delete | DELETE | Same as Get |
| Watch | GET | Same as List with ?watch=1 |
Use watch to get real-time status updates for dashboards and automation.
| Resource | Scope | Where it lives | Purpose |
|---|---|---|---|
| DRPolicy | Cluster | Hub | DR topology: clusters, replication, S3 |
| DRCluster | Cluster | Hub | Per-cluster DR config (S3 profile, fencing, region) |
| DRPlacementControl | Namespaced | Hub | Per-application DR: protect, relocate, failover |
| VolumeReplicationGroup | Namespaced | Managed clusters | Volume replication state (created by Ramen from DRPC) |
| RamenConfig | ConfigMap | Hub / each cluster | Operator config (S3 profiles, etc.); not a CRD |
For a DR configuration and orchestration interface, you primarily need DRPolicy, DRCluster, and DRPlacementControl. VolumeReplicationGroup is needed for detailed per-workload and per-PVC status if you show it (often on managed clusters).
Purpose: Define DR topology (two clusters), replication schedule, and class selectors.
- List:
GET /apis/ramendr.openshift.io/v1alpha1/drpolicies - Get:
GET /apis/ramendr.openshift.io/v1alpha1/drpolicies/{name} - Create:
POST /apis/ramendr.openshift.io/v1alpha1/drpolicies - Update:
PUTorPATCHon the same URL as Get - Delete:
DELETE(same as Get)
| Field | Type | Required | Description |
|---|---|---|---|
drClusters |
[]string | Yes | Exactly 2 cluster names (DRCluster names) |
schedulingInterval |
string | Yes | Replication interval, e.g. 5m, 1h, 1d |
replicationClassSelector |
LabelSelector | No | Select VolumeReplicationClass |
volumeSnapshotClassSelector |
LabelSelector | No | Select VolumeSnapshotClass (e.g. VolSync) |
volumeGroupSnapshotClassSelector |
LabelSelector | No | Select VolumeGroupSnapshotClass |
| Field | Type | Description |
|---|---|---|
conditions |
[]Condition | e.g. Validated |
status.async.peerClasses |
[]PeerClass | Resolved async replication peer classes (Regional DR) |
status.sync.peerClasses |
[]PeerClass | Resolved sync replication peer classes (Metro DR) |
Use conditions to show validation/errors; use peerClasses to show which storage classes are available for DR.
Purpose: Per-managed-cluster DR configuration (S3 profile, region, fencing).
- List:
GET /apis/ramendr.openshift.io/v1alpha1/drclusters - Get:
GET /apis/ramendr.openshift.io/v1alpha1/drclusters/{name} - Create / Update / Delete: same patterns as DRPolicy.
| Field | Type | Required | Description |
|---|---|---|---|
s3ProfileName |
string | Yes | S3 profile name from RamenConfig (for PV metadata) |
region |
string | No | Region; clusters in same region are Metro DR peers |
clusterFence |
string | No | Unfenced | Fenced | ManuallyFenced | ManuallyUnfenced |
cidrs |
[]string | No | Node CIDRs used for fencing |
| Field | Type | Description |
|---|---|---|
phase |
string | Available, Starting, Fencing, Fenced, Unfencing, Unfenced |
conditions |
[]Condition | e.g. Validated, Clean, Fenced |
maintenanceModes |
[]ClusterMaintenanceMode | Storage maintenance mode state per provisioner/target |
Use phase and conditions for cluster readiness and fencing state in the UI.
Purpose: Per-application DR – enable protection, relocate, or failover. This is the main resource your interface will configure and orchestrate.
- List:
GET /apis/ramendr.openshift.io/v1alpha1/namespaces/{namespace}/drplacementcontrols - Get:
GET /apis/ramendr.openshift.io/v1alpha1/namespaces/{namespace}/drplacementcontrols/{name} - Create:
POST /apis/ramendr.openshift.io/v1alpha1/namespaces/{namespace}/drplacementcontrols - Update:
PUTorPATCH(use PATCH for partial updates, e.g. onlyspec.actionandspec.failoverCluster) - Delete:
DELETE(same as Get) - Watch:
GET .../drplacementcontrols?watch=1(for live status)
| Field | Type | Required | Description |
|---|---|---|---|
placementRef |
ObjectReference | Yes | Reference to Placement or PlacementRule (immutable) |
drPolicyRef |
ObjectReference | Yes | Reference to DRPolicy (immutable) |
pvcSelector |
LabelSelector | Yes | Labels to select PVCs to protect (immutable) |
preferredCluster |
string | No | Preferred cluster to run the app (initial or after relocate) |
failoverCluster |
string | No | Target cluster for failover; set when action=Failover |
action |
string | No | Failover | Relocate – triggers the operation |
protectedNamespaces |
[]string | No | Additional namespaces to protect (unmanaged resources) |
kubeObjectProtection |
object | No | Kube object capture/recovery (recipe, interval, selector) |
volSyncSpec |
object | No | VolSync-specific config (mover, TLS, etc.) |
Orchestration (what to set from your UI):
- Enable protection: Create DRPC with
placementRef,drPolicyRef,pvcSelector, and optionallypreferredCluster. - Relocate (planned migration): Set
spec.action = "Relocate"andspec.preferredCluster = <target-cluster>. - Failover (disaster recovery): Set
spec.action = "Failover"andspec.failoverCluster = <target-cluster>. - Clear action: After operation completes, you can set
spec.action = ""and clearspec.failoverClusterwhen applicable.
| Field | Type | Description |
|---|---|---|
phase |
string | High-level state (see below) |
progression |
string | Fine-grained step (see below) |
preferredDecision |
{ clusterName, clusterNamespace } | Current cluster where workload is placed |
conditions |
[]Condition | Available, PeerReady, Protected (see below) |
actionStartTime |
time | When current action started |
actionDuration |
duration | Duration of current action |
lastUpdateTime |
time | Last status update |
lastGroupSyncTime |
time | Last successful sync of all PVCs |
lastGroupSyncDuration |
duration | Last sync duration |
lastGroupSyncBytes |
int64 | Bytes transferred in last sync |
lastKubeObjectProtectionTime |
time | Last kube object capture |
resourceConditions |
VRGConditions | Aggregated VRG conditions from managed cluster |
| Value | Meaning |
|---|---|
| (empty) | Initial / not yet started |
WaitForUser |
Waiting for user action (e.g. after hub recovery) |
Initiating |
Action is being prepared |
Deploying |
Initial deployment in progress |
Deployed |
Initial deployment done |
FailingOver |
Failover in progress |
FailedOver |
Failover completed |
Relocating |
Relocation in progress |
Relocated |
Relocation completed |
Deleting |
DRPC is being deleted |
Use for progress bars or step indicators. Examples:
CreatingMW,WaitForReadiness,CheckingFailoverPrerequisites,FailingOverToCluster,WaitingForResourceRestore,UpdatedPlacement,EnsuringVolSyncSetup,Completed,Paused,Deleted, etc.
Full set is in api/v1alpha1/drplacementcontrol_types.go (ProgressionStatus constants).
Standard Kubernetes conditions; check type and status (True/False).
| Type | Meaning |
|---|---|
| Available | Whether the cluster in preferredDecision is ready for the workload. Reason can be Progressing, Success, Paused, etc. |
| PeerReady | Whether a peer cluster is ready for failover/relocate. Reason e.g. Success, NotStarted, Paused. |
| Protected | Whether the workload is protected. Reason: Protected, Progressing, Error, Unknown. |
Use Message for user-facing text; use Reason for programmatic handling.
Purpose: Per-cluster volume replication state. Usually created and updated by Ramen from the DRPC; your interface may read it for detailed status (e.g. per-PVC sync status).
VRGs are on managed clusters, not the hub. To show VRG status from a hub-based UI you need either OCM ManagedClusterView (current Ramen design) or direct API access to managed clusters.
- List:
GET /apis/ramendr.openshift.io/v1alpha1/namespaces/{namespace}/volumereplicationgroups - Get:
GET /apis/ramendr.openshift.io/v1alpha1/namespaces/{namespace}/volumereplicationgroups/{name}
pvcSelector,replicationState(primary/secondary),s3Profiles,async/sync/volSync, etc.
| Field | Type | Description |
|---|---|---|
state |
string | Primary | Secondary | Unknown |
conditions |
[]Condition | Summary conditions (see VRG conditions below) |
protectedPVCs |
[]ProtectedPVC | Per-PVC status and conditions |
lastGroupSyncTime |
time | Last successful sync of all PVCs |
lastGroupSyncDuration |
duration | Last sync duration |
lastGroupSyncBytes |
int64 | Bytes in last sync |
kubeObjectProtection |
object | Capture to recover from (if kube object protection enabled) |
prepareForFinalSyncComplete |
bool | Relocation: final sync prepared |
finalSyncComplete |
bool | Relocation: final sync done |
| Type | Level | Meaning |
|---|---|---|
| DataReady | VRG + PVC | PV data ready (e.g. for failover/relocate) |
| DataProtected | VRG + PVC | PV data in sync with peer |
| ClusterDataReady | VRG | PV/PVC cluster data restored (S3) |
| ClusterDataProtected | VRG | PV cluster data uploaded to S3 |
| KubeObjectsReady | VRG | Kube objects restored (if enabled) |
| NoClusterDataConflict | VRG | No conflict between clusters |
| AutoCleanup | VRG | Post-DR cleanup state |
| ReplicationSourceSetup | PVC (VolSync) | VolSync source setup |
| ReplicationDestinationSetup | PVC (VolSync) | VolSync destination setup |
| PVsRestored | PVC (VolSync) | VolSync PVCs restored |
| FinalSyncInProgress | PVC (VolSync) | Final sync in progress |
Each condition has status (True/False/Unknown), reason, and message – use these for UI and automation.
RamenConfig is stored in a ConfigMap, not a CRD. S3 profiles are inside it.
- Hub: ConfigMap name
ramen-hub-operator-config, keyramen_manager_config.yaml. - DR cluster: ConfigMap name
ramen-dr-cluster-operator-config, keyramen_manager_config.yaml.
To configure S3 (for DR clusters and policies), you need to read/update this ConfigMap and the structure under s3StoreProfiles. Each profile has s3ProfileName, s3Bucket, s3CompatibleEndpoint, s3Region, s3SecretRef, and optional caCertificates, veleroNamespaceSecretKeyRef. Secrets use keys AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
- DRPolicy: Create/update/list – define the two clusters and replication (scheduling interval, class selectors).
- DRCluster: Create/update/list – per-cluster S3 profile, region, fencing.
- RamenConfig (ConfigMap): Read/update S3 profiles and operator settings.
- DRPlacementControl: Create with
placementRef,drPolicyRef,pvcSelector,preferredClusterto protect an application.
- DRPlacementControl:
- Relocate: PATCH
spec.action = "Relocate",spec.preferredCluster = <target>. - Failover: PATCH
spec.action = "Failover",spec.failoverCluster = <target>. - Clear: PATCH
spec.action = "", clearspec.failoverClusterwhen appropriate.
- Relocate: PATCH
- DRPlacementControl: Watch/list and display:
status.phase(high-level state)status.progression(current step)status.preferredDecision.clusterName(current cluster)status.conditions(Available, PeerReady, Protected)status.actionStartTime,status.actionDuration,status.lastGroupSyncTime, etc.
- DRPolicy:
status.conditions,status.async.peerClasses,status.sync.peerClasses. - DRCluster:
status.phase,status.conditions,status.maintenanceModes. - VolumeReplicationGroup (optional, on managed clusters):
status.state,status.conditions,status.protectedPVCs, sync times/bytes.
DRPlacementControlin the relevant namespace(s) – for live DR state and progression.DRPolicyandDRCluster– for validation and cluster state (less frequent updates).
This gives you everything needed to implement a UI or orchestrator that configures DR (policies, clusters, applications) and runs relocate/failover while showing accurate status and progression.