From 3e2c3a5db20a480cf3b4ecb3fa573d222098d4ab Mon Sep 17 00:00:00 2001 From: gmarek Date: Wed, 7 Sep 2016 12:20:44 +0200 Subject: [PATCH] Make image-puller work on GCI nodes. --- build/common.sh | 1 + cluster/gce/config-default.sh | 3 --- cluster/gce/config-test.sh | 3 --- cluster/gce/gci/configure-helper.sh | 24 ++++++++++++++++++++---- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/build/common.sh b/build/common.sh index d2476287ea9..51bc823c2f3 100755 --- a/build/common.sh +++ b/build/common.sh @@ -943,6 +943,7 @@ function kube::release::package_kube_manifests_tarball() { cp "${salt_dir}/kube-addons/kube-addon-manager.yaml" "${dst_dir}" cp "${salt_dir}/l7-gcp/glbc.manifest" "${dst_dir}" cp "${salt_dir}/rescheduler/rescheduler.manifest" "${dst_dir}/" + cp "${salt_dir}/e2e-image-puller/e2e-image-puller.manifest" "${dst_dir}/" cp "${KUBE_ROOT}/cluster/gce/trusty/configure-helper.sh" "${dst_dir}/trusty-configure-helper.sh" cp "${KUBE_ROOT}/cluster/gce/gci/configure-helper.sh" "${dst_dir}/gci-configure-helper.sh" cp "${KUBE_ROOT}/cluster/gce/gci/health-monitor.sh" "${dst_dir}/health-monitor.sh" diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 70655c4215c..5f3b7488214 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -37,9 +37,6 @@ PREEMPTIBLE_MASTER=${PREEMPTIBLE_MASTER:-false} MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}} NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}} -# By default a cluster will be started with the master on GCI and nodes on -# containervm. If you are updating the containervm version, update this -# variable. CVM_VERSION=container-v1-3-v20160604 GCI_VERSION="gci-dev-54-8743-3-0" MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-} diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index f91f16e5212..d7d01d57aaa 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -38,9 +38,6 @@ PREEMPTIBLE_MASTER=${PREEMPTIBLE_MASTER:-false} MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}} NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}} -# By default a cluster will be started with the master on GCI and nodes on -# containervm. If you are updating the containervm version, update this -# variable. CVM_VERSION=container-v1-3-v20160604 GCI_VERSION="gci-dev-54-8743-3-0" MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-} diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 6ad7ad2afce..4dcc6d3aee7 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -1080,10 +1080,23 @@ function start-fluentd { fi } +# Starts an image-puller - used in test clusters. +function start-image-puller { + echo "Start image-puller" + cp "${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/e2e-image-puller.manifest" \ + /etc/kubernetes/manifests/ +} + +# Starts kube-registry proxy +function start-kube-registry-proxy { + echo "Start kube-registry-proxy" + cp "${KUBE_HOME}/kube-manifests/kubernetes/kube-registry-proxy.yaml" /etc/kubernetes/manifests +} + # Starts a l7 loadbalancing controller for ingress. function start-lb-controller { if [[ "${ENABLE_L7_LOADBALANCING:-}" == "glbc" ]]; then - echo "Starting GCE L7 pod" + echo "Start GCE L7 pod" prepare-log-file /var/log/glbc.log setup-addon-manifests "addons" "cluster-loadbalancing/glbc" cp "${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/glbc.manifest" \ @@ -1094,7 +1107,7 @@ function start-lb-controller { # Starts rescheduler. function start-rescheduler { if [[ "${ENABLE_RESCHEDULER:-}" == "true" ]]; then - echo "Starting Rescheduler" + echo "Start Rescheduler" prepare-log-file /var/log/rescheduler.log cp "${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/rescheduler.manifest" \ /etc/kubernetes/manifests/ @@ -1188,8 +1201,11 @@ else start-kube-proxy # Kube-registry-proxy. if [[ "${ENABLE_CLUSTER_REGISTRY:-}" == "true" ]]; then - cp "${KUBE_HOME}/kube-manifests/kubernetes/kube-registry-proxy.yaml" /etc/kubernetes/manifests - fi + start-kube-registry-proxy + fi + if [[ "${PREPULL_E2E_IMAGES:-}" == "true" ]]; then + start-image-puller + fi fi start-fluentd reset-motd