From 0672f5668c8efdfe2a894279d55322e8c3d58bc8 Mon Sep 17 00:00:00 2001 From: Andre Marcelo-Tanner Date: Wed, 29 Nov 2023 23:37:05 -0500 Subject: [PATCH] revert version upgrade and just rely on docs --- test/kustomize/test.sh | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/test/kustomize/test.sh b/test/kustomize/test.sh index 9886921771..2efb34598f 100755 --- a/test/kustomize/test.sh +++ b/test/kustomize/test.sh @@ -1,41 +1,10 @@ #!/bin/bash -PROJECT_ROOT=$(cd $(dirname ${BASH_SOURCE})/../..; pwd) -DIST_PATH="${PROJECT_ROOT}/dist" - -kustomize_cmd="kustomize" -kustomize_version=v5.2.1 -kustomize_major_version=v5 - -# check if local kustomize is installed -if test -x "${DIST_PATH}/kustomize"; then - kustomize_cmd="${DIST_PATH}/kustomize" - # we are unable to check local version of kustomize as it returns (devel) if installs via go install -else - # check if kustomize in path exists and is the expected version - install_kustomize=false - if ! command -v kustomize &> /dev/null; then - echo "kustomize not found in path." - install_kustomize=true - elif ! kustomize version | grep -q "${kustomize_version}"; then - echo "kustomize version is not expected." - install_kustomize=true - fi - - # install local kustomize if needed - if ${install_kustomize}; then - echo "Installing local version ${kustomize_version} to ${DIST_PATH}/kustomize"; - GOBIN="${DIST_PATH}" GO111MODULE=on go install "sigs.k8s.io/kustomize/kustomize/${kustomize_major_version}@${kustomize_version}" - kustomize_cmd="${DIST_PATH}/kustomize" - fi -fi -echo "Using kustomize: ${kustomize_cmd}" - DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" for i in `ls ${DIR}/*/kustomization.yaml`; do dir_name=$(dirname $i) - diff_out=$(diff ${dir_name}/expected.yaml <("${kustomize_cmd}" build ${dir_name} --load-restrictor=LoadRestrictionsNone)) + diff_out=$(diff ${dir_name}/expected.yaml <(kustomize build ${dir_name} --load-restrictor=LoadRestrictionsNone)) if [[ $? -ne 0 ]]; then echo "${i} had unexpected diff:" echo "${diff_out}"