diff --git a/conf/ocsci/dr_workload.yaml b/conf/ocsci/dr_workload.yaml index 26fbbec8c0f..ae9dd7ae58f 100644 --- a/conf/ocsci/dr_workload.yaml +++ b/conf/ocsci/dr_workload.yaml @@ -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 diff --git a/ocs_ci/ocs/dr/dr_workload.py b/ocs_ci/ocs/dr/dr_workload.py index 42162d66732..cb29867005e 100644 --- a/ocs_ci/ocs/dr/dr_workload.py +++ b/ocs_ci/ocs/dr/dr_workload.py @@ -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 ) diff --git a/tests/conftest.py b/tests/conftest.py index de5c0ef231d..799fbca8279 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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(