mirror of https://github.com/rancher/ui.git
fix consuming cluster template with localClusterAuthEndpoint
This commit is contained in:
parent
c580bcc753
commit
1b89c54bc9
|
|
@ -4,19 +4,18 @@
|
|||
{{t "authorizedEndpoint.enabled.label"}}
|
||||
{{#if clusterTemplateCreate}}
|
||||
<ClusterTemplateOverrideToggle
|
||||
@path="localClusterAuthEndpoint"
|
||||
@path="localClusterAuthEndpoint.enabled"
|
||||
@configVariable={{enableLocalClusterAuthEndpoint}}
|
||||
@addOverride={{addOverride}}
|
||||
@questions={{clusterTemplateRevision.questions}}
|
||||
/>
|
||||
{{/if}}
|
||||
</label>
|
||||
<CheckComputedOverride
|
||||
<CheckOverrideAllowed
|
||||
@paramName="localClusterAuthEndpoint.enabled"
|
||||
@questions={{clusterTemplateRevision.questions}}
|
||||
@clusterTemplateRevision={{clusterTemplateRevision.clusterConfig}}
|
||||
@applyClusterTemplate={{applyClusterTemplate}}
|
||||
@clusterTemplateCreate={{clusterTemplateCreate}}
|
||||
@computedOverrideAllowed={{enableLocalClusterAuthEndpointAvailable}}
|
||||
@enableLocalClusterAuthEndpoint={{mut enableLocalClusterAuthEndpoint}}
|
||||
@computedState={{enableLocalClusterAuthEndpoint}}
|
||||
>
|
||||
<div class="radio">
|
||||
<label>
|
||||
|
|
@ -36,7 +35,7 @@
|
|||
{{t "generic.disabled"}}
|
||||
</label>
|
||||
</div>
|
||||
</CheckComputedOverride>
|
||||
</CheckOverrideAllowed>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -55,8 +54,8 @@
|
|||
{{/if}}
|
||||
</label>
|
||||
<CheckOverrideAllowed
|
||||
@questions={{clusterTemplateRevision.questions}}
|
||||
@paramName="localClusterAuthEndpoint.fqdn"
|
||||
@questions={{clusterTemplateRevision.questions}}
|
||||
@clusterTemplateRevision={{clusterTemplateRevision.clusterConfig}}
|
||||
@applyClusterTemplate={{applyClusterTemplate}}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -684,7 +684,9 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
|
|||
willSave() {
|
||||
const { cluster, configField: field } = this;
|
||||
|
||||
if (typeOf(cluster.clearProvidersExcept) === 'function') {
|
||||
this.checkKubernetesVersionSemVer();
|
||||
|
||||
if (typeOf(cluster.clearProvidersExcept) === 'function' || this.applyClusterTemplate && typeOf(cluster.buildClusterAnswersFromConfig) === 'function') {
|
||||
if (this.applyClusterTemplate) {
|
||||
// need to add overrides + user entry to answers on cluster, drop rkeconfig
|
||||
let answers = this.buildClusterAnswersFromConfig(cluster, get(this, 'model.clusterTemplateRevision.questions'));
|
||||
|
|
@ -704,8 +706,6 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
|
|||
}
|
||||
}
|
||||
|
||||
this.checkKubernetesVersionSemVer();
|
||||
|
||||
set(this, 'errors', null);
|
||||
|
||||
// return this.validate();
|
||||
|
|
|
|||
Loading…
Reference in New Issue