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,166 +1,207 @@
<div class="col {{if (and isCustom (or (eq mode "new") clusterTemplateCreate)) "span-4" "span-6"}}"> <div class="row">
<label class="acc-label" for="network-plugin"> <div class="col {{if (and isCustom (or (eq mode "new") clusterTemplateCreate)) "span-4" "span-6"}}">
{{t "clusterNew.rke.network.label"}} <label class="acc-label" for="network-plugin">
{{#if clusterTemplateCreate}} {{t "clusterNew.rke.network.label"}}
<ClusterTemplateOverrideToggle {{#if clusterTemplateCreate}}
@path="rancherKubernetesEngineConfig.network.plugin" <ClusterTemplateOverrideToggle
@configVariable={{config.network.plugin}} @path="rancherKubernetesEngineConfig.network.plugin"
@addOverride={{addOverride}} @configVariable={{config.network.plugin}}
@questions={{clusterTemplateRevision.questions}} @addOverride={{addOverride}}
/> @questions={{clusterTemplateRevision.questions}}
{{/if}} />
</label> {{/if}}
<CheckOverrideAllowed
@questions={{clusterTemplateRevision.questions}}
@paramName="rancherKubernetesEngineConfig.network.plugin"
@clusterTemplateRevision={{clusterTemplateRevision.clusterConfig}}
@applyClusterTemplate={{applyClusterTemplate}}
as |override|
>
{{#input-or-display
editable=(or (and (eq mode "new") (or (not applyClusterTemplate) override.hasOverride)) clusterTemplateCreate)
value=config.network.plugin
}}
{{new-select
id="network-plugin"
classNames="form-control"
content=networkContent
localizedLabel=true
value=config.network.plugin
}}
{{/input-or-display}}
</CheckOverrideAllowed>
{{#if cluster.windowsPreferedCluster}}
<label class="acc-label mt-30">
{{t "clusterNew.rke.network.flannelBackends.label"}}
</label> </label>
<CheckOverrideAllowed <CheckOverrideAllowed
@questions={{clusterTemplateRevision.questions}} @questions={{clusterTemplateRevision.questions}}
@paramName="rancherKubernetesEngineConfig.network.options.flannel_backend_type" @paramName="rancherKubernetesEngineConfig.network.plugin"
@clusterTemplateRevision={{clusterTemplateRevision.clusterConfig}}
@applyClusterTemplate={{applyClusterTemplate}}
as |override|
>
{{#input-or-display
editable=(or (and (eq mode "new") (or (not applyClusterTemplate) override.hasOverride)) clusterTemplateCreate)
value=config.network.plugin
}}
{{new-select
id="network-plugin"
classNames="form-control"
content=networkContent
localizedLabel=true
value=config.network.plugin
}}
{{/input-or-display}}
</CheckOverrideAllowed>
</div>
{{!-- disabled for now --}}
{{#if (and isCustom (or (eq mode "new") clusterTemplateCreate))}}
<div class="col span-4">
<label class="acc-label">
{{t "clusterNew.rke.windowsSupport.label"}}
</label>
<CheckComputedOverride
@applyClusterTemplate={{applyClusterTemplate}}
@clusterTemplateCreate={{clusterTemplateCreate}}
@computedOverrideAllowed={{windowsSupportOverrideAvailable}}
@windowsSupportAvailable={{mut windowsSupportAvailable}}
@computedState={{cluster.windowsPreferedCluster}}
>
{{#input-or-display
editable=(not-eq mode "view")
value=cluster.windowsPreferedCluster
}}
<div class="radio">
<label class={{unless windowsSupportAvailable "text-muted"}}>
{{radio-button
selection=cluster.windowsPreferedCluster
value=true
disabled=(not windowsSupportAvailable)
}}
{{t "generic.enabled"}}
</label>
</div>
<div class="radio">
<label class={{unless windowsSupportAvailable "text-muted"}}>
{{radio-button
selection=cluster.windowsPreferedCluster
value=false
disabled=(not windowsSupportAvailable)
}}
{{t "generic.disabled"}}
</label>
</div>
{{/input-or-display}}
</CheckComputedOverride>
{{#unless windowsSupportAvailable}}
<p class="help-block">
{{t "clusterNew.rke.windowsSupport.help"}}
</p>
{{/unless}}
</div>
{{/if}}
<div class="col {{if (and isCustom (or (eq mode "new") clusterTemplateCreate)) "span-4" "span-6"}}">
<label class="acc-label">
{{t "clusterNew.rke.networkPolicy.label"}}
{{#if (and clusterTemplateCreate projectNetworkIsolationAvailable)}}
<ClusterTemplateOverrideToggle
@path="enableNetworkPolicy"
@configVariable={{enableNetworkPolicy}}
@addOverride={{addOverride}}
@questions={{clusterTemplateRevision.questions}}
/>
{{/if}}
</label>
<CheckOverrideAllowed
@questions={{clusterTemplateRevision.questions}}
@paramName="enableNetworkPolicy"
@clusterTemplateRevision={{clusterTemplateRevision.clusterConfig}} @clusterTemplateRevision={{clusterTemplateRevision.clusterConfig}}
@applyClusterTemplate={{applyClusterTemplate}} @applyClusterTemplate={{applyClusterTemplate}}
> >
{{#input-or-display {{#input-or-display
editable=(not-eq mode "view") editable=(not-eq mode "view")
value=config.network.options.flannel_backend_type value=enableNetworkPolicy
}} }}
<div class="radio"> <div class="radio">
<label class={{if isEditCluster "text-muted"}}> <label class={{unless projectNetworkIsolationAvailable "text-muted"}}>
{{radio-button {{radio-button
selection=config.network.options.flannel_backend_type selection=enableNetworkPolicy
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>
{{/if}}
</div>
{{!-- disabled for now --}}
{{#if (and isCustom (or (eq mode "new") clusterTemplateCreate))}}
<div class="col span-4">
<label class="acc-label">
{{t "clusterNew.rke.windowsSupport.label"}}
</label>
<CheckComputedOverride
@applyClusterTemplate={{applyClusterTemplate}}
@clusterTemplateCreate={{clusterTemplateCreate}}
@computedOverrideAllowed={{windowsSupportOverrideAvailable}}
@windowsSupportAvailable={{mut windowsSupportAvailable}}
@computedState={{cluster.windowsPreferedCluster}}
>
{{#input-or-display
editable=(not-eq mode "view")
value=cluster.windowsPreferedCluster
}}
<div class="radio">
<label class={{unless windowsSupportAvailable "text-muted"}}>
{{radio-button
selection=cluster.windowsPreferedCluster
value=true value=true
disabled=(not windowsSupportAvailable) disabled=(not projectNetworkIsolationAvailable)
}} }}
{{t "generic.enabled"}} {{t "generic.enabled"}}
</label> </label>
</div> </div>
<div class="radio"> <div class="radio">
<label class={{unless windowsSupportAvailable "text-muted"}}> <label class={{unless projectNetworkIsolationAvailable "text-muted"}}>
{{radio-button {{radio-button
selection=cluster.windowsPreferedCluster selection=enableNetworkPolicy
value=false value=false
disabled=(not windowsSupportAvailable) disabled=(not projectNetworkIsolationAvailable)
}} }}
{{t "generic.disabled"}} {{t "generic.disabled"}}
</label> </label>
</div> </div>
{{/input-or-display}} {{/input-or-display}}
</CheckComputedOverride> </CheckOverrideAllowed>
{{#unless windowsSupportAvailable}}
<p class="help-block">
{{t "clusterNew.rke.windowsSupport.help"}}
</p>
{{/unless}}
</div> </div>
{{/if}} </div>
<div class="col {{if (and isCustom (or (eq mode "new") clusterTemplateCreate)) "span-4" "span-6"}}"> <div class="row">
<label class="acc-label"> {{#if cluster.windowsPreferedCluster}}
{{t "clusterNew.rke.networkPolicy.label"}} <div class="col span-4">
{{#if (and clusterTemplateCreate projectNetworkIsolationAvailable)}} <label class="acc-label">
<ClusterTemplateOverrideToggle {{t "clusterNew.rke.network.flannelBackends.label"}}
@path="enableNetworkPolicy" </label>
@configVariable={{enableNetworkPolicy}} <CheckOverrideAllowed
@addOverride={{addOverride}}
@questions={{clusterTemplateRevision.questions}} @questions={{clusterTemplateRevision.questions}}
/> @paramName="rancherKubernetesEngineConfig.network.options.flannel_backend_type"
{{/if}} @clusterTemplateRevision={{clusterTemplateRevision.clusterConfig}}
</label> @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}}
<CheckOverrideAllowed <div class="col span-4">
@questions={{clusterTemplateRevision.questions}} <label class="acc-label">
@paramName="enableNetworkPolicy" {{t "clusterNew.rke.networkMTU.label"}}
@clusterTemplateRevision={{clusterTemplateRevision.clusterConfig}} {{#if clusterTemplateCreate}}
@applyClusterTemplate={{applyClusterTemplate}} <ClusterTemplateOverrideToggle
> @path="rancherKubernetesEngineConfig.network.mtu"
{{#input-or-display @configVariable={{config.network.mtu}}
editable=(not-eq mode "view") @addOverride={{addOverride}}
value=enableNetworkPolicy @questions={{clusterTemplateRevision.questions}}
}} />
<div class="radio"> {{/if}}
<label class={{unless projectNetworkIsolationAvailable "text-muted"}}> </label>
{{radio-button
selection=enableNetworkPolicy <CheckOverrideAllowed
value=true @questions={{clusterTemplateRevision.questions}}
disabled=(not projectNetworkIsolationAvailable) @paramName="rancherKubernetesEngineConfig.network.mtu"
}} @clusterTemplateRevision={{clusterTemplateRevision.clusterConfig}}
{{t "generic.enabled"}} @applyClusterTemplate={{applyClusterTemplate}}
</label> >
</div> {{#input-or-display
<div class="radio"> editable=(not-eq mode "view")
<label class={{unless projectNetworkIsolationAvailable "text-muted"}}> value=config.network.mtu
{{radio-button }}
selection=enableNetworkPolicy {{input-integer
value=false value=config.network.mtu
disabled=(not projectNetworkIsolationAvailable) min=1
}} classNames="form-control"
{{t "generic.disabled"}} placeholder=(t "clusterNew.rke.networkMTU.detail")
</label> }}
</div> {{/input-or-display}}
{{/input-or-display}} </CheckOverrideAllowed>
</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: