From 4360d4572bfb7bf7beb8236adec860a96b0e1272 Mon Sep 17 00:00:00 2001 From: Ray Wainman Date: Tue, 26 Sep 2023 19:26:54 +0000 Subject: [PATCH] Fix vpa-up.sh script by removing duplicate recommender from vpa-process-yamls.sh. Tweak that script so that it can accept recommender-externalmetrics as an argument. --- vertical-pod-autoscaler/hack/vpa-process-yamls.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/vertical-pod-autoscaler/hack/vpa-process-yamls.sh b/vertical-pod-autoscaler/hack/vpa-process-yamls.sh index da853e9d8bed..6233c735e3a2 100755 --- a/vertical-pod-autoscaler/hack/vpa-process-yamls.sh +++ b/vertical-pod-autoscaler/hack/vpa-process-yamls.sh @@ -40,17 +40,16 @@ if [ $# -gt 2 ]; then fi ACTION=$1 -COMPONENTS="vpa-v1-crd-gen vpa-rbac updater-deployment recommender-deployment admission-controller-deployment recommender-externalmetrics-deployment" -TEST_COMPONENTS=(recommender-externalmetrics-deployment) +COMPONENTS="vpa-v1-crd-gen vpa-rbac updater-deployment recommender-deployment admission-controller-deployment" function script_path { # Regular components have deployment yaml files under /deploy/. But some components only have - # test deployment yaml files that are under hack/e2e. If $1 is one of ${TEST_COMPONENTS}, use - # the hack/e2e subdir instead of deploy. - if printf '%s\0' "${TEST_COMPONENTS[@]}" | grep -Fqxz -- $1; then - echo "${SCRIPT_ROOT}/hack/e2e/${1}.yaml" - else + # test deployment yaml files that are under hack/e2e. Check the main deploy directory before + # using the e2e subdirectory. + if test -f "${SCRIPT_ROOT}/deploy/${1}.yaml"; then echo "${SCRIPT_ROOT}/deploy/${1}.yaml" + else + echo "${SCRIPT_ROOT}/hack/e2e/${1}.yaml" fi }