Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelhar committed Nov 13, 2024
1 parent 3f80117 commit 08e9bd4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/eks/submodules/k8s/templates/k8s-functions.sh.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

RED="\e[31m"
GREEN="\e[32m"
YELLOW="\e[33m"
EC="\e[0m"

KUBECONFIG="${kubeconfig_path}"
Expand Down Expand Up @@ -129,17 +130,20 @@ install_calico() {
--create-namespace \
--install; then

echo "Calico installation succeeded."
printf "$GREEN Calico installation succeeded. $EC \n"
break

else
echo "Helm install attempt $i failed."
printf "$YELLOW Helm install attempt $i failed. $EC \n"

if [ $i -lt $max_retries ]; then
echo "Retrying in ${sleep_duration}s..."
printf "Retrying in $sleep_duration s..."
sleep $sleep_duration
else
printf "$RED Maximum attempts reached. Exiting. $EC \n"
exit 1
fi

fi
done
}
Expand Down

0 comments on commit 08e9bd4

Please sign in to comment.