softplayer-helmfile/helmule/bitnami/build_charts.sh

25 lines
591 B
Bash
Raw Permalink Normal View History

2024-05-08 15:38:52 +00:00
#! /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"