Factor out validate-cluster.sh call from kube-up.sh

Not every cluster can be validated the same way. Factoring out the
validate-cluster call into a kube-util.sh function allows customization.

This allows to proceed with GoogleCloudPlatform/kubernetes#10049 before
the mid/long-term unified cluster validation in GoogleCloudPlatform/kubernetes#11908
is implemented. Otherwise, the later blocks the former.
This commit is contained in:
Dr. Stefan Schimanski 2015-08-02 14:25:34 +02:00
parent 908b1e08f1
commit 8a48a74103
2 changed files with 9 additions and 2 deletions

View File

@ -36,8 +36,8 @@ verify-prereqs
echo "... calling kube-up" >&2
kube-up
echo "... calling validate-cluster.sh" >&2
"${KUBE_ROOT}/cluster/validate-cluster.sh"
echo "... calling validate-cluster" >&2
validate-cluster
echo -e "Done, listing cluster services:\n" >&2
"${KUBE_ROOT}/cluster/kubectl.sh" cluster-info

View File

@ -39,6 +39,13 @@ function verify-prereqs {
echo "TODO: verify-prereqs" 1>&2
}
# Validate a kubernetes cluster
function validate-cluster {
# by default call the generic validate-cluster.sh script, customizable by
# any cluster provider if this does not fit.
"${KUBE_ROOT}/cluster/validate-cluster.sh"
}
# Instantiate a kubernetes cluster
function kube-up {
echo "TODO: kube-up" 1>&2