Move sourcing of provider-specific util.sh into kube-util.sh

- kube-util.sh defines default implementations
- provider util.sh overrides the default implementations as desired
- default kube-util functions now print to stderr to avoid affecting
  captured output
This commit is contained in:
Karl Isenberg
2015-07-02 09:48:31 -07:00
parent 05ce0472e9
commit 0229cb01fc
7 changed files with 31 additions and 24 deletions

View File

@@ -32,10 +32,7 @@ set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${KUBE_ROOT}/cluster/kube-env.sh"
UTILS=${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh
if [ -f ${UTILS} ]; then
source "${UTILS}"
fi
source "${KUBE_ROOT}/cluster/kube-util.sh"
# Get the absolute path of the directory component of a file, i.e. the
# absolute path of the dirname of $1.