diff --git a/Makefile b/Makefile index f843fcc..06a1a8e 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ export ARTIFACT_DIR ?= $(shell readlink -m .artifacts) export PROJ_ROOT := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Name of the namespace to install locust operator as well as to run Pods of master and workers. -LOCUST_NAMESPACE=locust-operator +LOCUST_NAMESPACE ?= locust-operator # Helm repository name to install locust operator from LOCUST_OPERATOR_REPO=locust-k8s-operator @@ -188,7 +188,7 @@ endif kubectl create --namespace $(LOCUST_NAMESPACE) configmap locust.$(SCENARIO) --from-file scenarios/$(SCENARIO).py --dry-run=client -o yaml | kubectl apply --namespace $(LOCUST_NAMESPACE) -f - date --utc -Ins>$(TMP_DIR)/benchmark-before timeout=$$(date -d "680 seconds" "+%s"); while [ -z "$$(kubectl get --namespace $(LOCUST_NAMESPACE) pod -l performance-test-pod-name=$(SCENARIO)-test-master -o name)" ]; do if [ "$$(date "+%s")" -gt "$$timeout" ]; then echo "ERROR: Timeout waiting for locust master pod to start"; exit 1; else echo "Waiting for locust master pod to start..."; sleep 5s; fi; done - kubectl wait --namespace $(LOCUST_NAMESPACE) --for=condition=Ready=true $$(kubectl get --namespace $(LOCUST_NAMESPACE) pod -l performance-test-pod-name=$(SCENARIO)-test-master -o name) + kubectl wait --namespace $(LOCUST_NAMESPACE) --for=condition=Ready=true $$(kubectl get --namespace $(LOCUST_NAMESPACE) pod -l performance-test-pod-name=$(SCENARIO)-test-master -o name) --timeout=60s @echo "Getting locust master log:" kubectl logs --namespace $(LOCUST_NAMESPACE) -f -l performance-test-pod-name=$(SCENARIO)-test-master | tee load-test.log date --utc -Ins>$(TMP_DIR)/benchmark-after diff --git a/ci-scripts/rhdh-setup/deploy.sh b/ci-scripts/rhdh-setup/deploy.sh index 892c458..c6ff98c 100755 --- a/ci-scripts/rhdh-setup/deploy.sh +++ b/ci-scripts/rhdh-setup/deploy.sh @@ -16,7 +16,7 @@ source ./create_resource.sh export RHDH_NAMESPACE=${RHDH_NAMESPACE:-rhdh-performance} export RHDH_HELM_RELEASE_NAME=${RHDH_HELM_RELEASE_NAME:-rhdh} -export RHDH_OPERATOR_NAMESPACE=rhdh-operator +export RHDH_OPERATOR_NAMESPACE=${RHDH_OPERATOR_NAMESPACE:-rhdh-operator} cli="oc" clin="$cli -n $RHDH_NAMESPACE" @@ -329,7 +329,7 @@ install_rhdh_with_olm() { $clin apply -f "$TMP_DIR/dynamic-plugins.configmap.yaml" mark_resource_for_rhdh cm dynamic-plugins-rhdh set -x - OLM_CHANNEL="${RHDH_OLM_CHANNEL}" UPSTREAM_IIB="${RHDH_OLM_INDEX_IMAGE}" ./install-rhdh-catalog-source.sh --install-operator "${RHDH_OLM_OPERATOR_PACKAGE:-rhdh}" + OLM_CHANNEL="${RHDH_OLM_CHANNEL}" UPSTREAM_IIB="${RHDH_OLM_INDEX_IMAGE}" NAMESPACE_SUBSCRIPTION="${RHDH_OPERATOR_NAMESPACE}" ./install-rhdh-catalog-source.sh --install-operator "${RHDH_OLM_OPERATOR_PACKAGE:-rhdh}" set +x wait_for_crd backstages.rhdh.redhat.com diff --git a/ci-scripts/rhdh-setup/install-rhdh-catalog-source.sh b/ci-scripts/rhdh-setup/install-rhdh-catalog-source.sh index fa64213..5c9e8f9 100755 --- a/ci-scripts/rhdh-setup/install-rhdh-catalog-source.sh +++ b/ci-scripts/rhdh-setup/install-rhdh-catalog-source.sh @@ -27,7 +27,7 @@ RED='\033[0;31m' NC='\033[0m' NAMESPACE_CATALOGSOURCE="openshift-marketplace" -NAMESPACE_SUBSCRIPTION="rhdh-operator" +NAMESPACE_SUBSCRIPTION="${NAMESPACE_SUBSCRIPTION:-rhdh-operator}" OLM_CHANNEL="${OLM_CHANNEL:-fast}" errorf() {