GCI: correct the fix in #26363

This commit is contained in:
Andy Zheng 2016-06-02 10:06:53 -07:00
parent 914163247d
commit 42b299abba
2 changed files with 6 additions and 8 deletions

View File

@ -624,7 +624,7 @@ function start-kube-scheduler {
# Starts cluster autoscaler.
function start-cluster-autoscaler {
if [ "${ENABLE_NODE_AUTOSCALER:-}" = "true" ]; then
if [[ "${ENABLE_NODE_AUTOSCALER:-}" == "true" ]]; then
echo "Start kubernetes cluster autoscaler"
prepare-log-file /var/log/cluster-autoscaler.log
@ -712,9 +712,6 @@ function start-kube-addons {
sed -i -e "s@{{ *metrics_memory_per_node *}}@${metrics_memory_per_node}@g" "${controller_yaml}"
sed -i -e "s@{{ *eventer_memory_per_node *}}@${eventer_memory_per_node}@g" "${controller_yaml}"
fi
if [[ "${ENABLE_L7_LOADBALANCING:-}" == "glbc" ]]; then
setup-addon-manifests "addons" "cluster-loadbalancing/glbc"
fi
if [[ "${ENABLE_CLUSTER_DNS:-}" == "true" ]]; then
setup-addon-manifests "addons" "dns"
local -r dns_rc_file="${dst_dir}/dns/skydns-rc.yaml"
@ -771,8 +768,9 @@ function start-lb-controller {
if [[ "${ENABLE_L7_LOADBALANCING:-}" == "glbc" ]]; then
echo "Starting GCE L7 pod"
prepare-log-file /var/log/glbc.log
local -r src_file="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/glbc.manifest"
cp "${src_file}" /etc/kubernetes/manifests/
setup-addon-manifests "addons" "cluster-loadbalancing/glbc"
cp "${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/glbc.manifest" \
/etc/kubernetes/manifests/
fi
}

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}/kubernetes" -maxdepth 1 -name \*.yaml -or -name \*.yaml.in | \
find "${dst_dir}" -name \*.yaml -or -name \*.yaml.in | \
xargs sed -ri "s@(image:\s.*)gcr.io/google_containers@\1${kube_addon_registry}@"
find "${dst_dir}/kubernetes" -maxdepth 1 -name \*.manifest -or -name \*.json | \
find "${dst_dir}" -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"