-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy
executable file
·31 lines (24 loc) · 858 Bytes
/
deploy
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
#!/usr/bin/env bash
if [ -z "${KUBECONFIG}" ]; then
export KUBECONFIG=~/.kube/config
fi
if [ -z "${NAMESPACE}" ]; then
NAMESPACE=monitoring
fi
kubectl create namespace "$NAMESPACE"
kctl() {
kubectl --namespace "$NAMESPACE" "$@"
}
kctl apply -f manifests/prometheus-operator
# Wait for TPRs to be ready.
printf "Waiting for Operator to register third party objects..."
until kctl get servicemonitor > /dev/null 2>&1; do sleep 1; printf "."; done
until kctl get prometheus > /dev/null 2>&1; do sleep 1; printf "."; done
until kctl get alertmanager > /dev/null 2>&1; do sleep 1; printf "."; done
echo "done!"
kctl apply -f manifests/exporters
kctl apply -f manifests/grafana/grafana-credentials.yaml
kctl apply -f manifests/grafana
kctl apply -f manifests/prometheus/
kctl apply -f manifests/alertmanager/
kubectl apply -f manifests/kismatic