Merge pull request #55512 from dashpole/docker_storage_driver

Automatic merge from submit-queue (batch tested with PRs 53337, 55465, 55512, 55522, 54554). 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>.

Allow configuring docker storage driver in GCE

**What this PR does / why we need it**:
For GCE, allow configuring of the docker storage driver.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:
```release-note
GCE: Provide an option to configure the docker storage driver.
```
This commit is contained in:
Kubernetes Submit Queue 2017-11-11 12:44:24 -08:00 committed by GitHub
commit d1cca169f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View File

@ -270,6 +270,11 @@ if [[ -n "${DISABLE_DOCKER_LIVE_RESTORE:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} DISABLE_DOCKER_LIVE_RESTORE"
fi
# Override default docker storage driver.
if [[ -n "${DOCKER_STORAGE_DRIVER:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} DOCKER_STORAGE_DRIVER"
fi
# Override default GLBC image
if [[ -n "${GCE_GLBC_IMAGE:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} GCE_GLBC_IMAGE"

View File

@ -307,6 +307,11 @@ if [[ -n "${DISABLE_DOCKER_LIVE_RESTORE:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} DISABLE_DOCKER_LIVE_RESTORE"
fi
# Override default docker storage driver.
if [[ -n "${DOCKER_STORAGE_DRIVER:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} DOCKER_STORAGE_DRIVER"
fi
# Override default GLBC image
if [[ -n "${GCE_GLBC_IMAGE:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} GCE_GLBC_IMAGE"

View File

@ -852,6 +852,12 @@ function assemble-docker-flags {
docker_opts+=" --live-restore=false"
fi
# Override docker storage driver if the environment variable is set
if [[ -n "${DOCKER_STORAGE_DRIVER:-}" ]]; then
docker_opts+=" --storage-driver=${DOCKER_STORAGE_DRIVER}"
fi
echo "DOCKER_OPTS=\"${docker_opts} ${EXTRA_DOCKER_OPTS:-}\"" > /etc/default/docker
if [[ "${use_net_plugin}" == "true" ]]; then