Skip to content

Commit

Permalink
Update path of Tetragon Helm chart
Browse files Browse the repository at this point in the history
Tetragon Helm chart was moved from install/kubernetes directory to
install/kubernetes/tetragon in cilium/tetragon#1830. This commit updates the
scripts to use the correct path, depending on Tetragon version.

Signed-off-by: Anna Kapuscinska <[email protected]>
  • Loading branch information
lambdanis authored and kkourt committed Dec 9, 2023
1 parent 3de0b7a commit 64e4ab4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
9 changes: 8 additions & 1 deletion generate_readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ for version in \
| sed '/-/!{s/$/_/}' \
| sort -Vr \
| sed 's/_$//'); do
echo "* [v$version](https://github.com/cilium/tetragon/releases/tag/v$version) (_[source](https://github.com/cilium/tetragon/tree/v$version/install/kubernetes)_)"
# Tetragon chart was moved in 1.1 release
TETRAGON_CHART_DIR="install/kubernetes/tetragon"
MAJOR=$(echo "$version" | cut -d. -f1)
MINOR=$(echo "$version" | cut -d. -f2)
if [ "$MAJOR" -lt 1 ] || ([ "$MAJOR" -eq 1 ] && [ "$MINOR" -lt 1 ]); then
TETRAGON_CHART_DIR="install/kubernetes"
fi
echo "* [v$version](https://github.com/cilium/tetragon/releases/tag/v$version) (_[source](https://github.com/cilium/tetragon/tree/v$version/$TETRAGON_CHART_DIR)_)"
done

cat << EOF
Expand Down
10 changes: 9 additions & 1 deletion prepare_tetragon_artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,19 @@ if [ -f "tetragon-${VERSION}.tgz" ]; then
exit 0
fi

# Tetragon chart was moved in 1.1 release
TETRAGON_CHART_DIR="install/kubernetes/tetragon"
MAJOR=$(echo "$VERSION" | cut -d. -f1)
MINOR=$(echo "$VERSION" | cut -d. -f2)
if [ "$MAJOR" -lt 1 ] || ([ "$MAJOR" -eq 1 ] && [ "$MINOR" -lt 1 ]); then
TETRAGON_CHART_DIR="install/kubernetes"
fi

echo "Generating tetragon package from tag: $TAG"
rm -rf tetragon
git clone [email protected]:cilium/tetragon.git
git_checkout_ref "$(pwd)/tetragon" "$TAG"
helm package -d . tetragon/install/kubernetes --version="${VERSION}" --app-version="${VERSION}"
helm package -d . "tetragon/$TETRAGON_CHART_DIR" --version="${VERSION}" --app-version="${VERSION}"
helm repo index . --merge index.yaml
./generate_readme.sh > README.md
git add README.md index.yaml tetragon-"$VERSION".tgz
Expand Down

0 comments on commit 64e4ab4

Please sign in to comment.