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

Allow passing configuration via config file #314

Closed
jdolitsky opened this issue Jan 5, 2022 · 1 comment · Fixed by #315
Closed

Allow passing configuration via config file #314

jdolitsky opened this issue Jan 5, 2022 · 1 comment · Fixed by #315
Labels
enhancement New feature or request

Comments

@jdolitsky
Copy link
Contributor

Make use of Viper's viper.AddConfigPath to allow configuring fulcio using a YAML config file

Example: https://github.com/spf13/viper#reading-config-files

Discovered trying to modify sed statements in #309

cc @mattmoor

@jdolitsky jdolitsky added the enhancement New feature or request label Jan 5, 2022
@mattmoor
Copy link
Member

mattmoor commented Jan 5, 2022

Yeah, thanks for this. The use of viper in Fulcio is super weird today because we aren't using like any of its features. This seems like a good use of its features to avoid deepening the sed nightmare 🙏

jdolitsky added a commit to jdolitsky/fulcio that referenced this issue Jan 5, 2022
Modify the viper settings in the serve subcommand to
allow users to provide a config file using -c/--config
vs. setting everything using command line flags.

Sinc this is based upon viper, the following config file
extensions are supported: "json", "toml", "yaml", "yml",
"properties", "props", "prop", "hcl", "tfvars", "dotenv",
"env", and "ini".

This change also allows using env vars prefixed with
FULCIO_SERVE to provide configuration settings as well.

Resolves sigstore#314

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
jdolitsky added a commit to jdolitsky/fulcio that referenced this issue Jan 5, 2022
Modify the viper settings in the serve subcommand to
allow users to provide a config file using -c/--config
vs. setting everything using command line flags.

Sinc this is based upon viper, the following config file
extensions are supported: "json", "toml", "yaml", "yml",
"properties", "props", "prop", "hcl", "tfvars", "dotenv",
"env", and "ini".

This change also allows using env vars prefixed with
FULCIO_SERVE to provide configuration settings as well.

Resolves sigstore#314

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
jdolitsky added a commit to jdolitsky/fulcio that referenced this issue Jan 5, 2022
Modify the viper settings in the serve subcommand to
allow users to provide a config file using -c/--config
vs. setting everything using command line flags.

Sinc this is based upon viper, the following config file
extensions are supported: "json", "toml", "yaml", "yml",
"properties", "props", "prop", "hcl", "tfvars", "dotenv",
"env", and "ini".

This change also allows using env vars prefixed with
FULCIO_SERVE to provide configuration settings as well.

Resolves sigstore#314

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
jdolitsky added a commit to jdolitsky/fulcio that referenced this issue Jan 5, 2022
Modify the viper settings in the serve subcommand to
allow users to provide a config file using -c/--config
vs. setting everything using command line flags.

Sinc this is based upon viper, the following config file
extensions are supported: "json", "toml", "yaml", "yml",
"properties", "props", "prop", "hcl", "tfvars", "dotenv",
"env", and "ini".

This change also allows using env vars prefixed with
FULCIO_SERVE to provide configuration settings as well.

Resolves sigstore#314

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
jdolitsky added a commit to jdolitsky/fulcio that referenced this issue Jan 5, 2022
Modify the viper settings in the serve subcommand to
allow users to provide a config file using -c/--config
vs. setting everything using command line flags.

Sinc this is based upon viper, the following config file
extensions are supported: "json", "toml", "yaml", "yml",
"properties", "props", "prop", "hcl", "tfvars", "dotenv",
"env", and "ini".

This change also allows using env vars prefixed with
FULCIO_SERVE to provide configuration settings as well.

Resolves sigstore#314

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
jdolitsky added a commit to jdolitsky/fulcio that referenced this issue Jan 5, 2022
Modify the viper settings in the serve subcommand to
allow users to provide a config file using -c/--config
vs. setting everything using command line flags.

Sinc this is based upon viper, the following config file
extensions are supported: "json", "toml", "yaml", "yml",
"properties", "props", "prop", "hcl", "tfvars", "dotenv",
"env", and "ini".

This change also allows using env vars prefixed with
FULCIO_SERVE to provide configuration settings as well.

Resolves sigstore#314

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
mattmoor pushed a commit that referenced this issue Jan 5, 2022
Modify the viper settings in the serve subcommand to
allow users to provide a config file using -c/--config
vs. setting everything using command line flags.

Sinc this is based upon viper, the following config file
extensions are supported: "json", "toml", "yaml", "yml",
"properties", "props", "prop", "hcl", "tfvars", "dotenv",
"env", and "ini".

This change also allows using env vars prefixed with
FULCIO_SERVE to provide configuration settings as well.

Resolves #314

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants