From 6ef39b3063ca7f6da8033391014cefcd388b37a9 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Wed, 20 Mar 2024 08:44:11 -0500 Subject: [PATCH] Update scripts/gen-os-secrets.sh Co-authored-by: Marek Skrobacki --- scripts/gen-os-secrets.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/gen-os-secrets.sh b/scripts/gen-os-secrets.sh index ff86779cd..43cdd720a 100755 --- a/scripts/gen-os-secrets.sh +++ b/scripts/gen-os-secrets.sh @@ -17,6 +17,12 @@ if ! type -p kubectl > /dev/null; then exit 1 fi +KUSTOMIZE_VERSION=$(kubectl version --client -o yaml | yq .kustomizeVersion) +if ! (echo -e "v5.0.0\n$KUSTOMIZE_VERSION" | sort -V -C); then + echo "kustomize needs to be at version 5.0.0 or newer (comes with kubectl 1.27+)" + exit 1 +fi + SCRIPTS_DIR="$(dirname "$0")" echo "This script will attempt to look up the existing values this repo used"