@@ -307,9 +307,9 @@ The first scale operation occurs at T2 and the second scale at T3.
307307
308308| Time | Terminating Pods | RS1 Replicas | RS2 Replicas | RS3 Replicas | All RS Total | Deployment .spec.replicas | Deployment .spec.replicas + MaxSurge | Scale ratio |
309309| ------| ------------------| --------------| --------------| --------------| --------------| ---------------------------| --------------------------------------| -------------|
310- | T1 | any amount | 50 | 30 | 20 | 100 | 100 | 110 | - |
311- | T2 | any amount | 61 | 35 | 24 | 120 | 120 | 130 | 1.182 |
312- | T3 | any amount | 66 | 38 | 26 | 130 | 130 | 140 | 1.077 |
310+ | T1 | any amount | 60 | 30 | 20 | 110 | 100 | 110 | - |
311+ | T2 | any amount | 71 | 35 | 24 | 130 | 120 | 130 | 1.182 |
312+ | T3 | any amount | 76 | 38 | 26 | 140 | 130 | 140 | 1.077 |
313313
314314With the ` TerminationComplete ` PodReplacementPolicy, scaling cannot proceed immediately if there
315315are terminating pods present, in order to adhere to the Deployment constraints. We need to scale
@@ -321,9 +321,9 @@ A single scale operation occurs at T2.
321321| Time | Terminating Pods | RS1 Replicas | RS2 Replicas | RS3 Replicas | All RS Total | Deployment .spec.replicas | Deployment .spec.replicas + MaxSurge | Scale ratio |
322322| ------| ------------------| --------------| --------------| --------------| --------------| ---------------------------| --------------------------------------| -------------|
323323| T1 | 15 | 50 | 30 | 20 | 100 | 100 | 110 | - |
324- | T2 | 15 | 61 | 34 | 20 | 115 | 120 | 130 | 1.182 |
325- | T3 | 5 | 61 | 35 | 24 | 120 | 120 | 130 | - |
326- | T4 | 0 | 61 | 35 | 24 | 120 | 120 | 130 | - |
324+ | T2 | 15 | 59 | 35 | 21 | 115 | 120 | 130 | 1.182 |
325+ | T3 | 5 | 66 | 35 | 24 | 125 | 120 | 130 | - |
326+ | T4 | 0 | 71 | 35 | 24 | 130 | 120 | 130 | - |
327327
328328To proceed with the scaling in the future (T3), we need to remember both ` replicasBeforeScale ` and
329329` deploymentMaxReplicasBeforeScale ` to calculate the original scale ratio. The terminating pods can
@@ -348,10 +348,10 @@ The following example shows a first scale at T2 and a second scale at T3.
348348| Time | Terminating Pods | RS1 Replicas | RS2 Replicas | RS3 Replicas | All RS Total | Deployment .spec.replicas | Deployment .spec.replicas + MaxSurge | Scale ratio |
349349| ------| ------------------| --------------| --------------| --------------| --------------| ---------------------------| --------------------------------------| -----------------------|
350350| T1 | 15 | 50 | 30 | 20 | 100 | 100 | 110 | - |
351- | T2 | 15 | 61 | 34 | 20 | 115 | 120 | 130 | 1.182 |
351+ | T2 | 15 | 59 | 35 | 21 | 115 | 120 | 130 | 1.182 |
352352| T3 | 15 | 66 | 38 | 21 | 125 | 130 | 140 | 1.077 (1.273 from T1) |
353- | T4 | 5 | 67 | 38 | 25 | 130 | 130 | 140 | - |
354- | T5 | 0 | 67 | 38 | 25 | 130 | 130 | 140 | - |
353+ | T4 | 5 | 72 | 38 | 25 | 135 | 130 | 140 | - |
354+ | T5 | 0 | 77 | 38 | 25 | 140 | 130 | 140 | - |
355355
356356- At T2, a ful scale was done for RS1 with a ratio of 1.182. RS1 can then use the new scale ratio
357357 at T3 with a value of 1.077.
0 commit comments