Config migrate SAML keys and certificates (#11596)

Этот коммит содержится в:
Rajat Varyani
2019-07-14 12:49:51 +05:30
коммит произвёл Hanzei
родитель 53f1cf1cb2
Коммит c1f3c83d38
3 изменённых файлов: 113 добавлений и 13 удалений

Просмотреть файл

@@ -250,20 +250,8 @@ func configMigrateCmdF(command *cobra.Command, args []string) error {
from := args[0]
to := args[1]
// Get source config store - invalid config will throw error here
fromConfigStore, err := config.NewStore(from, false)
if err != nil {
return errors.Wrapf(err, "failed to access config %s", from)
}
err := config.Migrate(from, to)
// Get destination config store
toConfigStore, err := config.NewStore(to, false)
if err != nil {
return errors.Wrapf(err, "failed to access config %s", to)
}
// Copy config from source to destination
_, err = toConfigStore.Set(fromConfigStore.Get())
if err != nil {
return errors.Wrap(err, "failed to migrate config")
}