Change address lookup behaviour if VAULT_SRV_LOOKUP is set. #14192
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 think the behaviour of VAULT_SRV_LOOKUP is strange:
It should not expect http (what about a prod https setup?)
And actually the VAULT_ADDR should not contain a scheme in this case.
I made a minimal change to make it work for us.
We are using SRV records like _vault._tcp.example.domain which return
a list of hosts with the port appended.
The impure thing is that it overrides the scheme to be https, because i expect to use a SRV record approach in prod only which should https.
I am not 100% sure if this is the correct way, maybe we should discuss how to work with SRV records.
EDIT: fixed typos