diff --git a/contrib/kind/install-tetragon.sh b/contrib/kind/install-tetragon.sh index b9ab827218c..333450476f2 100755 --- a/contrib/kind/install-tetragon.sh +++ b/contrib/kind/install-tetragon.sh @@ -7,9 +7,9 @@ error() { set -eu -PROJECT_ROOT="$(git rev-parse --show-toplevel)" -cd "$PROJECT_ROOT" -source contrib/kind/conf +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +PROJECT_ROOT="$SCRIPT_DIR/../.." +source "$PROJECT_ROOT/contrib/kind/conf" if ! command -v helm &>/dev/null; then error "helm is not in \$PATH! Bailing out!" @@ -28,7 +28,8 @@ usage() { echo " --cluster override cluster name" 1>&2 } -BASE_VALUES="${TETRAGON_KIND_BASE_VALUES:-contrib/kind/values.yaml}" +BASE_VALUES="${TETRAGON_KIND_BASE_VALUES:-"$PROJECT_ROOT/contrib/kind/values.yaml"}" +HELM_CHART="${TETRAGON_KIND_HELM_CHART:-"$PROJECT_ROOT/install/kubernetes/tetragon"}" FORCE=0 VALUES="" @@ -85,7 +86,7 @@ if [ -n "$VALUES" ]; then fi echo "Installing Tetragon in cluster..." 1>&2 -helm upgrade --install tetragon install/kubernetes/tetragon \ +helm upgrade --install tetragon "$HELM_CHART" \ -n "$NAMESPACE" \ -f "$BASE_VALUES" "${extra_opts[@]}"