Don't overwrite cluster config with answers on edit (rancher/rancher#22085)

This commit is contained in:
Vincent Fiduccia 2019-09-11 01:55:34 -07:00
parent ddb122f421
commit 9621b09fb0
No known key found for this signature in database
GPG Key ID: 2B29AD6BB2BB2582
2 changed files with 3 additions and 2 deletions

View File

@ -57,7 +57,8 @@ export default Route.extend({
if (ctr) { if (ctr) {
set(model, 'clusterTemplateRevision', ctr); set(model, 'clusterTemplateRevision', ctr);
this.clusterTemplateService.cloneAndPopulateClusterConfig(cluster, ctr); // This is breaking fields that already have values that don't match the template, like kubernetesVersion with 1.14.x
// this.clusterTemplateService.cloneAndPopulateClusterConfig(cluster, ctr);
} else { } else {
// user does not have access to the template that was used to launch a cluster // user does not have access to the template that was used to launch a cluster
// create a fake cluster that we'll use to turn into a "temaplate Revision" to be passed down to components // create a fake cluster that we'll use to turn into a "temaplate Revision" to be passed down to components

View File

@ -1449,7 +1449,7 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
clusterTemplateQuestions.forEach((question) => { clusterTemplateQuestions.forEach((question) => {
let path = question.variable; let path = question.variable;
if (!question.variable.includes('uiOverride') && question.default) { if (!this.isEdit && !question.variable.includes('uiOverride') && question.default) {
deepSet(primaryResource, path, question.default); deepSet(primaryResource, path, question.default);
} }