diff --git a/manifests/crc/BYODB-installation/minikube/kruize-crc-minikube.yaml b/manifests/crc/BYODB-installation/minikube/kruize-crc-minikube.yaml index d7da66483..3b7cce4f1 100644 --- a/manifests/crc/BYODB-installation/minikube/kruize-crc-minikube.yaml +++ b/manifests/crc/BYODB-installation/minikube/kruize-crc-minikube.yaml @@ -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", diff --git a/manifests/crc/BYODB-installation/openshift/kruize-crc-openshift.yaml b/manifests/crc/BYODB-installation/openshift/kruize-crc-openshift.yaml index 81dcf9214..052d267df 100644 --- a/manifests/crc/BYODB-installation/openshift/kruize-crc-openshift.yaml +++ b/manifests/crc/BYODB-installation/openshift/kruize-crc-openshift.yaml @@ -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", diff --git a/manifests/crc/default-db-included-installation/aks/kruize-crc-aks.yaml b/manifests/crc/default-db-included-installation/aks/kruize-crc-aks.yaml index 2541a16ca..3d21a4acc 100644 --- a/manifests/crc/default-db-included-installation/aks/kruize-crc-aks.yaml +++ b/manifests/crc/default-db-included-installation/aks/kruize-crc-aks.yaml @@ -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", diff --git a/manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml b/manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml index 66d0b8733..ff2557dc8 100644 --- a/manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml +++ b/manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml @@ -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", diff --git a/manifests/crc/default-db-included-installation/openshift/kruize-crc-openshift.yaml b/manifests/crc/default-db-included-installation/openshift/kruize-crc-openshift.yaml index 2deb3b954..863d2a696 100644 --- a/manifests/crc/default-db-included-installation/openshift/kruize-crc-openshift.yaml +++ b/manifests/crc/default-db-included-installation/openshift/kruize-crc-openshift.yaml @@ -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", diff --git a/tests/scripts/common/common_functions.sh b/tests/scripts/common/common_functions.sh index 418968c10..cc0f329ce 100755 --- a/tests/scripts/common/common_functions.sh +++ b/tests/scripts/common/common_functions.sh @@ -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() { @@ -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 } diff --git a/tests/scripts/remote_monitoring_tests/remote_monitoring_tests.sh b/tests/scripts/remote_monitoring_tests/remote_monitoring_tests.sh index 2b2964958..06e8bb09a 100755 --- a/tests/scripts/remote_monitoring_tests/remote_monitoring_tests.sh +++ b/tests/scripts/remote_monitoring_tests/remote_monitoring_tests.sh @@ -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}