-
Notifications
You must be signed in to change notification settings - Fork 21
Description
⭐ Following up from NA KubeCon 2021 ⭐
Per my discussion with Lalith Suresh and Xudong Sun
Safety checking throughout the testing process would be invaluable for our controller, which enforces a set order of dependencies between the pods of a group of Deployments.
For example, we have 3 Deployments First, Second, and Third -- where the pods of Second rely on the pods of First being available and the pods of Third rely on the pods of both Second and First.
For simplification it's easiest to imagine that all three deployments have the same number of replicas e.g. 5; however, in reality we calculate this based on a ratio between the deployments*.
Consider the case where each Deployment is expected to have 5 replicas at the end of the roll and the dependency structure is as described above:
| Time | First | Second | Third |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 0 | 0 |
| 2 | 2 | 1 | 0 |
| 3 | 3 | 1 | 1 |
| 4 | 4 | 2 | 2 |
| 5 | 4 | 3 | 3 |
| 6 | 5 | 3 | 3 |
| 7 | 5 | 4 | 3 |
| 8 | 5 | 5 | 4 |
| 9 | 5 | 5 | 5 |
We would like to be able to check that we are not violating this dependency tree while Deployments are becoming available.
- For example
Firstcan have 7 replicas andSecondcan have 5 andThirdcan have 13. The ratio betweenFirstandSecondwould be for every pod ofFirstwe can have (1/7 * 5 = ~0.7 ) pods ofSecond, and similarly for the ratio betweenSecondandThirdandFirstandThirdetc...