AKS MaxSurge fixes

This commit is contained in:
Neil MacDougall 2023-05-16 11:47:11 +01:00
parent 6f465e3543
commit 3d1f143c9e
2 changed files with 9 additions and 2 deletions

View File

@ -59,6 +59,13 @@ export default Component.extend({
const labels = get(this, 'nodePool.nodeLabels');
set(this, 'hasLabels', Object.keys(labels || {}).length > 0);
// Ensure maxSurge is set - it may not be for an existing cluster created before the UI was updated to support maxSurge
const maxSurge = get(this, 'nodePool.maxSurge');
if (!maxSurge) {
set(this, 'nodePool.maxSurge', 1);
}
},
actions: {

View File

@ -668,12 +668,12 @@ export default Component.extend(ClusterDriver, {
const intValue = parseInt(value, 10);
if (!isNaN(intValue)) {
valid = intValue > 1 && intValue < 100;
valid = intValue >= 1 && intValue <= 100;
}
} else {
const intValue = parseInt(maxSurge, 10);
valid = !isNaN(intValue) && intValue > 1;
valid = !isNaN(intValue) && intValue >= 1;
}
if (!valid) {