Skip to content

Commit

Permalink
Include the port number in the listener name, so that Envoy will allo…
Browse files Browse the repository at this point in the history
…w switching port numbers.

Fixes #1100.
  • Loading branch information
Flynn committed Jan 10, 2019
1 parent 157a573 commit 3f851bc
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions ambassador/ambassador/envoy/v2/v2listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ def __init__(self, config: 'V2Config', listener: IRListener) -> None:
if listener.redirect_listener:
self.http_filters = [{'name': 'envoy.router'}]
else:
# Use the actual listener name
self.name = listener.name
# Use the actual listener name & port number
self.name = "ambassador-listener-%s" % listener.service_port

# Use a sane access log spec
self.access_log = [ {
Expand All @@ -247,14 +247,6 @@ def __init__(self, config: 'V2Config', listener: IRListener) -> None:
}
} ]

# # If we have a server context here, use it.
# envoy_ctx = V2TLSContext()
# for name, ctx in config.ir.envoy_tls.items():
# config.ir.logger.info("envoy_ctx adding %s" % ctx.as_json())
# envoy_ctx.add_context(ctx)
#
# config.ir.logger.info("envoy_ctx final %s" % envoy_ctx)

# Assemble filters
for f in config.ir.filters:
v2f: dict = v2filter(f)
Expand Down

0 comments on commit 3f851bc

Please sign in to comment.