-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
We have several operator deployments of 2 pods with one leader pod and one non-leader pod in our environment. The operator runs multiple controllers and therefore have high resource requests. Currently both the leader and non-leader pods have the same resource allocation since leader election is dynamic, the non-leader's resource allocation is wasted capacity since it is just waiting for leadership.
If VPA is configured for this deployment it will recommend resource usage based on both the leader and non-leader pods which may not be accurate. Is this assumption correct? If so, is there a way to use VPA for such a use case? With VPA support for in-place scaling expected to be stable soon this will be a good tool to make the resource allocation more efficient.
The operator pods need to be in the same deployment since there is a spread constraint defined on it to keep the pods in two different AZs. One workaround I thought of is to configure separate deployments for each pod and use pod antiaffinity to ensure they both don't land in the same AZ. But I wanted to ask this question here to see if there were better ways to support this. Thank you!