diff --git a/build/lib/release.sh b/build/lib/release.sh index fa8b34c3d75..318aba2ccf4 100644 --- a/build/lib/release.sh +++ b/build/lib/release.sh @@ -320,6 +320,7 @@ function kube::release::package_kube_manifests_tarball() { 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/mounter" "${dst_dir}/gci-mounter" cp "${KUBE_ROOT}/cluster/gce/gci/health-monitor.sh" "${dst_dir}/health-monitor.sh" cp -r "${salt_dir}/kube-admission-controls/limit-range" "${dst_dir}" local objects diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index b4d3e0ce84d..776d92a211a 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -475,6 +475,7 @@ function start-kubelet { flags+=" --config=/etc/kubernetes/manifests" flags+=" --kubelet-cgroups=/kubelet" flags+=" --system-cgroups=/system" + flags+=" --mounter-path=${KUBE_HOME}/bin/mounter" if [[ -n "${KUBELET_PORT:-}" ]]; then flags+=" --port=${KUBELET_PORT}" diff --git a/cluster/gce/gci/configure.sh b/cluster/gce/gci/configure.sh index fcd9e3e9743..8c59ca2ac67 100644 --- a/cluster/gce/gci/configure.sh +++ b/cluster/gce/gci/configure.sh @@ -99,7 +99,7 @@ function split-commas { } # Downloads kubernetes binaries and kube-system manifest tarball, unpacks them, -# and places them into suitable directories. Files are placed in /home/kubernetes. +# and places them into suitable directories. Files are placed in /home/kubernetes. function install-kube-binary-config { cd "${KUBE_HOME}" local -r server_binary_tar_urls=( $(split-commas "${SERVER_BINARY_TAR_URL}") ) @@ -171,6 +171,7 @@ function install-kube-binary-config { 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" + cp "${dst_dir}/kubernetes/gci-trusty/gci-mounter" "${KUBE_HOME}/bin/mounter" cp "${dst_dir}/kubernetes/gci-trusty/health-monitor.sh" "${KUBE_HOME}/bin/health-monitor.sh" chmod -R 755 "${kube_bin}" diff --git a/cluster/gce/gci/master.yaml b/cluster/gce/gci/master.yaml index 845973df84b..78b39164ae4 100644 --- a/cluster/gce/gci/master.yaml +++ b/cluster/gce/gci/master.yaml @@ -34,6 +34,7 @@ write_files: Type=oneshot RemainAfterExit=yes ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure-helper.sh + ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/mounter ExecStart=/home/kubernetes/bin/configure-helper.sh [Install] diff --git a/cluster/gce/gci/mounter/mounter b/cluster/gce/gci/mounter/mounter new file mode 100644 index 00000000000..78ad6c0d424 --- /dev/null +++ b/cluster/gce/gci/mounter/mounter @@ -0,0 +1,20 @@ +#!/bin/bash + +# Copyright 2014 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e +set -o pipefail + +sudo /bin/mount "$@" \ No newline at end of file diff --git a/cluster/gce/gci/node.yaml b/cluster/gce/gci/node.yaml index de59fcac27b..d0cc12e752d 100644 --- a/cluster/gce/gci/node.yaml +++ b/cluster/gce/gci/node.yaml @@ -34,6 +34,7 @@ write_files: Type=oneshot RemainAfterExit=yes ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure-helper.sh + ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/mounter ExecStart=/home/kubernetes/bin/configure-helper.sh [Install]