mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-07 14:32:17 -04:00
AB#2512 Config secrets via env var & config refactoring (#544)
* refactor measurements to use consistent types and less byte pushing * refactor: only rely on a single multierr dependency * extend config creation with envar support * document changes Signed-off-by: Fabian Kammel <fk@edgeless.systems>
This commit is contained in:
parent
80a801629e
commit
bb76a4e4c8
42 changed files with 932 additions and 791 deletions
|
@ -163,14 +163,14 @@ func prepareConfig(cmd *cobra.Command, fileHandler file.Handler) (*config.Config
|
|||
|
||||
// check for existing config
|
||||
if configPath != "" {
|
||||
config, err := readConfig(cmd.ErrOrStderr(), fileHandler, configPath)
|
||||
conf, err := config.New(fileHandler, configPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, displayConfigValidationErrors(cmd.ErrOrStderr(), err)
|
||||
}
|
||||
if config.GetProvider() != cloudprovider.QEMU {
|
||||
if conf.GetProvider() != cloudprovider.QEMU {
|
||||
return nil, errors.New("invalid provider for MiniConstellation cluster")
|
||||
}
|
||||
return config, nil
|
||||
return conf, nil
|
||||
}
|
||||
if err := cmd.Flags().Set("config", constants.ConfigFilename); err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue