-
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
Support Host NetworkMode for ECS provider #2320
Support Host NetworkMode for ECS provider #2320
Conversation
ff6c84a
to
7326e02
Compare
7326e02
to
79fd9e7
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.
Thanks for your contribution @FriggaHel 👏
docs/configuration/backends/ecs.md
Outdated
@@ -129,6 +129,7 @@ Labels can be used on task containers to override default behaviour: | |||
| `traefik.protocol=https` | override the default `http` protocol | | |||
| `traefik.weight=10` | assign this weight to the container | | |||
| `traefik.enable=false` | disable this container in Træfik | | |||
| `traefik.backend.port=80` | override the default `port` value. Overrides `NetworkBindings` from Docker Container | |
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 use LabelPort
instead of creating a new label.
provider/ecs/ecs.go
Outdated
@@ -554,6 +554,9 @@ func (p *Provider) getHost(i ecsInstance) string { | |||
} | |||
|
|||
func (p *Provider) getPort(i ecsInstance) string { | |||
if port := p.label(i, types.LabelBackendPort); port != "" { |
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 use types.LabelPort
instead of creating a new label.
types/common_label.go
Outdated
@@ -24,6 +24,7 @@ const ( | |||
LabelTraefikFrontendWhitelistSourceRange = LabelPrefix + "frontend.whitelistSourceRange" | |||
LabelBackend = LabelPrefix + "backend" | |||
LabelBackendID = LabelPrefix + "backend.id" | |||
LabelBackendPort = LabelPrefix + "backend.port" |
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 use types.LabelPort
instead of creating a new label.
79fd9e7
to
f6ef44b
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
Can you release that sooner than 1.5? That's not a big change, right? |
@zyzop the releases on 1.4 branch are only for bug fixes and documentation. |
This PR Allows to override exposed port by Label (
traefik.port
) when using ECS provider.This add ability to use traefik with containers running with Host NetworkMode (#2169)
Fixes #2169