1- <div class =" col {{ if (and isCustom (or (eq mode " new" ) clusterTemplateCreate )) " span-4" " span-6" }} " >
2- <label class =" acc-label" for =" network-plugin" >
3- {{ t " clusterNew.rke.network.label" }}
4- {{ #if clusterTemplateCreate }}
5- <ClusterTemplateOverrideToggle
6- @path =" rancherKubernetesEngineConfig.network.plugin"
7- @configVariable ={{ config.network.plugin }}
8- @addOverride ={{ addOverride }}
9- @questions ={{ clusterTemplateRevision.questions }}
10- />
11- {{ /if }}
12- </label >
13-
14- <CheckOverrideAllowed
15- @questions ={{ clusterTemplateRevision.questions }}
16- @paramName =" rancherKubernetesEngineConfig.network.plugin"
17- @clusterTemplateRevision ={{ clusterTemplateRevision.clusterConfig }}
18- @applyClusterTemplate ={{ applyClusterTemplate }}
19- as |override|
20- >
21- {{ #input-or-display
22- editable = (or (and (eq mode " new" ) (or (not applyClusterTemplate ) override.hasOverride )) clusterTemplateCreate )
23- value =config.network.plugin
24- }}
25- {{ new-select
26- id =" network-plugin"
27- classNames =" form-control"
28- content =networkContent
29- localizedLabel =true
30- value =config.network.plugin
31- }}
32- {{ /input-or-display }}
33- </CheckOverrideAllowed >
34-
35- {{ #if cluster.windowsPreferedCluster }}
36- <label class =" acc-label mt-30" >
37- {{ t " clusterNew.rke.network.flannelBackends.label" }}
1+ <div class =" row" >
2+ <div class =" col {{ if (and isCustom (or (eq mode " new" ) clusterTemplateCreate )) " span-4" " span-6" }} " >
3+ <label class =" acc-label" for =" network-plugin" >
4+ {{ t " clusterNew.rke.network.label" }}
5+ {{ #if clusterTemplateCreate }}
6+ <ClusterTemplateOverrideToggle
7+ @path =" rancherKubernetesEngineConfig.network.plugin"
8+ @configVariable ={{ config.network.plugin }}
9+ @addOverride ={{ addOverride }}
10+ @questions ={{ clusterTemplateRevision.questions }}
11+ />
12+ {{ /if }}
3813 </label >
14+
3915 <CheckOverrideAllowed
4016 @questions ={{ clusterTemplateRevision.questions }}
41- @paramName =" rancherKubernetesEngineConfig.network.options.flannel_backend_type "
17+ @paramName =" rancherKubernetesEngineConfig.network.plugin "
4218 @clusterTemplateRevision ={{ clusterTemplateRevision.clusterConfig }}
4319 @applyClusterTemplate ={{ applyClusterTemplate }}
20+ as |override|
4421 >
4522 {{ #input-or-display
46- editable = (not- eq mode " view " )
47- value =config.network.options.flannel_backend_type
23+ editable = (or ( and ( eq mode " new " ) ( or ( not applyClusterTemplate ) override.hasOverride )) clusterTemplateCreate )
24+ value =config.network.plugin
4825 }}
49- <div class =" radio" >
50- <label class ={{ if isEditCluster " text-muted" }} >
51- {{ radio-button
52- selection =config.network.options.flannel_backend_type
53- value =" host-gw"
54- disabled =isEditCluster
55- }}
56- {{ t " clusterNew.rke.network.flannelBackends.hostgw" }}
57- </label >
58- </div >
59- <div class =" radio" >
60- <label class ={{ if isEditCluster " text-muted" }} >
61- {{ radio-button
62- selection =config.network.options.flannel_backend_type
63- value =" vxlan"
64- disabled =isEditCluster
65- }}
66- {{ t " clusterNew.rke.network.flannelBackends.vxlan" }}
67- </label >
68- </div >
26+ {{ new-select
27+ id =" network-plugin"
28+ classNames =" form-control"
29+ content =networkContent
30+ localizedLabel =true
31+ value =config.network.plugin
32+ }}
6933 {{ /input-or-display }}
7034 </CheckOverrideAllowed >
35+
36+ </div >
37+
38+ {{!-- disabled for now --}}
39+ {{ #if (and isCustom (or (eq mode " new" ) clusterTemplateCreate ))}}
40+ <div class =" col span-4" >
41+ <label class =" acc-label" >
42+ {{ t " clusterNew.rke.windowsSupport.label" }}
43+ </label >
44+ <CheckComputedOverride
45+ @applyClusterTemplate ={{ applyClusterTemplate }}
46+ @clusterTemplateCreate ={{ clusterTemplateCreate }}
47+ @computedOverrideAllowed ={{ windowsSupportOverrideAvailable }}
48+ @windowsSupportAvailable ={{ mut windowsSupportAvailable }}
49+ @computedState ={{ cluster.windowsPreferedCluster }}
50+ >
51+ {{ #input-or-display
52+ editable = (not-eq mode " view" )
53+ value =cluster.windowsPreferedCluster
54+ }}
55+ <div class =" radio" >
56+ <label class ={{ unless windowsSupportAvailable " text-muted" }} >
57+ {{ radio-button
58+ selection =cluster.windowsPreferedCluster
59+ value =true
60+ disabled = (not windowsSupportAvailable )
61+ }}
62+ {{ t " generic.enabled" }}
63+ </label >
64+ </div >
65+ <div class =" radio" >
66+ <label class ={{ unless windowsSupportAvailable " text-muted" }} >
67+ {{ radio-button
68+ selection =cluster.windowsPreferedCluster
69+ value =false
70+ disabled = (not windowsSupportAvailable )
71+ }}
72+ {{ t " generic.disabled" }}
73+ </label >
74+ </div >
75+ {{ /input-or-display }}
76+ </CheckComputedOverride >
77+ {{ #unless windowsSupportAvailable }}
78+ <p class =" help-block" >
79+ {{ t " clusterNew.rke.windowsSupport.help" }}
80+ </p >
81+ {{ /unless }}
82+ </div >
7183 {{ /if }}
72- </div >
7384
74- {{!-- disabled for now --}}
75- {{ #if (and isCustom (or (eq mode " new" ) clusterTemplateCreate ))}}
76- <div class =" col span-4" >
85+ <div class =" col {{ if (and isCustom (or (eq mode " new" ) clusterTemplateCreate )) " span-4" " span-6" }} " >
7786 <label class =" acc-label" >
78- {{ t " clusterNew.rke.windowsSupport.label" }}
87+ {{ t " clusterNew.rke.networkPolicy.label" }}
88+ {{ #if (and clusterTemplateCreate projectNetworkIsolationAvailable )}}
89+ <ClusterTemplateOverrideToggle
90+ @path =" enableNetworkPolicy"
91+ @configVariable ={{ enableNetworkPolicy }}
92+ @addOverride ={{ addOverride }}
93+ @questions ={{ clusterTemplateRevision.questions }}
94+ />
95+ {{ /if }}
7996 </label >
80- <CheckComputedOverride
97+
98+ <CheckOverrideAllowed
99+ @questions ={{ clusterTemplateRevision.questions }}
100+ @paramName =" enableNetworkPolicy"
101+ @clusterTemplateRevision ={{ clusterTemplateRevision.clusterConfig }}
81102 @applyClusterTemplate ={{ applyClusterTemplate }}
82- @clusterTemplateCreate ={{ clusterTemplateCreate }}
83- @computedOverrideAllowed ={{ windowsSupportOverrideAvailable }}
84- @windowsSupportAvailable ={{ mut windowsSupportAvailable }}
85- @computedState ={{ cluster.windowsPreferedCluster }}
86103 >
87104 {{ #input-or-display
88105 editable = (not-eq mode " view" )
89- value =cluster.windowsPreferedCluster
106+ value =enableNetworkPolicy
90107 }}
91108 <div class =" radio" >
92- <label class ={{ unless windowsSupportAvailable " text-muted" }} >
109+ <label class ={{ unless projectNetworkIsolationAvailable " text-muted" }} >
93110 {{ radio-button
94- selection =cluster.windowsPreferedCluster
111+ selection =enableNetworkPolicy
95112 value =true
96- disabled = (not windowsSupportAvailable )
113+ disabled = (not projectNetworkIsolationAvailable )
97114 }}
98115 {{ t " generic.enabled" }}
99116 </label >
100117 </div >
101118 <div class =" radio" >
102- <label class ={{ unless windowsSupportAvailable " text-muted" }} >
119+ <label class ={{ unless projectNetworkIsolationAvailable " text-muted" }} >
103120 {{ radio-button
104- selection =cluster.windowsPreferedCluster
121+ selection =enableNetworkPolicy
105122 value =false
106- disabled = (not windowsSupportAvailable )
123+ disabled = (not projectNetworkIsolationAvailable )
107124 }}
108125 {{ t " generic.disabled" }}
109126 </label >
110127 </div >
111128 {{ /input-or-display }}
112- </CheckComputedOverride >
113- {{ #unless windowsSupportAvailable }}
114- <p class =" help-block" >
115- {{ t " clusterNew.rke.windowsSupport.help" }}
116- </p >
117- {{ /unless }}
129+ </CheckOverrideAllowed >
118130 </div >
119- {{ /if }}
131+ </ div >
120132
121- <div class =" col {{ if (and isCustom (or (eq mode " new" ) clusterTemplateCreate )) " span-4" " span-6" }} " >
122- <label class =" acc-label" >
123- {{ t " clusterNew.rke.networkPolicy.label" }}
124- {{ #if (and clusterTemplateCreate projectNetworkIsolationAvailable )}}
125- <ClusterTemplateOverrideToggle
126- @path =" enableNetworkPolicy"
127- @configVariable ={{ enableNetworkPolicy }}
128- @addOverride ={{ addOverride }}
133+ <div class =" row" >
134+ {{ #if cluster.windowsPreferedCluster }}
135+ <div class =" col span-4" >
136+ <label class =" acc-label" >
137+ {{ t " clusterNew.rke.network.flannelBackends.label" }}
138+ </label >
139+ <CheckOverrideAllowed
129140 @questions ={{ clusterTemplateRevision.questions }}
130- />
131- {{ /if }}
132- </label >
141+ @paramName =" rancherKubernetesEngineConfig.network.options.flannel_backend_type"
142+ @clusterTemplateRevision ={{ clusterTemplateRevision.clusterConfig }}
143+ @applyClusterTemplate ={{ applyClusterTemplate }}
144+ >
145+ {{ #input-or-display
146+ editable = (not-eq mode " view" )
147+ value =config.network.options.flannel_backend_type
148+ }}
149+ <div class =" radio" >
150+ <label class ={{ if isEditCluster " text-muted" }} >
151+ {{ radio-button
152+ selection =config.network.options.flannel_backend_type
153+ value =" host-gw"
154+ disabled =isEditCluster
155+ }}
156+ {{ t " clusterNew.rke.network.flannelBackends.hostgw" }}
157+ </label >
158+ </div >
159+ <div class =" radio" >
160+ <label class ={{ if isEditCluster " text-muted" }} >
161+ {{ radio-button
162+ selection =config.network.options.flannel_backend_type
163+ value =" vxlan"
164+ disabled =isEditCluster
165+ }}
166+ {{ t " clusterNew.rke.network.flannelBackends.vxlan" }}
167+ </label >
168+ </div >
169+ {{ /input-or-display }}
170+ </CheckOverrideAllowed >
171+ </div >
172+ {{ /if }}
173+
174+ <div class =" col span-4" >
175+ <label class =" acc-label" >
176+ {{ t " clusterNew.rke.networkMTU.label" }}
177+ {{ #if clusterTemplateCreate }}
178+ <ClusterTemplateOverrideToggle
179+ @path =" rancherKubernetesEngineConfig.network.mtu"
180+ @configVariable ={{ config.network.mtu }}
181+ @addOverride ={{ addOverride }}
182+ @questions ={{ clusterTemplateRevision.questions }}
183+ />
184+ {{ /if }}
185+ </label >
133186
134- <CheckOverrideAllowed
135- @questions ={{ clusterTemplateRevision.questions }}
136- @paramName =" enableNetworkPolicy"
137- @clusterTemplateRevision ={{ clusterTemplateRevision.clusterConfig }}
138- @applyClusterTemplate ={{ applyClusterTemplate }}
139- >
140- {{ #input-or-display
141- editable = (not-eq mode " view" )
142- value =enableNetworkPolicy
143- }}
144- <div class =" radio" >
145- <label class ={{ unless projectNetworkIsolationAvailable " text-muted" }} >
146- {{ radio-button
147- selection =enableNetworkPolicy
148- value =true
149- disabled = (not projectNetworkIsolationAvailable )
150- }}
151- {{ t " generic.enabled" }}
152- </label >
153- </div >
154- <div class =" radio" >
155- <label class ={{ unless projectNetworkIsolationAvailable " text-muted" }} >
156- {{ radio-button
157- selection =enableNetworkPolicy
158- value =false
159- disabled = (not projectNetworkIsolationAvailable )
160- }}
161- {{ t " generic.disabled" }}
162- </label >
163- </div >
164- {{ /input-or-display }}
165- </CheckOverrideAllowed >
187+ <CheckOverrideAllowed
188+ @questions ={{ clusterTemplateRevision.questions }}
189+ @paramName =" rancherKubernetesEngineConfig.network.mtu"
190+ @clusterTemplateRevision ={{ clusterTemplateRevision.clusterConfig }}
191+ @applyClusterTemplate ={{ applyClusterTemplate }}
192+ >
193+ {{ #input-or-display
194+ editable = (not-eq mode " view" )
195+ value =config.network.mtu
196+ }}
197+ {{ input-integer
198+ value =config.network.mtu
199+ min =1
200+ classNames =" form-control"
201+ placeholder = (t " clusterNew.rke.networkMTU.detail" )
202+ }}
203+ {{ /input-or-display }}
204+ </CheckOverrideAllowed >
205+
206+ </div >
166207</div >
0 commit comments