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

Add dedicated Workers and Webhooks Instances #24

Merged
merged 15 commits into from
Jan 8, 2023
Merged

Conversation

swarnat
Copy link
Collaborator

@swarnat swarnat commented Sep 29, 2022

I currently play a little bit to integrate the scaling options of n8n into this helm chart.

I would be happy about users, who have the chance to test. Because my lack of experience with n8n maybe oversee something. But in my eyes a deployment to k8s don't make sense without decentralized workers/incoming webhooks and a little bit HA options

Other topics of this merge:

  • Updated n8n version to latest one. (Important: I got an error in n8n migration, when I update existing environment, so pay attention to this and backup database before update)
  • Modify Ingress for K8s 1.22+
  • Add podLabels to Deployment to allow definition of Network Policies

ToDo before Merge:

  • Cleanup Deployments and define helpers for general options
  • Update Redis Chart to latest version
  • Extend README

Any Feedback is welcome

@Vad1mo
Copy link
Member

Vad1mo commented Sep 29, 2022

Awesome, let me know when you are done, I'll test and merge!

@swarnat
Copy link
Collaborator Author

swarnat commented Oct 7, 2022

The latest commit finish my modification to add shared workloads. Last commit was to increase version to 0.196.0.
We did some internal testing of this scaling functions and don't get any problems.

An important topic was, that I was not able to upgrade from your helm chart to my one, because of a migration error in n8n itself. But because I started 7 days ago with n8n, I'm not sure, if the reason was my empty database. Maybe you, or somewhere, have a realworld database to check.

About the OCI Charts: I take single steps into the Kubernetes world. 😄 The only thing I'm currently know about OCI Charts is, they are a more general way to provide helm charts. (Maybe next-gen helm charts)

@swarnat swarnat changed the title Draft: Add dedicated Workers and Webhooks Instances Add dedicated Workers and Webhooks Instances Oct 7, 2022
@vaelant
Copy link

vaelant commented Jan 3, 2023

Tested this before the branch conflicts and it worked flawlessly, thanks for the work. Having a solid kubernetes HA nocode tool will make many people happy.

To save some time, here's a minimum set of values necessary for notes in case users want to test themselves.

Note: You'll need a postgreSQL instance setup ahead of time to connect:

n8n:
  encryption_key: <generate and replace with encryption string>

config:
  database:
    type: postgresdb
    postgresdb:
      database: n8n
      host: <postgresdb url>
      port: 5432
      user: <postgresdb user>

secret:
  database:
    postgresdb:
      password: <postgresdb password>


ingress:
  enabled: true
  hosts:
    - host: your.n8n.hostname
      paths:
       - /
  tls:
    - secretName: n8n-tls
      hosts:
        - your.n8n.hostname

autoscaling:
  enabled: true
  minReplicas: 1
  maxReplicas: 2
  targetCPUUtilizationPercentage: 80


scaling:
  enabled: true
  
  worker:
    count: 2
    concurrency: 2

  webhook:
    enabled: true
    count: 1

  redis:
    host: <redis host headless>
    password: <redis password>

redis:
  enabled: true
  global:
    redis:
      password: <redis password>
  architecture: standalone

  master:
    persistence:
      enabled: false
      existingClaim: ""
      size: 2Gi  

Thanks for tuning the chart, looking forward to merge.

@Vad1mo
Copy link
Member

Vad1mo commented Jan 3, 2023

Happy to hear, @swarnat can you resolve the issues and I'll merge your changes!

@swarnat
Copy link
Collaborator Author

swarnat commented Jan 4, 2023

Of course. I will solve it within next day

@swarnat
Copy link
Collaborator Author

swarnat commented Jan 8, 2023

Conflict is solved and directly updated to latest version
Update is quickly tested in our environment.
We are using this "HA" setup since october and do not get any issues.

@Vad1mo Vad1mo merged commit 466e302 into 8gears:master Jan 8, 2023
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