Repository navigation
Keeping vm_memory_high_watermark in sync when a pod's memory limit changes outside the CR (in-place resize / VPA)
#2246
Replies: 1 comment 1 reply
|
I do not think you missed a Cluster Operator option here. With the current operator model, this pattern is outside the reconciliation boundary. The operator generates total_memory_available_override_value = removeHeadroom(.spec.resources.limits.memory)The StatefulSet template is also generated from the same CR field: the rabbitmq container gets So if PerfectScale/VPA mutates only the admitted Pod resources and never updates the I would treat the options like this:
I would avoid having two independent controllers mutate different halves of the same contract: one changing Pod limits and the RabbitMQ operator continuing to own the RabbitMQ memory config. Either move the resize into the CR, or explicitly own the runtime patch as a post-start reconciliation step. If this matches your setup, please mark the answer as solved. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I realize this is probably a very long shot and very much not easy to do, but maybe someone has run into a similar issue.
We use PerfectScale to automate our workload resources, which works on pod level - if it detects that a workload should have more memory, it will trigger a restart of the respective workload (in this case the
rabbitmq-serverStatefulSet), and then a mutating webhook changes the pod resources at admission time, without ever touching the StatefulSet itself.Problem:
total_memory_available_override_valuewhich is used to calculate the watermark is set by the operator based onspec.resources.limits.memoryof the CR, and then baked into a ConfigMap, so this will never move with the actual resources, and AFAIK cgroup awareness (which would solve this natively) still hasn't landed in RabbitMQ itself, so we can't run withouttotal_memory_available_override_valueeither.I can see a few ways to "solve" this (some external process to run
rabbitmqctl set_vm_memory_high_watermark <updated value>in each pod after start, some other mutating webhook that writes an environment variable), but they all feel very hacky.Any ideas? Any configuration options around this I may have missed?
All reactions