mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #66877 from Random-Liu/crictl-yaml-for-preload
Automatic merge from submit-queue. 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>. Generate crictl config for preload as well. Generate `/etc/crictl.yaml` also when crictl is preloaded. Signed-off-by: Lantao Liu <lantaol@google.com> **Release note**: ```release-note Fix a bug on GCE that /etc/crictl.yaml is not generated when crictl is preloaded. ```
This commit is contained in:
commit
cd31266e62
@ -247,6 +247,11 @@ function install-crictl {
|
|||||||
fi
|
fi
|
||||||
local -r crictl="crictl-${crictl_version}-linux-amd64"
|
local -r crictl="crictl-${crictl_version}-linux-amd64"
|
||||||
|
|
||||||
|
# Create crictl config file.
|
||||||
|
cat > /etc/crictl.yaml <<EOF
|
||||||
|
runtime-endpoint: ${CONTAINER_RUNTIME_ENDPOINT:-unix:///var/run/dockershim.sock}
|
||||||
|
EOF
|
||||||
|
|
||||||
if is-preloaded "${crictl}" "${crictl_sha1}"; then
|
if is-preloaded "${crictl}" "${crictl_sha1}"; then
|
||||||
echo "crictl is preloaded"
|
echo "crictl is preloaded"
|
||||||
return
|
return
|
||||||
@ -257,11 +262,6 @@ function install-crictl {
|
|||||||
download-or-bust "${crictl_sha1}" "${crictl_path}/${crictl}"
|
download-or-bust "${crictl_sha1}" "${crictl_path}/${crictl}"
|
||||||
mv "${KUBE_HOME}/${crictl}" "${KUBE_BIN}/crictl"
|
mv "${KUBE_HOME}/${crictl}" "${KUBE_BIN}/crictl"
|
||||||
chmod a+x "${KUBE_BIN}/crictl"
|
chmod a+x "${KUBE_BIN}/crictl"
|
||||||
|
|
||||||
# Create crictl config file.
|
|
||||||
cat > /etc/crictl.yaml <<EOF
|
|
||||||
runtime-endpoint: ${CONTAINER_RUNTIME_ENDPOINT:-unix:///var/run/dockershim.sock}
|
|
||||||
EOF
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function install-exec-auth-plugin {
|
function install-exec-auth-plugin {
|
||||||
|
Loading…
Reference in New Issue
Block a user