Merge pull request #42316 from feiskyer/cri-local

Automatic merge from submit-queue

This PR adds a new environmental variable ENABLE_CRI for customizing CRI

**What this PR does / why we need it**:

This PR adds a new environmental variable `ENABLE_CRI` for customizing CRI (e.g. switching between dockershim and dockertools) and sets `--enable-cri=true` by default.

**Which issue this PR fixes** 

Fixes #42315.

**Release note**:

```release-note
NONE
```

Maybe we should also cherry-pick this to 1.6 branch.

cc @yujuhong @Random-Liu
pull/6/head
Kubernetes Submit Queue 2017-03-01 07:09:19 -08:00 committed by GitHub
commit 2249550b57
1 changed files with 2 additions and 1 deletions

View File

@ -187,6 +187,7 @@ LOG_LEVEL=${LOG_LEVEL:-3}
CONTAINER_RUNTIME=${CONTAINER_RUNTIME:-"docker"}
CONTAINER_RUNTIME_ENDPOINT=${CONTAINER_RUNTIME_ENDPOINT:-""}
IMAGE_SERVICE_ENDPOINT=${IMAGE_SERVICE_ENDPOINT:-""}
ENABLE_CRI=${ENABLE_CRI:-"true"}
RKT_PATH=${RKT_PATH:-""}
RKT_STAGE1_IMAGE=${RKT_STAGE1_IMAGE:-""}
CHAOS_CHANCE=${CHAOS_CHANCE:-0.0}
@ -576,7 +577,7 @@ function start_kubelet {
fi
sudo -E "${GO_OUT}/hyperkube" kubelet ${priv_arg}\
--enable-cri=false \
--enable-cri="${ENABLE_CRI}" \
--v=${LOG_LEVEL} \
--chaos-chance="${CHAOS_CHANCE}" \
--container-runtime="${CONTAINER_RUNTIME}" \