-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall.sh
executable file
·39 lines (29 loc) · 951 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
function usage() {
echo "Usage:"
echo "$0 <foundation> <namespace>"
echo ""
echo "foundation: ops manager foundation name"
echo "namespace: namespace to deploy the prometheus operator (default: monitoring)"
exit 1
}
set -e
# only exit with zero if all commands of the pipeline exit successfully
set -o pipefail
foundation="${1:-$FOUNDATION}"
namespace="${2:-monitoring}"
release="${3:-prometheus-operator}"
if [ "${1}" == "-h" ] || [ "${1}" == "help" ] || [ "${1}" == "--help" ]; then
usage
fi
if [[ -z "${foundation}" ]]; then
echo "Enter foundation name (e.g. haas-000): "
read -r foundation
fi
__DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck disable=SC1090
# source "${__DIR}/scripts/target-bosh.sh"
cluster=$(kubectl config current-context)
# shellcheck disable=SC1090
source "${__DIR}/scripts/helpers.sh"
install_cluster "${foundation}" "${cluster}" "${namespace}" "${release}"