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

[collector] Should be possible to use HPA when deploy mode is "statefulset" #1005

Closed
zehenrique opened this issue Jan 17, 2024 · 4 comments
Closed
Assignees
Labels
chart:collector Issue related to opentelemetry-collector helm chart enhancement New feature or request good first issue Good for newcomers

Comments

@zehenrique
Copy link
Contributor

zehenrique commented Jan 17, 2024

Currently, when otel collector is deployed as a "statefulset" the charts do not allow using HPA for autoscaling.
https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/templates/hpa.yaml#L1

It should be possible to use HPA when in "statefulset" mode, always having in consideration when and how to scale stateful collectors https://opentelemetry.io/docs/collector/scaling/#scaling-stateful-collectors

@TylerHelmuth TylerHelmuth added chart:collector Issue related to opentelemetry-collector helm chart enhancement New feature or request labels Jan 17, 2024
@TylerHelmuth
Copy link
Member

I agree that HPA can be made usable with Statefulset.

@TylerHelmuth TylerHelmuth added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 17, 2024
@husnialhamdani
Copy link
Member

husnialhamdani commented Jan 20, 2024

@TylerHelmuth
Can we re-use the existing hpa.yaml file and enable that HPA when the mode is Deployment/Statefulset?

I interested to work on this.

@TylerHelmuth
Copy link
Member

@husnialhamdani yes

@lindeskar
Copy link
Contributor

lindeskar commented Feb 1, 2024

This is great!
Thanks for implementing the change. I will render and apply the HPA from main while waiting for the next release.

BTW, maybe this comment should be updated?

# autoscaling is used only if deployment enabled

Edit:
I found an issue with spec.scaleTargetRef.kind in the HPA: #1024
PR for my fix: #1025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart:collector Issue related to opentelemetry-collector helm chart enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants