Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

siadat
Copy link
Member

@siadat siadat commented Aug 27, 2024

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

@siadat siadat changed the title Autoscale VitessCell pods with HPA DREIMP-10951: Autoscale VitessCell pods with HPA Aug 27, 2024
Copy link
Member

@nemacysts nemacysts left a 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

@siadat siadat requested a review from nemacysts August 29, 2024 11:41
cluster: str,
kube_client: KubeClient,
namespace: str,
) -> Optional[V2beta2HorizontalPodAutoscaler]:
Copy link
Member Author

@siadat siadat Aug 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants