24 lines
501 B
Bash
Executable File
24 lines
501 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
if [ -z "${KUBECONFIG}" ]; then
|
|
KUBECONFIG=~/.kube/config
|
|
fi
|
|
|
|
if [ -z "${NAMESPACE}" ]; then
|
|
NAMESPACE=monitoring
|
|
fi
|
|
|
|
kctl() {
|
|
kubectl --kubeconfig="$KUBECONFIG" -n "$NAMESPACE" "$@"
|
|
}
|
|
|
|
kctl delete -f manifests/exporters
|
|
kctl delete -f manifests/grafana
|
|
kctl delete -f manifests/prometheus
|
|
kctl delete -f manifests/alertmanager
|
|
|
|
# Hack: wait a bit to let the controller delete the deployed Prometheus server.
|
|
sleep 5
|
|
|
|
kctl delete -f manifests/prometheus-operator.yaml
|