#!/bin/bash set -e message () { echo "==> $1" } echo echo " 🔖 If you encounter any issues during the installation please open an issue:" echo " https://github.com/typeable/octopod/issues/new" echo 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 <