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

setting autoscaling.enabled to true disables the workers replicas #87

Open
maozza opened this issue May 16, 2024 · 4 comments · May be fixed by #112
Open

setting autoscaling.enabled to true disables the workers replicas #87

maozza opened this issue May 16, 2024 · 4 comments · May be fixed by #112

Comments

@maozza
Copy link

maozza commented May 16, 2024

I may be missing something but when setting autoscaling.enabled to true the replicas count is not been configured

Source: https://github.com/8gears/n8n-helm-chart/blob/master/templates/deployment.worker.yaml

  {{- if not .Values.autoscaling.enabled }}
  replicas: {{ .Values.scaling.worker.count }}
  {{- end }}

The same issue with webhook deployment

@Vad1mo
Copy link
Member

Vad1mo commented May 16, 2024

What's your config? Did you check the indentation?

@maozza
Copy link
Author

maozza commented May 17, 2024

Here is my config (values.yaml)
Setting up autoscaling for the main n8n pod, disable the replicas for the webhook and worker.
Is the if statement in line 9 in /templates/deployment.worker.yaml and in /templates/deployment.webhooks.yaml is a mistake?

autoscaling:
  enabled: true
  minReplicas: 2
  maxReplicas: 3
  targetCPUUtilizationPercentage: 80
  # targetMemoryUtilizationPercentage: 80


scaling:
  enabled: true
  worker:
    count: 10
    concurrency: 50
  # With .Values.scaling.webhook.enabled=true you disable Webhooks from the main process but you enable the processing on a different Webhook instance.
  # See https://github.com/8gears/n8n-helm-chart/issues/39#issuecomment-1579991754 for the full explanation.
  webhook:
    enabled: true
    count: 3

@mhkarimi1383
Copy link

mhkarimi1383 commented Aug 3, 2024

@Vad1mo

there is a problem in template of hpa that makes hpa to target only the main deployment

also

  {{- if not .Values.autoscaling.enabled }}
  replicas: {{ .Values.scaling.worker.count }}
  {{- end }}

makes it to omit the count value, I think we have to have something like
scaling.worker.autoscaling or workerAutoscaling in values (for both worker and webhook)

mhkarimi1383 added a commit to mhkarimi1383/n8n-helm-chart that referenced this issue Aug 5, 2024
closes 8gears#80, closes 8gears#87

Signed-off-by: Muhammed Hussein Karimi <[email protected]>
@mhkarimi1383 mhkarimi1383 linked a pull request Aug 5, 2024 that will close this issue
@mhkarimi1383
Copy link

Hi
@maozza
Fixed in #112, You can test that to see if it could help

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 a pull request may close this issue.

3 participants