Merge pull request #62743 from Random-Liu/fix-npd-preload

Automatic merge from submit-queue (batch tested with PRs 62568, 62220, 62743, 62751, 62753). 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>.

Fix NPD preload.

Fix NPD preload.

NPD preload information is:
```
node-problem-detector-v0.4.1.tar.gz,a57a3fe64cab8a18ec654f5cef0aec59dae62568
```

@shiliangxue Do we need to cherrypick this?

**Release note**:

```release-note
none
```
This commit is contained in:
Kubernetes Submit Queue 2018-04-17 20:52:15 -07:00 committed by GitHub
commit 4e573e4ed2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -197,15 +197,15 @@ function install-node-problem-detector {
local -r npd_version="${DEFAULT_NPD_VERSION}"
local -r npd_sha1="${DEFAULT_NPD_SHA1}"
fi
local -r npd_tar="node-problem-detector-${npd_version}.tar.gz"
if is-preloaded "node-problem-detector" "${npd_sha1}"; then
if is-preloaded "${npd_tar}" "${npd_sha1}"; then
echo "node-problem-detector is preloaded."
return
fi
echo "Downloading node problem detector."
local -r npd_release_path="https://storage.googleapis.com/kubernetes-release"
local -r npd_tar="node-problem-detector-${npd_version}.tar.gz"
download-or-bust "${npd_sha1}" "${npd_release_path}/node-problem-detector/${npd_tar}"
local -r npd_dir="${KUBE_HOME}/node-problem-detector"
mkdir -p "${npd_dir}"