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

This commit is contained in:
ties 2024-08-29 11:51:20 +00:00
parent 207325f3ea
commit 42bb5e7f86

View File

@ -67,7 +67,7 @@ function checkKubeConfig(){
if [[ -z "$action" ]]; then
action="print"
fi
echo "# action: $action"
echo "# Action: $action"
# if KUBECONFIG_DATA is set
if [[ -n "$KUBECONFIG_DATA" ]]; then
@ -90,8 +90,9 @@ elif [[ "$action" == "helm-print" ]]; then
elif [[ "$action" == "helm-deploy" ]]; then
checkKubeConfig
helm dependency build .
helm template -g . --set-json="subchartData=$(yq '.dependencies[0]' Chart.yaml -ojson | jq -rc)"
helm template -g . --set-json="subchartData=$(yq '.dependencies[0]' Chart.yaml -ojson | jq -rc)" | kubectl apply -f -
helm template -g --set-json="subchartData=$(yq '.dependencies[0]' Chart.yaml -ojson | jq -rc)" .
sleep 10
helm template -g --set-json="subchartData=$(yq '.dependencies[0]' Chart.yaml -ojson | jq -rc)" . | kubectl apply -f -
else
echo "# invalid action"
fi