Skip to content

Commit

Permalink
Tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-cox committed Oct 9, 2024
1 parent 67b818c commit c8b2c7b
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions shell/edit/provisioning.cattle.io.cluster/rke2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1397,13 +1397,6 @@ export default {
// We cannot use the hook, because it is triggered on YAML toggle without restore initialized data
this.agentConfigurationCleanup();
// TODO: RC
// Shows `Changing the Kubernetes Version can reset the Add-On Config values. You should check that the values are as expected before continuing.`
// if editing cluster and kube version has changed
// 2. rancher-vsphere:
// 3: addOns:
// dependencyBanner:
const isEditVersion = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
const hasPspManuallyAdded = !!this.value.spec.rkeConfig?.machineGlobalConfig?.['kube-apiserver-arg'];
Expand Down Expand Up @@ -1498,18 +1491,16 @@ export default {
return await this.extensionProvider?.saveCluster(this.value, this.schema);
}
throw new Error('oh no....'); // TODO: RC
// if ( this.isCreate ) {
// url = url || this.schema.linkFor('collection');
// const res = await this.value.save({ url });
if ( this.isCreate ) {
url = url || this.schema.linkFor('collection');
const res = await this.value.save({ url });
// if (res) {
// Object.assign(this.value, res);
// }
// } else {
// await this.value.save();
// }
if (res) {
Object.assign(this.value, res);
}
} else {
await this.value.save();
}
},
// create a secret to reference the harvester cluster kubeconfig in rkeConfig
Expand Down Expand Up @@ -1615,8 +1606,6 @@ export default {
const fromUser = this.userChartValuesTemp[name];
const different = diff(fromChart, fromUser);
console.warn(name, different, fromChart, this.userChartValues); // TODO: RC
this.userChartValues[this.chartVersionKey(name)] = different;
}, 250, { leading: true }),
Expand Down

0 comments on commit c8b2c7b

Please sign in to comment.