From 1f7671b18dbfad7a84835404ddbc9cdaa5ce09d8 Mon Sep 17 00:00:00 2001 From: Andrew Lytvynov Date: Thu, 24 May 2018 15:05:48 -0700 Subject: [PATCH] Pull gke-exec-auth-plugin binary on Nodes If the plugin URL is set and VM is not master, pull the plugin binary. --- cluster/gce/gci/configure.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cluster/gce/gci/configure.sh b/cluster/gce/gci/configure.sh index c950c045b82..d8bd2baebd1 100644 --- a/cluster/gce/gci/configure.sh +++ b/cluster/gce/gci/configure.sh @@ -264,6 +264,18 @@ runtime-endpoint: ${CONTAINER_RUNTIME_ENDPOINT:-unix:///var/run/dockershim.sock} EOF } +function install-exec-auth-plugin { + if [[ ! ${EXEC_AUTH_PLUGIN_URL:-} ]]; then + return + fi + local -r plugin_url="${EXEC_AUTH_PLUGIN_URL}" + local -r plugin_sha1="${EXEC_AUTH_PLUGIN_SHA1}" + + echo "Downloading gke-exec-auth-plugin binary" + download-or-bust "${plugin_sha1}" "${plugin_url}" + mv "${KUBE_HOME}/gke-exec-auth-plugin" "${KUBE_BIN}" +} + function install-kube-manifests { # Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/. local dst_dir="${KUBE_HOME}/kube-manifests" @@ -403,6 +415,10 @@ function install-kube-binary-config { # Install crictl on each node. install-crictl + if [[ "${KUBERNETES_MASTER:-}" == "false" ]]; then + install-exec-auth-plugin + fi + # Clean up. rm -rf "${KUBE_HOME}/kubernetes" rm -f "${KUBE_HOME}/${server_binary_tar}"