-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add enable-docker-bridge bootstrap argument #187
Add enable-docker-bridge bootstrap argument #187
Conversation
@@ -142,6 +149,12 @@ Environment='KUBELET_EXTRA_ARGS=$KUBELET_EXTRA_ARGS' | |||
EOF | |||
fi | |||
|
|||
if [[ "$ENABLE_DOCKER_BRIDGE" = "true" ]]; then | |||
# Enabling live-restore prevents docker from recreating the default bridge network | |||
jq '.bridge="docker0" | ."live-restore"=false' /etc/docker/daemon.json | tee /etc/docker/daemon.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you reword the comment to agree with the state we are setting here? E.g. "Disabling..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
* Updated changelog git command
f24d1b4
to
5b96c22
Compare
@@ -51,6 +52,11 @@ while [[ $# -gt 0 ]]; do | |||
shift | |||
shift | |||
;; | |||
--enable-docker-bridge) | |||
ENABLE_DOCKER_BIDGE=$2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo here, I just spent an hour debugging this! Can you please release a hotfix for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is a bit unfortunate.
if [[ "$ENABLE_DOCKER_BRIDGE" = "true" ]]; then | ||
# Enabling the docker bridge network. We have to disable live-restore as it | ||
# prevents docker from recreating the default bridge network on restart | ||
jq '.bridge="docker0" | ."live-restore"=false' /etc/docker/daemon.json | tee /etc/docker/daemon.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing --enable-docker-bridge true
appears to override /etc/docker/daemon.json
leaving it empty 🤔. I believe tee
can cause unexpected results when used in combination with jq
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that as well, this should be fixed in addition to the typo
Issue #, if available:
Fixes #183
Description of changes:
The default will be to leave the bridge network disabled, but users can now add
--enable-docker-bridge true
as a bootstrap argument in order to preserve the old behavior.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.