Skip to content
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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

clarafu
Copy link
Contributor

@clarafu clarafu commented Apr 15, 2021

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:

  • Fix up the baggageclaim command descriptions
  • Manual testing of all the configuration field values

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!!

clarafu added 2 commits April 1, 2021 15:24
As part of the epic for having concourse web be deployed using a config
file, we converted all the commands to be using cobra. Baggageclaim
command will be converted to become part of a config file and there will
also be a separate cobra command that can be used if you want to start
baggageclaim up independently from the worker.

[#6434]

Signed-off-by: Clara Fu <[email protected]>
- add a supplied prefix to flags because baggageclaim will be used by
the worker and quickstart command in concourse repo. The quickstart
command prefixes all the worker flags with "worker-"
- Add "inline" to the yaml tags for when we don't want to use the
field name within the yaml config structure
- Remove supporting fetching of configuration fields through environment
variable when running baggageclaim independently (not part of
concourse). This was never actually a supported feature, I just thought
it was but realized that it was not.

[#6434]

Signed-off-by: Clara Fu <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants