mirror of https://github.com/rancher/ui.git
parent
2f30632340
commit
c2ce463ac2
|
|
@ -884,7 +884,9 @@ export default InputTextFile.extend(ClusterDriver, {
|
|||
|
||||
migrateLegacyEtcdSnapshotSettings() {
|
||||
const { cluster } = this;
|
||||
const { retention, creation } = cluster.rancherKubernetesEngineConfig.services.etcd;
|
||||
let {
|
||||
retention, creation, backupConfig
|
||||
} = cluster.rancherKubernetesEngineConfig.services.etcd;
|
||||
|
||||
let creationMatch = creation.match(/^((\d+)h)?((\d+)m)?((\d+)s)?$/);
|
||||
let momentReady = [creationMatch[2], creationMatch[4], creationMatch[6]];
|
||||
|
|
@ -901,10 +903,22 @@ export default InputTextFile.extend(ClusterDriver, {
|
|||
hasLegacySnapshotSettings: true,
|
||||
});
|
||||
|
||||
setProperties(cluster.rancherKubernetesEngineConfig.services.etcd, {
|
||||
'backupConfig.intervalHours': parsedDurationAsHours,
|
||||
snapshot: false,
|
||||
});
|
||||
if (backupConfig) {
|
||||
setProperties(cluster.rancherKubernetesEngineConfig.services.etcd, {
|
||||
'backupConfig.intervalHours': parsedDurationAsHours,
|
||||
snapshot: false,
|
||||
});
|
||||
} else {
|
||||
backupConfig = this.globalStore.createRecord({
|
||||
type: 'backupConfig',
|
||||
intervalHours: parsedDurationAsHours
|
||||
});
|
||||
|
||||
setProperties(cluster.rancherKubernetesEngineConfig.services.etcd, {
|
||||
backupConfig,
|
||||
snapshot: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
initRootDockerDirectory() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue