Skip to content

Commit

Permalink
incorporated review comments
Browse files Browse the repository at this point in the history
Signed-off-by: msvinaykumar <[email protected]>
  • Loading branch information
msvinaykumar committed Dec 9, 2024
1 parent 072ed90 commit a0b3bdc
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 20 deletions.
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,6 @@ 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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ 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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,9 @@ private KruizeObject createKruizeObject(String target_cluster) {
Map<String, KruizeObject> mainKruizeExperimentMAP = new ConcurrentHashMap<>();
KruizeObject kruizeObject = new KruizeObject();
try {

if (KruizeDeploymentInfo.is_ros_enabled && null != target_cluster && target_cluster.equalsIgnoreCase(AnalyzerConstants.REMOTE)) { // todo call this in function and use across every where
if (KruizeDeploymentInfo.is_ros_enabled &&
(null == target_cluster || target_cluster.equalsIgnoreCase(AnalyzerConstants.REMOTE))
) { // todo call this in function and use across every where
new ExperimentDBService().loadExperimentFromDBByName(mainKruizeExperimentMAP, experimentName);
} else {
new ExperimentDBService().loadLMExperimentFromDBByName(mainKruizeExperimentMAP, experimentName);
Expand Down
13 changes: 0 additions & 13 deletions tests/scripts/common/common_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1894,13 +1894,6 @@ 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
}

#
Expand All @@ -1914,23 +1907,17 @@ function kruize_remote_patch() {


if [ ${cluster_type} == "minikube" ]; then
#sed -i 's/"isROSEnabled": "false"/"isROSEnabled": "true"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE}
#sed -i 's/"local": "true"/"local": "false"/' ${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
#sed -i '/"local": "false"/a \ \ \ \ "isROSEnabled": "true",' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE}
elif [ ${cluster_type} == "openshift" ]; then
#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/"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

0 comments on commit a0b3bdc

Please sign in to comment.