-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat(asb): allow config overrides from env vars #1231
Merged
Merged
Conversation
This file contains 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
delta1
commented
Dec 4, 2022
Code lgtm but I'll try it out myself later. Also if you are trying to create a docker image for the asb perhaps you can use the image I'm currently using as a starting point.
|
Cheers @binarybaron just finishing this up. Thanks for the dockerfile will compare with the one I have from much earlier this year 😅 |
- upgrades config crate to 0.13.2 comit-network#1087 - adds environment source for config overrides
binarybaron
approved these changes
Dec 9, 2022
bors r+ |
bors bot
added a commit
that referenced
this pull request
Aug 4, 2023
1417: feat(asb): allow asb to register with mulitple rendezvous nodes r=binarybaron a=delta1 implements #633 This PR updates the ASB to be able to register with multiple rendezvous nodes. A unit test is added that checks this behaviour. I also tested it manually overnight and it repeatedly reregistered with the specified nodes. The config file option is left as `rendezvous_point` for backwards compatibility, but now uses the same deserialization as introduced in #1231 so that multiple addresses can be specified in a comma separated string, or as a toml array of strings. Co-authored-by: Byron Hambly <[email protected]>
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.
This change allows the ASB config to be overridden by env vars starting with
ASB__
.Adds a test to check this, and updates the de/serialization of the network
listen
andexternal_addresses
fields to be a comma separated string from the environment. Theseparator
is a pair of underscores, which is necessary since some of the fields already have underscores in their names.Example env var:
ASB__NETWORK__EXTERNAL_ADDRESSES="/dns4/example.org/tcp/9939,/ip4/1.2.3.4/tcp/9940"
This particular change will help when running the ASB as a docker container (wip), allowing the config to be set in the env for docker-compose etc.