constellation/cli/internal/helm/generateCilium.sh
Paul Meyer 909bfb9274 bazel: add go generate to //:generate target
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2023-03-29 12:51:40 -04:00

35 lines
566 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
set -o errtrace
shopt -s inherit_errexit
echo "Pulling Cilium Helm chart..."
function cleanup {
rm -r "${ciliumTmpDir}"
}
trap cleanup EXIT
calldir=$(pwd)
ciliumTmpDir=$(mktemp -d)
cd "${ciliumTmpDir}"
git clone \
--filter=blob:none \
--no-checkout \
--sparse \
--depth 1 \
-b 1.12.1 \
https://github.com/cilium/cilium.git
cd cilium
git sparse-checkout add install/kubernetes/cilium
git checkout
git apply "${calldir}/cilium.patch"
cp -r install/kubernetes/cilium "${calldir}/charts"
echo # final newline