27 lines
640 B
Bash
Executable File
27 lines
640 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
project_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
|
cilium_version=${CILIUM_VERSION:-1.20.0}
|
|
output=${1:?Usage: render.sh OUTPUT_FILE}
|
|
|
|
for command in curl helm; do
|
|
if ! command -v "${command}" >/dev/null 2>&1; then
|
|
echo "Required command not found: ${command}" >&2
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
chart=$(mktemp)
|
|
trap 'rm -f "${chart}"' EXIT
|
|
|
|
curl --fail --silent --show-error --location \
|
|
--output "${chart}" \
|
|
"https://helm.cilium.io/cilium-${cilium_version}.tgz"
|
|
|
|
helm template cilium "${chart}" \
|
|
--namespace kube-system \
|
|
--values "${project_dir}/values.yaml" \
|
|
> "${output}"
|