From 4d3af3737154119a53757362d7a9990d056fb79f Mon Sep 17 00:00:00 2001 From: ties Date: Tue, 27 Aug 2024 12:27:03 +0000 Subject: [PATCH] Update createHelmYaml.sh --- createHelmYaml.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/createHelmYaml.sh b/createHelmYaml.sh index e803425..411543f 100644 --- a/createHelmYaml.sh +++ b/createHelmYaml.sh @@ -43,18 +43,19 @@ createHelmYaml() { echo "$helm_chart_yaml" } -# if KUBECONFIG_DATA is set -if [[ -n "$KUBECONFIG_DATA" ]]; then - mkdir -p /home/notroot/.kube - echo "$KUBECONFIG_DATA" > /home/notroot/.kube/config -fi - # if actions is not set if [[ -n "$action" ]]; then action="print" fi echo "# action: $action" +# if KUBECONFIG_DATA is set +if [[ -n "$KUBECONFIG_DATA" ]]; then + mkdir -p /home/notroot/.kube + echo "$KUBECONFIG_DATA" > /home/notroot/.kube/config + echo "# .kube/config is set" +fi + # Check if the action environment variable is set to 'print' if [[ "$action" == "print" ]]; then createHelmYaml