From 9579e43fc22ae7b347dc916438ea94e0ad478273 Mon Sep 17 00:00:00 2001 From: Petr Balogh Date: Wed, 7 Feb 2024 12:55:36 +0100 Subject: [PATCH] Add performance profile for deployment Fixes: #9300 Signed-off-by: Petr Balogh --- conf/README.md | 1 + conf/ocsci/performance_profiles/balanced.yaml | 4 ++++ conf/ocsci/performance_profiles/lean.yaml | 4 ++++ conf/ocsci/performance_profiles/performance.yaml | 4 ++++ ocs_ci/deployment/deployment.py | 3 +++ 5 files changed, 16 insertions(+) create mode 100644 conf/ocsci/performance_profiles/balanced.yaml create mode 100644 conf/ocsci/performance_profiles/lean.yaml create mode 100644 conf/ocsci/performance_profiles/performance.yaml diff --git a/conf/README.md b/conf/README.md index cabe3537e11..adeb4c55a5b 100644 --- a/conf/README.md +++ b/conf/README.md @@ -261,6 +261,7 @@ higher priority). * `enable_globalnet` - enable or disable globalnet for submariner, default: true * `submariner_unreleased_channel` - submariner channel for unreleased downstream build * `enable_hw_virtualization` - enable hardware virtualization for vSphere platform. +* `performance_profile` - performance profile to be used (balanced, lean, performance). #### UPGRADE diff --git a/conf/ocsci/performance_profiles/balanced.yaml b/conf/ocsci/performance_profiles/balanced.yaml new file mode 100644 index 00000000000..a61064a083e --- /dev/null +++ b/conf/ocsci/performance_profiles/balanced.yaml @@ -0,0 +1,4 @@ +# This configuration file is used for changing performance profile during deployment. +--- +ENV_DATA: + performance_profile: balanced diff --git a/conf/ocsci/performance_profiles/lean.yaml b/conf/ocsci/performance_profiles/lean.yaml new file mode 100644 index 00000000000..55e4d51a19f --- /dev/null +++ b/conf/ocsci/performance_profiles/lean.yaml @@ -0,0 +1,4 @@ +# This configuration file is used for changing performance profile during deployment. +--- +ENV_DATA: + performance_profile: lean diff --git a/conf/ocsci/performance_profiles/performance.yaml b/conf/ocsci/performance_profiles/performance.yaml new file mode 100644 index 00000000000..b1c8eb96c2b --- /dev/null +++ b/conf/ocsci/performance_profiles/performance.yaml @@ -0,0 +1,4 @@ +# This configuration file is used for changing performance profile during deployment. +--- +ENV_DATA: + performance_profile: performance diff --git a/ocs_ci/deployment/deployment.py b/ocs_ci/deployment/deployment.py index 11ceea457f1..b6e972ecec5 100644 --- a/ocs_ci/deployment/deployment.py +++ b/ocs_ci/deployment/deployment.py @@ -1388,6 +1388,9 @@ def deploy_ocs_via_operator(self, image=None): cluster_data["spec"]["encryption"] = { "storageClassName": storageclassnames["encryption"] } + performance_profile = config.ENV_DATA.get("performance_profile") + if performance_profile: + cluster_data["spec"]["resourceProfile"] = performance_profile # Bluestore-rdr for RDR greenfield deployments: 4.14 onwards if ( (version.get_semantic_ocs_version_from_config() >= version.VERSION_4_14)