mirror of https://github.com/rancher/ui.git
Only allow PNI to be selected if a network policy is selected
rancher/dashboard#4452
This commit is contained in:
parent
8882463d22
commit
38503c3640
|
|
@ -321,6 +321,10 @@ export default Component.extend(ClusterDriver, {
|
||||||
if (networkPlugin === 'kubenet' && networkPolicy === 'azure') {
|
if (networkPlugin === 'kubenet' && networkPolicy === 'azure') {
|
||||||
set(this, 'config.networkPolicy', null);
|
set(this, 'config.networkPolicy', null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.config.networkPolicy === null) {
|
||||||
|
set(this, 'cluster.enableNetworkPolicy', false)
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
resetIpRanges: observer('config.privateCluster', 'loadBalancerSku', function() {
|
resetIpRanges: observer('config.privateCluster', 'loadBalancerSku', function() {
|
||||||
|
|
|
||||||
|
|
@ -562,7 +562,7 @@
|
||||||
<Input
|
<Input
|
||||||
@type="checkbox"
|
@type="checkbox"
|
||||||
@checked={{mut cluster.enableNetworkPolicy}}
|
@checked={{mut cluster.enableNetworkPolicy}}
|
||||||
@disabled={{editing}}
|
@disabled={{or editing (not config.networkPolicy)}}
|
||||||
/>
|
/>
|
||||||
{{t "clusterNew.rke.networkPolicy.label"}}
|
{{t "clusterNew.rke.networkPolicy.label"}}
|
||||||
{{#if editing}}
|
{{#if editing}}
|
||||||
|
|
@ -571,7 +571,16 @@
|
||||||
@model={{t "clusterNew.rke.networkPolicy.editHelp"}}
|
@model={{t "clusterNew.rke.networkPolicy.editHelp"}}
|
||||||
@tooltipTemplate="tooltip-static"
|
@tooltipTemplate="tooltip-static"
|
||||||
@aria-describedby="tooltip-base"
|
@aria-describedby="tooltip-base"
|
||||||
@tooltipFor="tooltipNetworkPolicy"
|
@placement="top"
|
||||||
|
>
|
||||||
|
<i class="acc-label icon icon-info"></i>
|
||||||
|
</TooltipElement>
|
||||||
|
{{else if (not config.networkPolicy)}}
|
||||||
|
<TooltipElement
|
||||||
|
@type="tooltip-basic"
|
||||||
|
@model={{t "clusterNew.rke.networkPolicy.selectNetworkPolicyHelp"}}
|
||||||
|
@tooltipTemplate="tooltip-static"
|
||||||
|
@aria-describedby="tooltip-base"
|
||||||
@placement="top"
|
@placement="top"
|
||||||
>
|
>
|
||||||
<i class="acc-label icon icon-info"></i>
|
<i class="acc-label icon icon-info"></i>
|
||||||
|
|
|
||||||
|
|
@ -4649,6 +4649,7 @@ clusterNew:
|
||||||
networkPolicy:
|
networkPolicy:
|
||||||
label: Project Network Isolation
|
label: Project Network Isolation
|
||||||
editHelp: The Project Network Isolation option cannot be changed after the cluster is created
|
editHelp: The Project Network Isolation option cannot be changed after the cluster is created
|
||||||
|
selectNetworkPolicyHelp: You must have a Network Policy selected to use Project Network Isolation
|
||||||
nodeName:
|
nodeName:
|
||||||
detail: Optionally configure the node name as identification instead of the actual hostname
|
detail: Optionally configure the node name as identification instead of the actual hostname
|
||||||
placeholder: e.g. my-worker-node
|
placeholder: e.g. my-worker-node
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue