diff --git a/lib/shared/addon/components/aks-node-pool-row/component.js b/lib/shared/addon/components/aks-node-pool-row/component.js index 587e5941e..e69785fc7 100644 --- a/lib/shared/addon/components/aks-node-pool-row/component.js +++ b/lib/shared/addon/components/aks-node-pool-row/component.js @@ -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: { diff --git a/lib/shared/addon/components/cluster-driver/driver-aks/component.js b/lib/shared/addon/components/cluster-driver/driver-aks/component.js index 42e2083f1..e050c6a87 100644 --- a/lib/shared/addon/components/cluster-driver/driver-aks/component.js +++ b/lib/shared/addon/components/cluster-driver/driver-aks/component.js @@ -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) {