Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.17] Use Placment for Subscription #10858

Open
wants to merge 5 commits into
base: release-4.17
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading