softplayer-helmfile/helmule/bitnami/build_charts.sh
2024-05-08 17:38:52 +02:00

25 lines
591 B
Bash
Executable File

#! /usr/bin/env bash
export REPO_NAME=bitnami
export REPO_URL=https://charts.bitnami.com/bitnami
WORKDIR=$(mktemp -d)
envsubst < ./helmule.yaml > "${WORKDIR}/helmule.yaml"
cat "${WORKDIR}/helmule.yaml"
helm repo add $REPO_NAME $REPO_URL
helm repo update
for chart in $(helm search repo bitnami -o yaml | yq '.[].name' | sed -e 's/.*\///'); do
export CHART_NAME=$chart
envsubst < ./charts.yaml.tpl > "$WORKDIR/$chart.yaml"
cat <<EOF >> $WORKDIR/helmule.yaml
- kind: Charts
path: "./$chart.yaml"
EOF
done
cat "${WORKDIR}/helmule.yaml"
helmule --config "${WORKDIR}/helmule.yaml"