-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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 a default value for the docker.network configuration #3471
Add a default value for the docker.network configuration #3471
Conversation
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.
Few comments in the code.
Isn't it possible to add integration tests?
@@ -71,6 +71,12 @@ usebindportip = true | |||
# | |||
swarmMode = false | |||
|
|||
# Define a default docker network to use for connections to all containers. |
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.
Maybe we should add the fact that it's possible to override this with the label traefik.docker.network
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.
done
@@ -45,6 +45,7 @@ type Provider struct { | |||
ExposedByDefault bool `description:"Expose containers by default" export:"true"` | |||
UseBindPortIP bool `description:"Use the ip address from the bound port, rather than from the inner network" export:"true"` | |||
SwarmMode bool `description:"Use Docker on Swarm Mode" export:"true"` | |||
Network string `description:"Default Docker network used" export:"true"` |
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.
Shouldn't we call it DefaultNetwork
instead?
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.
To be homogeneous with domain
, we need to keep Network
.
provider/docker/docker.go
Outdated
@@ -45,6 +45,7 @@ type Provider struct { | |||
ExposedByDefault bool `description:"Expose containers by default" export:"true"` | |||
UseBindPortIP bool `description:"Use the ip address from the bound port, rather than from the inner network" export:"true"` | |||
SwarmMode bool `description:"Use Docker on Swarm Mode" export:"true"` | |||
DefaultNetwork string `description:"Default Docker network used" export:"true"` |
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.
To be homogeneous with domain
, we need to keep Network
.
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.
Are you both ok with Network ? :)
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.
Could you please fix the make validate
docs/configuration/backends/docker.md:75:9: "overriden" is a misspelling of "overridden"
docs/configuration/backends/docker.md:136:9: "overriden" is a misspelling of "overridden"
4d1ac5f
to
d209e36
Compare
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.
You need to update https://github.com/containous/traefik/blob/master/docs/configuration/backends/docker.md#on-containers
traefik.docker.network
fa9cb4b
to
d434cb9
Compare
This reverts commit 1a0bfe789cf64277700e1c831fa432282de9440c.
d434cb9
to
50f47ae
Compare
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.
LGTM
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.
LGTM
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.
LGTM 👏 🎉
What does this PR do?
Add a default value for the traefik.docker.network configuration.
Motivation
Implement the #3449
More
Additional Notes
I can't test it due to the limitation of the docker test library (we can't manipulate the networks).