mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
Merge pull request #64292 from awly/gce-pull-exec-plugin
Automatic merge from submit-queue (batch tested with PRs 64582, 64292). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Pull gke-exec-auth-plugin binary on Nodes If the plugin URL is set and VM is not master, pull the plugin binary. **What this PR does / why we need it**: implement deployment of https://github.com/kubernetes/cloud-provider-gcp/tree/master/cmd/gke-exec-auth-plugin on Node VMs. **Release note**: ```release-note NONE ```
This commit is contained in:
@@ -264,6 +264,18 @@ runtime-endpoint: ${CONTAINER_RUNTIME_ENDPOINT:-unix:///var/run/dockershim.sock}
|
|||||||
EOF
|
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 {
|
function install-kube-manifests {
|
||||||
# Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.
|
# Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.
|
||||||
local dst_dir="${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 on each node.
|
||||||
install-crictl
|
install-crictl
|
||||||
|
|
||||||
|
if [[ "${KUBERNETES_MASTER:-}" == "false" ]]; then
|
||||||
|
install-exec-auth-plugin
|
||||||
|
fi
|
||||||
|
|
||||||
# Clean up.
|
# Clean up.
|
||||||
rm -rf "${KUBE_HOME}/kubernetes"
|
rm -rf "${KUBE_HOME}/kubernetes"
|
||||||
rm -f "${KUBE_HOME}/${server_binary_tar}"
|
rm -f "${KUBE_HOME}/${server_binary_tar}"
|
||||||
|
Reference in New Issue
Block a user