1
0
Fork 0
vcluster/bin/install-vcluster-apps.sh

30 lines
729 B
Bash
Executable file

#!/bin/sh
set -e
# Applications to install
APPS="dummyhttp reloader"
# Relative PATH to the workdir from the script directory
WORK_DIR_RELPATH="../apps"
# Compute WORKDIR
SCRIPT="$(readlink -f "$0")"
SCRIPT_DIR="$(dirname "$SCRIPT")"
WORK_DIR="$(readlink -f "$SCRIPT_DIR/$WORK_DIR_RELPATH")"
# Update the PATH to add the arkade bin directory
# Add the arkade binary directory to the path if missing
case ":${PATH}:" in
*:"${HOME}/.arkade/bin":*) ;;
*) export PATH="${PATH}:${HOME}/.arkade/bin" ;;
esac
# Go to the working directory
cd "$WORK_DIR" || exit 1
for app in $APPS; do
echo "=> Deploying the '$app' application"
kustomize build "$app" | \
KUBECONFIG=~/.kube/my-vcluster-config kubectl apply -f -
done