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