From 7a5b6938670027b4577a9c26bbcec4c4429f57ee Mon Sep 17 00:00:00 2001 From: ties Date: Thu, 29 Aug 2024 14:33:07 +0000 Subject: [PATCH] Update createHelmYaml.sh --- createHelmYaml.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/createHelmYaml.sh b/createHelmYaml.sh index e92b252..fc65bec 100644 --- a/createHelmYaml.sh +++ b/createHelmYaml.sh @@ -21,7 +21,7 @@ function checkKubeConfig(){ } function printHelm(){ 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(){ @@ -29,7 +29,7 @@ function deployHelm(){ printHelm echo "Deploying in 5 seconds..." 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 - }