This repository was archived by the owner on Feb 2, 2022. It is now read-only.
Baggageclaim to support being set with a YAML config file #45
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.
From concourse/concourse#6434
Depends on concourse/flag#6
This PR converts baggageclaim config to support YAML, envstruct and validator tags. We no longer use
go-flags
to support flags because we are converting concourse to only support being configured using a configuration file in YAML. We will still be supporting flags/env but only for backwards compatibility purposes and will be fully deprecated in the future.The baggageclaim command is used to run baggageclaim independently, and previously it was using
go-flags
to fetch the flags needed to start up. This pr also converts the baggageclaim command to use a config file, where the user will need to supply the baggageclaim command with a config file in order to start up baggageclaim independently. It will continue to support the deprecated flags for backwards compatibilities sake.I also pushed some configuration field validation into a validation package from
go-playground/validator
. This is so that we can try to push as much configuration value validation into this one layer, rather than having validation happen in many different places.There are a few things left to do:
Please feel free to give any sort of code structuring or feedback on the packages used, etc. I am totally open to redoing or scrapping the whole thing if it is necessary because the disadvantages outweigh the advantages. I have my own hesitations about this epic so I'd like to hear any thoughts that you have!!