From eeed115128d28f436559a422caa5fe2a64ebfa13 Mon Sep 17 00:00:00 2001 From: ties Date: Tue, 27 Aug 2024 11:21:58 +0000 Subject: [PATCH] Update createHelmYaml.sh --- createHelmYaml.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/createHelmYaml.sh b/createHelmYaml.sh index cd14ae9..c05f7d8 100644 --- a/createHelmYaml.sh +++ b/createHelmYaml.sh @@ -44,8 +44,7 @@ createHelmYaml() { } # if KUBECONFIG_DATA is set -if [[ -z "$KUBECONFIG_DATA" ]]; then -# echo "# Installing ~/.kube/config" +if [[ -n "$KUBECONFIG_DATA" ]]; then mkdir -p /home/notroot/.kube echo "$KUBECONFIG_DATA" > /home/notroot/.kube/config fi @@ -53,10 +52,8 @@ fi # Check if the action environment variable is set to 'print' if [[ "$action" == "print" ]]; then createHelmYaml -elif [[ "$KUBECONFIG_DATA" ]]; then - wc -l /home/notroot/.kube/config - ls -alh /home/notroot/.kube/config - kubectl version --client=true +elif [[ -n "$KUBECONFIG_DATA" ]]; then + kubectl version else kubectl version --client=true fi