Skip to content

Commit 50c68f7

Browse files
ollyplanceGCB Sync Bot
authored andcommitted
Remove unneeded kubelet binary check in bootstrapping
* binary check is not needed in GKE as this is old (unused) code that comes from when kubernetes was forked * remove TEST_CLUSTER functionality * adds unnecessary .5 seconds to bootstrapping latency Verification: * ensured bootstrapping successfully configures node using custom k8s version BUG=389110387 Change-Id: I5d311ffea0e3b02c01debe7291eb630669391bde
1 parent fba5a82 commit 50c68f7

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

gke/cluster/gce/gci/configure-helper.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,22 +1686,6 @@ function start-kubelet {
16861686
echo "Start kubelet"
16871687

16881688
local kubelet_bin="${KUBE_HOME}/bin/kubelet"
1689-
local -r version="$("${kubelet_bin}" --version=true | cut -f2 -d " ")"
1690-
local -r builtin_kubelet="/usr/bin/kubelet"
1691-
if [[ "${TEST_CLUSTER:-}" == "true" ]]; then
1692-
# Determine which binary to use on test clusters. We use the built-in
1693-
# version only if the downloaded version is the same as the built-in
1694-
# version. This allows GCI to run some of the e2e tests to qualify the
1695-
# built-in kubelet.
1696-
if [[ -x "${builtin_kubelet}" ]]; then
1697-
local -r builtin_version="$("${builtin_kubelet}" --version=true | cut -f2 -d " ")"
1698-
if [[ "${builtin_version}" == "${version}" ]]; then
1699-
kubelet_bin="${builtin_kubelet}"
1700-
fi
1701-
fi
1702-
fi
1703-
echo "Using kubelet binary at ${kubelet_bin}"
1704-
17051689
local -r kubelet_env_file="/etc/default/kubelet"
17061690

17071691
local kubelet_cgroup_driver=""

gke/cluster/gce/windows/common.psm1

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -633,21 +633,6 @@ Rotate-Files -Pattern '${Pattern}' -Path '${Path}' -Config `$config
633633
}
634634
}
635635

636-
# Returns true if this node is part of a test cluster (see
637-
# cluster/gce/config-test.sh). $KubeEnv is a hash table containing the kube-env
638-
# metadata keys+values.
639-
function Test-IsTestCluster {
640-
param (
641-
[parameter(Mandatory=$true)] [hashtable]$KubeEnv
642-
)
643-
644-
if ($KubeEnv.Contains('TEST_CLUSTER') -and `
645-
($KubeEnv['TEST_CLUSTER'] -eq 'true')) {
646-
return $true
647-
}
648-
return $false
649-
}
650-
651636
# Returns true if this node uses a plugin to support authentication to the
652637
# master, e.g. for TPM-based authentication. $KubeEnv is a hash table
653638
# containing the kube-env metadata keys+values.

0 commit comments

Comments
 (0)