Skip to content

Commit

Permalink
Use Placment for Subscription (#10734)
Browse files Browse the repository at this point in the history
Signed-off-by: prsurve <[email protected]>
  • Loading branch information
prsurve authored Nov 14, 2024
1 parent 766a0c6 commit 1fb712e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
44 changes: 44 additions & 0 deletions conf/ocsci/dr_workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,49 @@ ENV_DATA:
dr_workload_app_placement_name: "busybox-dict-1"
}
]
dr_workload_subscription_placement_rbd: [
{ name: "busybox-1", workload_dir: "rdr/busybox/rbd/subscription_with_placement/app-busybox-1",
pod_count: 10, pvc_count: 10, is_placement: True,
dr_workload_app_pvc_selector: { "appname": "busybox_app1" }
},
{ name: "busybox-2", workload_dir: "rdr/busybox/rbd/subscription_with_placement/app-busybox-2",
pod_count: 10, pvc_count: 10, is_placement: True,
dr_workload_app_pvc_selector: { "appname": "busybox_app2" }
},
{ name: "busybox-3", workload_dir: "rdr/busybox/rbd/subscription_with_placement/app-busybox-3",
pod_count: 10, pvc_count: 10, is_placement: True,
dr_workload_app_pvc_selector: { "appname": "busybox_app3" }
},
{ name: "busybox-4", workload_dir: "rdr/busybox/rbd/subscription_with_placement/app-busybox-4",
pod_count: 10, pvc_count: 10, is_placement: True,
dr_workload_app_pvc_selector: { "appname": "busybox_app4" }
},
{ name: "busybox-5", workload_dir: "rdr/busybox/rbd/subscription_with_placement/app-busybox-5",
pod_count: 10, pvc_count: 10, is_placement: True,
dr_workload_app_pvc_selector: { "appname": "busybox_app5" }
},
{ name: "busybox-6", workload_dir: "rdr/busybox/rbd/subscription_with_placement/app-busybox-6",
pod_count: 10, pvc_count: 10, is_placement: True,
dr_workload_app_pvc_selector: { "appname": "busybox_app6" }
},
]
dr_workload_subscription_placement_cephfs: [
{ name: "busybox-1", workload_dir: "rdr/busybox/cephfs/subscription_with_placement/app-busybox-1",
pod_count: 10, pvc_count: 10, is_placement: True,
dr_workload_app_pvc_selector: { "appname": "busybox_app1_cephfs" }
},
{ name: "busybox-2", workload_dir: "rdr/busybox/cephfs/subscription_with_placement/app-busybox-2",
pod_count: 10, pvc_count: 10, is_placement: True,
dr_workload_app_pvc_selector: { "appname": "busybox_app2_cephfs" }
},
{ name: "busybox-3", workload_dir: "rdr/busybox/cephfs/subscription_with_placement/app-busybox-3",
pod_count: 10, pvc_count: 10, is_placement: True,
dr_workload_app_pvc_selector: { "appname": "busybox_app3_cephfs" }
},
{ name: "busybox-4", workload_dir: "rdr/busybox/cephfs/subscription_with_placement/app-busybox-4",
pod_count: 10, pvc_count: 10, is_placement: True,
dr_workload_app_pvc_selector: { "appname": "busybox_app4_cephfs" }
},
]

# dr_policy_name: PLACEHOLDER
3 changes: 3 additions & 0 deletions ocs_ci/ocs/dr/dr_workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ def deploy_workload(self):
drpc_yaml_data["spec"]["pvcSelector"][
"matchLabels"
] = self.workload_pvc_selector

del drpc_yaml_data["spec"]["pvcSelector"]["matchExpressions"]
del drpc_yaml_data["spec"]["kubeObjectProtection"]
self.drcp_data_yaml = tempfile.NamedTemporaryFile(
mode="w+", prefix="drpc", delete=False
)
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6673,6 +6673,7 @@ def factory(
for index in range(num_of_subscription):
workload_key = "dr_workload_subscription"
if ocsci_config.MULTICLUSTER["multicluster_mode"] == constants.RDR_MODE:
workload_key = "dr_workload_subscription_placement"
workload_key += f"_{interface}"
workload_details = ocsci_config.ENV_DATA[workload_key][index]
workload = BusyBox(
Expand Down

0 comments on commit 1fb712e

Please sign in to comment.