OnPublicNetworkEnricher config with sensor#379
Merged
asfgit merged 2 commits intoapache:masterfrom Oct 12, 2016
Merged
Conversation
If set, it will advertise the public address based on the IP/hostname advertised in this sensor, rather than using he PortForwardManager.
Member
|
Nice, merging. Build failure unrelated and local tests pass. |
asfgit
pushed a commit
that referenced
this pull request
Oct 12, 2016
OnPublicNetworkEnricher config with sensor I'm not entirely sure what the best way is to wire in and use the `OnPublicNetworkEnricher`. Two of the use-cases are: 1. in an environment with port-mappings (e.g. cloud's DNAT, or docker), look up the registered port mapping in the `PortForwardManager`. This is the existing behaviour. 2. Where a sensor (e.g. URI or hostAndPort) has been published with the subnet-address, publish an equivalent sensor using the public IP (so using the same port). It is this second use-case that this PR enables. For "normal clouds" (i.e. without DNAT), then option 2 is an obvious way to go. However: * what if there isn't a public address? The "host.address" sensor would normally be populated with the private ip instead, so that would be used for the public url - but is that too misleading for a value of `main.uri.mapped.public`? * what if there really is a DNAT rule set up for accessing this VM's port? Should our `OnPublicNetworkEnricher` prefer the DNAT rule (i.e. the entry in `PortForwardManager`) if it exists, but fall back to the "host.address" if it's not?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm not entirely sure what the best way is to wire in and use the
OnPublicNetworkEnricher. Two of the use-cases are:PortForwardManager. This is the existing behaviour.It is this second use-case that this PR enables.
For "normal clouds" (i.e. without DNAT), then option 2 is an obvious way to go. However:
main.uri.mapped.public?OnPublicNetworkEnricherprefer the DNAT rule (i.e. the entry inPortForwardManager) if it exists, but fall back to the "host.address" if it's not?