mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
39 lines
882 B
Bash
Executable file
39 lines
882 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -eo pipefail
|
|
|
|
# All checks run in the workshop root folder
|
|
cd "$(dirname "$0")"/..
|
|
|
|
. checks/utils.sh
|
|
|
|
EXIT=0
|
|
|
|
|
|
function cluster_info() {
|
|
kubectl cluster-info &>/dev/null
|
|
}
|
|
|
|
function ingress() {
|
|
kubectl -n traefik get all &>/dev/null
|
|
kubectl -n traefik get deployment.apps/traefik &>/dev/null
|
|
curl http://${WORKSHOP_INGRESS_DOMAIN} &>/dev/null
|
|
}
|
|
|
|
function container_registry() {
|
|
curl --fail http://${WORKSHOP_INGRESS_DOMAIN}:5000/v2/_catalog &>/dev/null
|
|
}
|
|
|
|
|
|
must_declare WORKSHOP_INGRESS_DOMAIN
|
|
must_declare WORKSHOP_NAMESPACE
|
|
|
|
check cluster_info "k8s API controller is running"
|
|
check ingress "Traefik ingress is running at http://${WORKSHOP_INGRESS_DOMAIN}"
|
|
|
|
if [ x"${WORKSHOP_CLUSTER_RUNTIME}" == x"kind" ]; then
|
|
check container_registry "Container registry is running at ${WORKSHOP_INGRESS_DOMAIN}:5000"
|
|
fi
|
|
|
|
exit $EXIT
|
|
|