Merge pull request #3638 from westlywright/feature.cluster.mtu

Expose MTU Param
This commit is contained in:
Westly Wright 2019-12-17 09:14:52 -07:00 committed by GitHub
commit e00f55e495
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 181 additions and 139 deletions

View File

@ -47,8 +47,6 @@ export default Component.extend({
globalStore: service(), globalStore: service(),
layout, layout,
classNames: ['row'],
networkContent: NETWORKCHOICES, networkContent: NETWORKCHOICES,
mode: 'new', mode: 'new',
isCustom: false, isCustom: false,

View File

@ -1,4 +1,5 @@
<div class="col {{if (and isCustom (or (eq mode "new") clusterTemplateCreate)) "span-4" "span-6"}}"> <div class="row">
<div class="col {{if (and isCustom (or (eq mode "new") clusterTemplateCreate)) "span-4" "span-6"}}">
<label class="acc-label" for="network-plugin"> <label class="acc-label" for="network-plugin">
{{t "clusterNew.rke.network.label"}} {{t "clusterNew.rke.network.label"}}
{{#if clusterTemplateCreate}} {{#if clusterTemplateCreate}}
@ -32,47 +33,10 @@
{{/input-or-display}} {{/input-or-display}}
</CheckOverrideAllowed> </CheckOverrideAllowed>
{{#if cluster.windowsPreferedCluster}}
<label class="acc-label mt-30">
{{t "clusterNew.rke.network.flannelBackends.label"}}
</label>
<CheckOverrideAllowed
@questions={{clusterTemplateRevision.questions}}
@paramName="rancherKubernetesEngineConfig.network.options.flannel_backend_type"
@clusterTemplateRevision={{clusterTemplateRevision.clusterConfig}}
@applyClusterTemplate={{applyClusterTemplate}}
>
{{#input-or-display
editable=(not-eq mode "view")
value=config.network.options.flannel_backend_type
}}
<div class="radio">
<label class={{if isEditCluster "text-muted"}}>
{{radio-button
selection=config.network.options.flannel_backend_type
value="host-gw"
disabled=isEditCluster
}}
{{t "clusterNew.rke.network.flannelBackends.hostgw"}}
</label>
</div> </div>
<div class="radio">
<label class={{if isEditCluster "text-muted"}}>
{{radio-button
selection=config.network.options.flannel_backend_type
value="vxlan"
disabled=isEditCluster
}}
{{t "clusterNew.rke.network.flannelBackends.vxlan"}}
</label>
</div>
{{/input-or-display}}
</CheckOverrideAllowed>
{{/if}}
</div>
{{!-- disabled for now --}} {{!-- disabled for now --}}
{{#if (and isCustom (or (eq mode "new") clusterTemplateCreate))}} {{#if (and isCustom (or (eq mode "new") clusterTemplateCreate))}}
<div class="col span-4"> <div class="col span-4">
<label class="acc-label"> <label class="acc-label">
{{t "clusterNew.rke.windowsSupport.label"}} {{t "clusterNew.rke.windowsSupport.label"}}
@ -116,9 +80,9 @@
</p> </p>
{{/unless}} {{/unless}}
</div> </div>
{{/if}} {{/if}}
<div class="col {{if (and isCustom (or (eq mode "new") clusterTemplateCreate)) "span-4" "span-6"}}"> <div class="col {{if (and isCustom (or (eq mode "new") clusterTemplateCreate)) "span-4" "span-6"}}">
<label class="acc-label"> <label class="acc-label">
{{t "clusterNew.rke.networkPolicy.label"}} {{t "clusterNew.rke.networkPolicy.label"}}
{{#if (and clusterTemplateCreate projectNetworkIsolationAvailable)}} {{#if (and clusterTemplateCreate projectNetworkIsolationAvailable)}}
@ -163,4 +127,81 @@
</div> </div>
{{/input-or-display}} {{/input-or-display}}
</CheckOverrideAllowed> </CheckOverrideAllowed>
</div>
</div>
<div class="row">
{{#if cluster.windowsPreferedCluster}}
<div class="col span-4">
<label class="acc-label">
{{t "clusterNew.rke.network.flannelBackends.label"}}
</label>
<CheckOverrideAllowed
@questions={{clusterTemplateRevision.questions}}
@paramName="rancherKubernetesEngineConfig.network.options.flannel_backend_type"
@clusterTemplateRevision={{clusterTemplateRevision.clusterConfig}}
@applyClusterTemplate={{applyClusterTemplate}}
>
{{#input-or-display
editable=(not-eq mode "view")
value=config.network.options.flannel_backend_type
}}
<div class="radio">
<label class={{if isEditCluster "text-muted"}}>
{{radio-button
selection=config.network.options.flannel_backend_type
value="host-gw"
disabled=isEditCluster
}}
{{t "clusterNew.rke.network.flannelBackends.hostgw"}}
</label>
</div>
<div class="radio">
<label class={{if isEditCluster "text-muted"}}>
{{radio-button
selection=config.network.options.flannel_backend_type
value="vxlan"
disabled=isEditCluster
}}
{{t "clusterNew.rke.network.flannelBackends.vxlan"}}
</label>
</div>
{{/input-or-display}}
</CheckOverrideAllowed>
</div>
{{/if}}
<div class="col span-4">
<label class="acc-label">
{{t "clusterNew.rke.networkMTU.label"}}
{{#if clusterTemplateCreate}}
<ClusterTemplateOverrideToggle
@path="rancherKubernetesEngineConfig.network.mtu"
@configVariable={{config.network.mtu}}
@addOverride={{addOverride}}
@questions={{clusterTemplateRevision.questions}}
/>
{{/if}}
</label>
<CheckOverrideAllowed
@questions={{clusterTemplateRevision.questions}}
@paramName="rancherKubernetesEngineConfig.network.mtu"
@clusterTemplateRevision={{clusterTemplateRevision.clusterConfig}}
@applyClusterTemplate={{applyClusterTemplate}}
>
{{#input-or-display
editable=(not-eq mode "view")
value=config.network.mtu
}}
{{input-integer
value=config.network.mtu
min=1
classNames="form-control"
placeholder=(t "clusterNew.rke.networkMTU.detail")
}}
{{/input-or-display}}
</CheckOverrideAllowed>
</div>
</div> </div>

View File

@ -4093,6 +4093,9 @@ clusterNew:
label: Metrics Server Monitoring label: Metrics Server Monitoring
networkPolicy: networkPolicy:
label: Project Network Isolation label: Project Network Isolation
networkMTU:
label: Network MTU
detail: e.g. 1500
version: version:
label: Kubernetes Version label: Kubernetes Version
registry: registry: