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

This commit is contained in:
ties 2024-08-29 14:33:07 +00:00
parent dbf6bfe2c8
commit 7a5b693867

View File

@ -21,7 +21,7 @@ function checkKubeConfig(){
} }
function printHelm(){ function printHelm(){
helm dependency build . helm dependency build .
helm template -g . --set-json="chart_template.subchartData=$(yq '.dependencies[0]' Chart.yaml -ojson | jq -rc)" helm template -g . --set-json="chart_template.subchartData=$(yq '.dependencies[] | select(.condition == "subchart")' Chart.yaml -ojson | jq -rc)"
} }
function deployHelm(){ function deployHelm(){
@ -29,7 +29,7 @@ function deployHelm(){
printHelm printHelm
echo "Deploying in 5 seconds..." echo "Deploying in 5 seconds..."
sleep 5 sleep 5
helm template -g --set-json="chart_template.subchartData=$(yq '.dependencies[0]' Chart.yaml -ojson | jq -rc)" . | kubectl apply -f - helm template -g --set-json="chart_template.subchartData=$(yq '.dependencies[] | select(.condition == "subchart")' Chart.yaml -ojson | jq -rc)" . | kubectl apply -f -
} }