mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
feat(region,keystone): add enable_tls_migration config (#13379)
This commit is contained in:
@@ -114,6 +114,7 @@ var (
|
||||
"platform_names",
|
||||
"is_forget_login_user",
|
||||
"enable_organization",
|
||||
"enable_tls_migration",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,9 @@ func OnBaseOptionsChange(oOpts, nOpts interface{}) bool {
|
||||
if oldOpts.ApiServer != newOpts.ApiServer {
|
||||
log.Debugf("api_server changed from %s to %s", oldOpts.ApiServer, newOpts.ApiServer)
|
||||
}
|
||||
if oldOpts.EnableTlsMigration != newOpts.EnableTlsMigration {
|
||||
log.Debugf("enable_tls_migration changed from %v to %v", oldOpts.EnableTlsMigration, newOpts.EnableTlsMigration)
|
||||
}
|
||||
return changed
|
||||
}
|
||||
|
||||
|
||||
@@ -110,6 +110,8 @@ type BaseOptions struct {
|
||||
|
||||
PlatformName string `help:"identity name of this platform" default:"Cloudpods"`
|
||||
PlatformNames map[string]string `help:"identity name of this platform by language"`
|
||||
|
||||
EnableTlsMigration bool `help:"Enable TLS migration" default:"false"`
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -491,6 +491,9 @@ func (self *SGuest) PerformLiveMigrate(ctx context.Context, userCred mcclient.To
|
||||
if err := self.validateMigrate(ctx, userCred, nil, input); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if input.EnableTLS == nil {
|
||||
input.EnableTLS = &options.Options.EnableTlsMigration
|
||||
}
|
||||
return nil, self.StartGuestLiveMigrateTask(ctx, userCred, self.Status, input.PreferHost, input.SkipCpuCheck, input.EnableTLS, "")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user