mirror of https://github.com/rancher/ui.git
Show warning if etcd count is invalid when editing cluster
https://github.com/rancher/rancher/issues/15494
This commit is contained in:
parent
b86845453c
commit
687a25fcad
|
|
@ -149,7 +149,7 @@ export default Component.extend({
|
||||||
|
|
||||||
const errors = [];
|
const errors = [];
|
||||||
|
|
||||||
if ( !get(this, 'etcdOk') ) {
|
if ( get(this, 'mode') === 'new' && !get(this, 'etcdOk') ) {
|
||||||
errors.push(intl.t('clusterNew.rke.errors.etcd'));
|
errors.push(intl.t('clusterNew.rke.errors.etcd'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -201,6 +201,10 @@ export default Component.extend({
|
||||||
return count === 1 || count === 3 || count === 5
|
return count === 1 || count === 3 || count === 5
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
etcdCount: computed('nodePools.@each.{quantity,etcd}', function() {
|
||||||
|
return this._nodeCountFor('etcd');
|
||||||
|
}),
|
||||||
|
|
||||||
controlPlaneOk: computed('nodePools.@each.{quantity,controlPlane}', function() {
|
controlPlaneOk: computed('nodePools.@each.{quantity,controlPlane}', function() {
|
||||||
let count = this._nodeCountFor('controlPlane');
|
let count = this._nodeCountFor('controlPlane');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,12 +97,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if showIamWarning}}
|
{{#if showIamWarning}}
|
||||||
<div class="banner bg-warning">
|
{{banner-message icon='icon-alert' color='bg-warning mb-10' message=(t 'clusterNew.rke.warning.aws.iam')}}
|
||||||
<div class="banner-icon"><span class="icon icon-alert"></span></div>
|
{{/if}}
|
||||||
<div class="banner-message">
|
|
||||||
<p>{{t 'clusterNew.rke.warning.aws.iam'}}</p>
|
{{#if (and (eq mode 'edit') (not etcdOk))}}
|
||||||
</div>
|
{{banner-message icon='icon-alert' color='bg-warning mb-10' message=(if (lt etcdCount 1) (t 'clusterNew.rke.warning.etcd.noEtcd') (t 'clusterNew.rke.warning.etcd.even' count=etcdCount))}}
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/accordion-list-item}}
|
{{/accordion-list-item}}
|
||||||
{{/accordion-list}}
|
{{/accordion-list}}
|
||||||
|
|
|
||||||
|
|
@ -2157,6 +2157,9 @@ clusterNew:
|
||||||
domain: Cluster Domain
|
domain: Cluster Domain
|
||||||
dns: Cluster DNS Server
|
dns: Cluster DNS Server
|
||||||
warning:
|
warning:
|
||||||
|
etcd:
|
||||||
|
even: Setting {count} etcd nodes is a waste of hardware because it doesn't increase the quorum until you have an odd number.
|
||||||
|
noEtcd: The number of etcd nodes should not be less than 1.
|
||||||
aws:
|
aws:
|
||||||
iam: 'An IAM role name should be provided in node template when using the Cloud Provider Amazon'
|
iam: 'An IAM role name should be provided in node template when using the Cloud Provider Amazon'
|
||||||
errors:
|
errors:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue