Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrib/kind: Make install-tetragon.sh script more portable #2682

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions contrib/kind/install-tetragon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand All @@ -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=""
Expand Down Expand Up @@ -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[@]}"

Expand Down
Loading