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

4-Migration add "isROSEnabled": "true" for RM #1414

Merged
merged 8 commits into from
Dec 10, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ data:
"savetodb": "true",
"dbdriver": "jdbc:postgresql://",
"plots": "true",
"local": "true",
"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 @@ -46,7 +46,6 @@ data:
"savetodb": "true",
"dbdriver": "jdbc:postgresql://",
"plots": "true",
"local": "true",
"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
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ data:
"savetodb": "true",
"dbdriver": "jdbc:postgresql://",
"plots": "true",
"local": "true",
"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 @@ -111,7 +111,7 @@ data:
"savetodb": "true",
"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 @@ -105,7 +105,7 @@ data:
"savetodb": "true",
"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
21 changes: 9 additions & 12 deletions tests/scripts/common/common_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1894,17 +1894,10 @@ function kruize_local_patch() {
CRC_DIR="./manifests/crc/default-db-included-installation"
KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT="${CRC_DIR}/openshift/kruize-crc-openshift.yaml"
KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE="${CRC_DIR}/minikube/kruize-crc-minikube.yaml"


if [ ${cluster_type} == "minikube" ]; then
sed -i 's/"local": "false"/"local": "true"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE}
elif [ ${cluster_type} == "openshift" ]; then
sed -i 's/"local": "false"/"local": "true"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT}
fi
}

#
# "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 +1907,17 @@ 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}
if grep -q '"isROSEnabled": "false"' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE}; then
echo "match found"
sed -i 's/"isROSEnabled": "false"/"isROSEnabled": "true"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE}
else
echo "Error: Match not found" >&2
exit 1
fi
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/\([[: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}
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=true"
kruize_remote_patch
setup "${KRUIZE_POD_LOG}" >> ${KRUIZE_SETUP_LOG} 2>&1
echo "Setting up kruize...Done" | tee -a ${LOG}
Expand Down
Loading