-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DREIMP-10951: Autoscale VitessCell pods with HPA #3938
Conversation
7cbbb00
to
93b1efa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo, the autoscaling for vitess seems different enough that it's probably more maintainable to have a separate script that we use to configure HPAs rather than mix it into the existing code for long-running services
cluster: str, | ||
kube_client: KubeClient, | ||
namespace: str, | ||
) -> Optional[V2beta2HorizontalPodAutoscaler]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo, the autoscaling for vitess seems different enough that it's probably more maintainable to have a separate script that we use to configure HPAs rather than mix it into the existing code for long-running services
@nemacysts I added this method override to avoid using the existing one in KubernetesDeploymentConfig.
Afaiu, atm the HPA for the deployments created by VitessCell look like a regular HPA that uses CPU metrics... but I guess we'd like to separate autoscaling deployments created by CRs vs otherwise in general and in case they diverge in the future? so I copied the code from KubernetesDeploymentConfig to this class.
Problem
We'd like to autoscale the vtgate deployments created by the vitess-operator for each VitessCell.
Solution
Create an HPA for each VitessCell, where max_instances is set.
This PR should be merged after #3940
Context
http://y/DREIMP-10951