From aac7de52100c1e5ee1aa2d0ef938800926cc84cc Mon Sep 17 00:00:00 2001 From: Alex-Sizov <45825279+Alex-Sizov@users.noreply.github.com> Date: Tue, 24 Aug 2021 19:08:23 +0300 Subject: [PATCH] Octopod kind (#66) * add local install script * Make the script executable * add force update flag * add some checks to the kind script * name kind cluster+deletion confirmation * add wait flags to helm * More informative local install script Co-authored-by: Denis Redozubov --- octopod_local_install.sh | 101 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100755 octopod_local_install.sh diff --git a/octopod_local_install.sh b/octopod_local_install.sh new file mode 100755 index 0000000..4dc6e46 --- /dev/null +++ b/octopod_local_install.sh @@ -0,0 +1,101 @@ +#!/bin/bash +set -e +message () { + echo "==> $1" +} +for cmd in kind kubectl helm; do + if ! command -v $cmd &> /dev/null; then + message "$cmd is not installed. Please, install it!" + exit 1; + fi +done +if [ "$(helm version --short | awk -F '.' '{print $1}')" != "v3" ]; then + message 'Your version of helm is not supported. Please install helm 3' + exit 1 +fi +if [ "$(kind version | awk -F ' ' '{print $2}')" != "v0.11.1" ]; then + message "Warning! This kind version hasn't been tested" +fi +if kind get clusters | grep -q octopod; then + echo -n 'Octopod kind cluster already exists. Do you want do delete it? [y/n] '; + read confirm + if [ "$confirm" != 'y' ]; then + message "Exiting" + exit 0 + else + message "Deleting and recreating cluster" + kind delete cluster --name octopod + fi +fi +message "Creating kind cluster" +cat <