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

This commit is contained in:
ties 2024-08-27 11:21:58 +00:00
parent 8a92e45d1f
commit eeed115128

View File

@ -44,8 +44,7 @@ createHelmYaml() {
} }
# if KUBECONFIG_DATA is set # if KUBECONFIG_DATA is set
if [[ -z "$KUBECONFIG_DATA" ]]; then if [[ -n "$KUBECONFIG_DATA" ]]; then
# echo "# Installing ~/.kube/config"
mkdir -p /home/notroot/.kube mkdir -p /home/notroot/.kube
echo "$KUBECONFIG_DATA" > /home/notroot/.kube/config echo "$KUBECONFIG_DATA" > /home/notroot/.kube/config
fi fi
@ -53,10 +52,8 @@ fi
# Check if the action environment variable is set to 'print' # Check if the action environment variable is set to 'print'
if [[ "$action" == "print" ]]; then if [[ "$action" == "print" ]]; then
createHelmYaml createHelmYaml
elif [[ "$KUBECONFIG_DATA" ]]; then elif [[ -n "$KUBECONFIG_DATA" ]]; then
wc -l /home/notroot/.kube/config kubectl version
ls -alh /home/notroot/.kube/config
kubectl version --client=true
else else
kubectl version --client=true kubectl version --client=true
fi fi