Config migrate SAML keys and certificates (#11596)
Этот коммит содержится в:
коммит произвёл
Hanzei
родитель
53f1cf1cb2
Коммит
c1f3c83d38
@@ -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")
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user