Skip to content

parth982/replication-policy-operator

Repository files navigation


Replication Policy Operator

Kubernetes Operator that manages Replication Policies through a cluster-scoped Custom Resource (ReplicationPolicy).


Operator Info

  • Can create and delete replication policies on IBM FlashSystem via Kubernetes/OCP.
  • Communicates directly with the SVC REST API.
  • Runs as a cluster-scoped operator.

Architecture Diagram

+----------------------------------+
| Kubernetes Custom Resource (CR)  |
|          ReplicationPolicy       |
+----------------------------------+
                  |
                  | 1. Create / Delete CR
                  v
+----------------------------------+
| Replication Policy Operator      |
|       (Cluster-scoped)           |
+----------------------------------+
                  |
                  | 2. Reconcile -> Call REST API
                  v
+----------------------------------+
| IBM FlashSystem REST API          |
+----------------------------------+
  1. Create Resource: Users define a ReplicationPolicy Custom Resource (CR).
  2. Watch & Validate: The operator monitors CRs and validates their specifications.
  3. Manage Backend: When creating or deleting a replication policy, the operator:
    • Retrieves backend credentials from the referenced Secret.
    • Interacts with the IBM FlashSystem API to create or delete the policy.
    • ReplicationPolicy specs are immutable; updates to the CR are not supported.
  4. Update Status: The CR's status is updated to reflect the policy state, including success or error conditions.

ReplicationPolicy Example

Kubernetes CR Definition

apiVersion: replication.storage.ibm.com/v1alpha1
kind: ReplicationPolicy
metadata:
  name: async-dr-policy
spec:
  topology: async-dr
  backendSecretRef: flashsystem-backend
  partition: TestPartition
  rpoAlert: 120

Equivalent SVC CLI Command

mkreplicationpolicy -name partition-dr \
-topology async-dr \
-partition TestPartition \
-rpoalert 120

Backend Secret

The Secret with Backend Creds must exist in kube-system namespace before creating a ReplicationPolicy CR. ​

apiVersion: v1
kind: Secret
metadata:
  name: flashsystem-backend
  namespace: kube-system
type: Opaque
data:
  management_address: <base64>
  username: <base64>
  password: <base64>

Usage on Cluster

  • Deployment Manifests: Pre-generated manifests are available in the deploy/ directory.
  • Current Stable Release: v0.5.4
  • Install the Operator: oc apply -f deploy/operator_replication_policy_v0.5.4.yaml

Supported Backend


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors