Update createServiceAccount.sh
All checks were successful
Build docker container / Build image (push) Successful in 14s

This commit is contained in:
ties 2024-09-06 10:25:51 +00:00
parent 79afa82f65
commit c43effd168

View File

@ -3,8 +3,13 @@
NAMESPACE=$(yq e '.chart_template.namespace' values.yaml)
SA_NAME="${NAMESPACE}-cicd"
helm dependency build .
HELM_OUTPUT=$(helm template -g --set-json="chart_template.subchartData=$(yq '.dependencies[] | select(.condition == "subchart")' Chart.yaml -ojson | jq -rc)" .)
HELM_OUTPUT=""
if [ -e "Chart.yaml" ]; then
helm dependency build .
HELM_OUTPUT=$(helm template -g --set-json="chart_template.subchartData=$(yq '.dependencies[] | select(.condition == "subchart")' Chart.yaml -ojson | jq -rc)" .)
else
HELM_OUTPUT=$(cat ./*.yaml)
fi
resources=$(echo "$HELM_OUTPUT" | yq -o=json | jq -rc '{apiVersion, kind}' | sort | uniq)