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

Support for autoscaling (HPA) #774

Open
jakub-dibala opened this issue Jul 12, 2024 · 4 comments
Open

Support for autoscaling (HPA) #774

jakub-dibala opened this issue Jul 12, 2024 · 4 comments

Comments

@jakub-dibala
Copy link

We need to autoscale the matching service. So I deployed HPA to cluster, but it does not work correctly.

When replicas is set on deployment spec, HPA will not work - as you can read here: https://stackoverflow.com/a/76548515. It interferes with replica set.

I tried to apply a override:

spec:
  services:
    matching:
      overrides:
        deployment:
          spec:
            replicas:

to delete a replica count on deployment, but helm warns me:
W0712 12:28:20.755105 2402442 warnings.go:70] unknown field "spec.services.matching.overrides.deployment.spec.replicas".
Even if I try to set an override to a specific number, it fails with this error.

Can you please guide me, how can I set autoscaling to a specific temporal service? Thanks.

@alexandrevilain
Copy link
Owner

Hi @jakub-dibala !

Thanks for reporting this issue.

I think that with current operator behavior, this is not feasible. But I think that it could be easily integrated with the controller.

The integration could be very basic at the first implementation, then we could think about managing HPA within the controller.

The first implementation could provide the following API:

spec:
  services:
    matching:
      autoscaling: {}

Setting autoscaling would make the controller bypass the replicas field on deployments.

Then the second implementation could provide a more complete API that would allow user to configure HPA behavior:

spec:
  services:
    matching:
      autoscaling:
        minReplicas: 1
        maxReplicas: 10
        metrics:
        - type: Resource
          resource:
            name: cpu
            target:
              type: Utilization
              averageUtilization: 50

WDYT ?

@jakub-dibala
Copy link
Author

Hi @alexandrevilain !

Thanks for your reply.

Proposed solutions looks awesome! We should be OK with just the first implementation (autoscaling: {}), so we can deploy own HPA. But complete API (setting HPA spec to temporal cluster spec) will be additional comfort for users.

If I had any experience in Go, I would send a PR, but I don't, sorry 😄

Do you have any estimate, how long this should take to implement and release? As I said, we are totally OK with the first proposed solution. We just need to omit the "replicas" field on deployment. I don't want to push, but I need some ETA to present to our team.

Thank you!

@jakub-dibala
Copy link
Author

jakub-dibala commented Aug 6, 2024

Hi @alexandrevilain :) please, do you have any idea, when this will be addressed? Thanks.

@alexandrevilain
Copy link
Owner

Sorry @jakub-dibala I can't provide any ETA as I'm maintaining this project in my free time.
Feel free to contribute.

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

No branches or pull requests

2 participants