Merge pull request #26363 from wonderfly/fix-yaml-search-path

GCI: Fix yaml search path
This commit is contained in:
Alex Robinson 2016-05-27 09:58:03 -07:00
commit ba3bf90448

View File

@ -165,9 +165,9 @@ function install-kube-binary-config {
tar xzf "${KUBE_HOME}/${manifests_tar}" -C "${dst_dir}" --overwrite
local -r kube_addon_registry="${KUBE_ADDON_REGISTRY:-gcr.io/google_containers}"
if [[ "${kube_addon_registry}" != "gcr.io/google_containers" ]]; then
find "${dst_dir}" -maxdepth 1 -name \*.yaml -or -name \*.yaml.in | \
find "${dst_dir}/kubernetes" -maxdepth 1 -name \*.yaml -or -name \*.yaml.in | \
xargs sed -ri "s@(image:\s.*)gcr.io/google_containers@\1${kube_addon_registry}@"
find "${dst_dir}" -maxdepth 1 -name \*.manifest -or -name \*.json | \
find "${dst_dir}/kubernetes" -maxdepth 1 -name \*.manifest -or -name \*.json | \
xargs sed -ri "s@(image\":\s+\")gcr.io/google_containers@\1${kube_addon_registry}@"
fi
cp "${dst_dir}/kubernetes/gci-trusty/gci-configure-helper.sh" "${KUBE_HOME}/bin/configure-helper.sh"