mongodb-atlas-kubernetes operator need to adjust instanceSize/disk for autoscaled cluster base on instanceSize range
Scenario:
Assumptions:
autoscaling = true
current instanceSize = M40
minInstanceSize = M30
maxInstanceSize = M70
If we want to increase the minInstanceSize from M40 to M50 operator will return an error because our current instance size is less than M50, so we need to go to UI and increase the current instance size to M50(at least), and then apply the change to Kubernetes object (atlasdeployment).
We expect that if the current instanceSize is not in the range, the operator automatically increases the instanceSize to minInstanceSize to remove the extra step.
We expect the same logic for increasing/decreasing - minInstance/maxInstance and disk for an autoscaled cluster.
Resolved in version 1.4 of the Atlas Operator
It now allows the user to update the autoscaling config (min and max) to outside of current instance size and atlas will update the instance to the closest boundary. So, for example, with a current instance size on Atlas of M10, and a min and max of M10 and M30, the min and max could be changed to M30 and M80, and the instance size would now be auto-scaled up to M30 (as the nearest boundary to the old instance size). Side note: If the instance size in the config is not changed and is left at (for example M10), then you will get a warning in the logs that the spec contains an instance size outside of the current min and max. But that won't block the change or the auto-scaling.
Similarly, you can also now change the fixed instance size in the config and if that value is different from previous and also within the autoscaling min and max, then that will force an instance size change. So, for example, with a min and max of M10 and M30, you could change the instance size in the spec from M10 to M20 and it would force Atlas to scale the instance up. This might be useful if you are able to preempt a period of increased load.
This is all being added officially to the docs in the next few days, but this is already available in 1.4.
The ask mentions wanting the same for disk size, but unfortunately in that case disk autoscaling is either on or off, there is no min/max.
-
Sunil Aggarwal commented
Seems like this is still not resolved. Raised an issue (https://github.com/mongodb/mongodb-atlas-kubernetes/issues/777) around it.
Also, we would like to understand where these features are documented? Don't see any mention of this operator behaviour in the Operator's documentation.