Skip to content

Commit

Permalink
truning Local=true for RM in test script
Browse files Browse the repository at this point in the history
Signed-off-by: msvinaykumar <[email protected]>
  • Loading branch information
msvinaykumar committed Dec 7, 2024
1 parent 39b9732 commit ab45c34
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ data:
"dbdriver": "jdbc:postgresql://",
"plots": "true",
"local": "true",
"isROSEnabled": "false",
"logAllHttpReqAndResp": "true",
"recommendationsURL" : "http://kruize.monitoring.svc.cluster.local:8080/generateRecommendations?experiment_name=%s",
"experimentsURL" : "http://kruize.monitoring.svc.cluster.local:8080/createExperiment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ data:
"dbdriver": "jdbc:postgresql://",
"plots": "true",
"local": "true",
"isROSEnabled": "false",
"logAllHttpReqAndResp": "true",
"recommendationsURL" : "http://kruize.openshift-tuning.svc.cluster.local:8080/generateRecommendations?experiment_name=%s",
"experimentsURL" : "http://kruize.openshift-tuning.svc.cluster.local:8080/createExperiment",
Expand Down
12 changes: 7 additions & 5 deletions tests/scripts/common/common_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1904,7 +1904,7 @@ function kruize_local_patch() {
}

#
# "local" flag is turned off for RM.
# "isROSEnabled" flag is turned on for RM.
# Restores kruize default cpu/memory resources, PV storage for openshift
#
function kruize_remote_patch() {
Expand All @@ -1914,13 +1914,15 @@ function kruize_remote_patch() {


if [ ${cluster_type} == "minikube" ]; then
sed -i 's/"local": "true"/"local": "false"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE}
sed -i '/"local": "false"/a \ \ \ \ "isROSEnabled": "true",' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE}
sed -i 's/"isROSEnabled": "false"/"isROSEnabled": "true"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE}
#sed -i 's/"local": "true"/"local": "false"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE}
#sed -i '/"local": "true"/a \ \ \ \ "isROSEnabled": "true",' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE}
elif [ ${cluster_type} == "openshift" ]; then
sed -i 's/"local": "true"/"local": "false"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT}
sed -i 's/"isROSEnabled": "false"/"isROSEnabled": "true"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT}
#sed -i 's/"local": "true"/"local": "false"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT}
sed -i 's/\([[:space:]]*\)\(storage:\)[[:space:]]*[0-9]\+Mi/\1\2 1Gi/' ${KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT}
sed -i 's/\([[:space:]]*\)\(memory:\)[[:space:]]*".*"/\1\2 "2Gi"/; s/\([[:space:]]*\)\(cpu:\)[[:space:]]*".*"/\1\2 "2"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT}
sed -i '/"local": "false"/a \ \ \ \ "isROSEnabled": "true",' ${KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT}
#sed -i '/"local": "true"/a \ \ \ \ "isROSEnabled": "true",' ${KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT}
fi
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function remote_monitoring_tests() {
if [ ${skip_setup} -eq 0 ]; then
echo "Setting up kruize..." | tee -a ${LOG}
echo "${KRUIZE_SETUP_LOG}"
echo "setting local=false"
echo "setting isROSEnabled=false"
kruize_remote_patch
setup "${KRUIZE_POD_LOG}" >> ${KRUIZE_SETUP_LOG} 2>&1
echo "Setting up kruize...Done" | tee -a ${LOG}
Expand Down

0 comments on commit ab45c34

Please sign in to comment.