From 9081b3f6e552e915f2ee072c6973a12943ecba20 Mon Sep 17 00:00:00 2001 From: Vadim Bauer <1492007+Vad1mo@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:17:42 +0100 Subject: [PATCH] Only OCI add PRs --- .gitignore | 3 +- Chart.yaml | 38 +++------------- README.md | 100 +++++++++++++++++++++++++++---------------- artifacthub-repo.yml | 15 +++++++ 4 files changed, 85 insertions(+), 71 deletions(-) create mode 100644 artifacthub-repo.yml diff --git a/.gitignore b/.gitignore index 7f3d7d7..17d506d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /values.*.yaml commands.sh -yamls \ No newline at end of file +yamls +*.tgz diff --git a/Chart.yaml b/Chart.yaml index d910f5e..828904d 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: n8n -version: 0.20.0 +version: 0.20.1 appVersion: 1.22.3 type: application @@ -25,40 +25,12 @@ dependencies: version: 18.6.1 repository: https://charts.bitnami.com/bitnami condition: redis.enabled - annotations: artifacthub.io/changes: | - - kind: added - description: "typo + WEBHOOK_URL fix. Added missing ingress routes for webhooks-. Parametric RollingUpdate, update image to 1.22.3 " - links: - - name: "GitHub PR #59 - typo + WEBHOOK_URL fix" - url: https://github.com/8gears/n8n-helm-chart/pull/59 - - name: "GitHub PR #60 - added missing ingress routes for webhooks" - url: https://github.com/8gears/n8n-helm-chart/pull/60 - - name: "GitHub PR #61 - Parametric RollingUpdate" - url: https://github.com/8gears/n8n-helm-chart/pull/61 - - kind: changed - description: "Using now latest Redis 18.6.1" - - kind: added - description: "Chart 0.13.0 adds support for app version 1.7.1" - - kind: changed - description: "Correctly perform semantic version comparison" - links: - - name: "GitHub PR" - url: https://github.com/8gears/n8n-helm-chart/pull/54 - - kind: changed - description: "Fixed secret volume mnt for existing secret" - links: - - name: "GitHub PR" - url: https://github.com/8gears/n8n-helm-chart/pull/51 - kind: changed - description: "Updated App Version to 1.5.1" - - kind: added - description: "Added support for specifying initContainers and probes" + description: "We now ship this Chart as OCI only, no ChartMuseum Support anymore." - kind: changed - description: "Updated App Version to 0.236.3" - - kind: added - description: "Support Kubernetes 1.25" + description: "When using existingSecret the path to the file was not added to n8n.configFiles in the helpers." links: - - name: "GitHub PR" - url: https://github.com/8gears/n8n-helm-chart/pull/46 + - name: "PR #63" + url: https://github.com/8gears/n8n-helm-chart/pull/63 diff --git a/README.md b/README.md index 5f6d586..38cd42c 100644 --- a/README.md +++ b/README.md @@ -2,39 +2,57 @@ [n8n](https://github.com/n8n-io/n8n) is an extendable workflow automation tool. -[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/open-8gears)](https://artifacthub.io/packages/search?repo=open-8gears) +[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/n8n)](https://artifacthub.io/packages/helm/open-8gears/n8n) -The Helm chart source code location is [github.com/8gears/n8n-helm-chart](https://github.com/8gears/n8n-helm-chart) +The Helm chart source code location +is [github.com/8gears/n8n-helm-chart](https://github.com/8gears/n8n-helm-chart) + + +> [!IMPORTANT] +> Starting Jan 2024, we serve Charts only as OCI artifacts. ## Requirements -Before you start make sure you have the following dependencies ready and working: +Before you start, make sure you have the following tools ready: -- Helm > 3 +- Helm >= 3.8 - Postgres DB | MySQL | Embedded SQLite - Helmfile (Optional) ## Configuration -The `values.yaml` file is divided into a n8n specific configuration section, and a Kubernetes deployment-specific section. +The `values.yaml` file is divided into a n8n specific configuration section, and +a Kubernetes deployment-specific section. -The shown values represent Helm Chart defaults, not the application defaults. -In many cases, the Helm Chart defaults are empty. The comments behind the values provide a description and display the application default. +The shown values represent Helm Chart defaults, not the application defaults. +In many cases, the Helm Chart defaults are empty. +The comments behind the values provide a description and display the application +default. -These n8n config options should be attached below the root elements `secret:` or `config:` in the `values.yaml`. ( See the [typical-values-example](#typical-values-example) section). +These n8n config options should be attached below the root elements `secret:` +or `config:` in the `values.yaml`. +(See the [typical-values-example](#typical-values-example) section). -You decide what should go into `secret` and what should be a `config`. -There is no restriction, mix and match as you like. +You decide what should go into `secret` and what should be a `config`. +There is no restriction, mix and match as you like. +# Installation +Install chart -# N8N Specific Config Section +```shell +helm install my-n8n oci://8gears.container-registry.com/library/n8n --version 0.20.0 +``` -Every possible n8n config value can be set, even if it is now displayed in the excerpt below. -All application config settings are described in the: [n8n configuration options](https://github.com/n8n-io/n8n/blob/master/packages/cli/src/config/schema.ts). -Use n8n config as the source of truth, this Charts just forwards everything to the n8n. +# N8N Specific Config Section +Every possible n8n config value can be set, +even if it is now mentioned in the excerpt below. +All application config settings are described in the: +[n8n configuration options](https://github.com/n8n-io/n8n/blob/master/packages/cli/src/config/schema.ts). +Treat the n8n provided config documentation as the source of truth, +this Charts just forwards everything to the n8n. ```yaml database: @@ -110,9 +128,10 @@ nodes: # the list goes on... ``` - ### Values -The values file consists of n8n specific sections `config` and `secret` where you paste the n8n config like shown above. + +The values file consists of n8n specific sections `config` and `secret` where +you paste the n8n config like shown above. ```yaml # The n8n related part of the config @@ -166,7 +185,7 @@ persistence: # existingClaim: # Set additional environment variables on the Deployment -extraEnv: {} +extraEnv: { } # Set this if running behind a reverse proxy and the external port is different from the port n8n runs on # WEBHOOK_TUNNEL_URL: "https://n8n.myhost.com/ @@ -199,7 +218,7 @@ podSecurityContext: { } securityContext: { } # capabilities: # drop: - # - ALL +# - ALL # readOnlyRootFilesystem: true # runAsNonRoot: true # runAsUser: 1000 @@ -207,7 +226,7 @@ securityContext: { } service: type: ClusterIP port: 80 - annotations: {} + annotations: { } ingress: enabled: false @@ -229,7 +248,7 @@ resources: { } # lines, adjust them as necessary, and remove the curly braces after 'resources:'. # limits: # cpu: 100m - # memory: 128Mi +# memory: 128Mi # requests: # cpu: 100m # memory: 128Mi @@ -249,7 +268,7 @@ affinity: { } scaling: enabled: false - + worker: count: 2 concurrency: 2 @@ -259,7 +278,7 @@ scaling: count: 1 redis: - host: + host: password: redis: @@ -268,8 +287,8 @@ redis: ``` # Typical Values Example -A typical example of a config in combination with a secret. +A typical example of a config in combination with a secret. ```yaml # values.yaml @@ -285,6 +304,7 @@ secret: password: 'big secret' ``` + ## Setup ```shell @@ -293,22 +313,28 @@ helm install -f values.yaml -n n8n deploymentname n8n ## Scaling -n8n provides a **queue-mode**, where the workload is shared between multiple instances of same n8n installation. -This provide a shared load over multiple instances and a limited high availability, because the controller instance remain as Single-Point-Of-Failure. +n8n provides a **queue-mode**, where the workload is shared between multiple +instances of same n8n installation. +This provides a shared load over multiple instances and a limited high +availability, because the controller instance remains as Single-Point-Of-Failure. -With the help of an internal/external redis server and by using the excellent BullMQ, the tasks can be shared over different instances, which also can run on different hosts. +With the help of an internal/external redis server and by using the excellent +BullMQ, the tasks can be shared over different instances, which also can run on +different hosts. [See docs about this Queue-Mode](https://docs.n8n.io/hosting/scaling/queue-mode/) -To enable this mode within this helm chart, you simply should set `scaling.enable` to true. -This chart is configured to spawn by default 2 worker instances. +To enable this mode within this helm chart, you simply should +set `scaling.enable` to true. +This chart is configured to spawn two worker instances. ```yaml scaling: enabled: true ``` -You can define to spawn more worker, by set scaling.worker.count to a higher number. +You can define to spawn more workers, by set scaling.worker.count to a higher +number. Also, it is possible to define your own external redis server. ```yaml @@ -319,19 +345,19 @@ scaling: password: "redis-password-if-set" ``` -If you want to use the internal redis server, set `redis.enable = true`. By default, no redis server is spawned. +If you want to use the internal redis server, set `redis.enable = true`. By +default, no redis server is spawned. -At last scaling option is it possible to create dedicated webhook instances, which only process the webhooks. -If you set `scaling.webhook.enabled=true`, then webhook processing on main instance is disabled and by default a single webhook instance is started. +At last scaling option is it possible to create dedicated webhook instances, +which only process the webhooks. +If you set `scaling.webhook.enabled=true`, then webhook processing on the main +instance is disabled and by default a single webhook instance is started. ## Chart Deployment - ```shell - helm package . -helm repo add --username='robot$helmcli' --password="$PASSWD" open-8gears https://8gears.container-registry.com/chartrepo/library -helm push --username='robot$helmcli' --password="$PASSWD" . open-8gears - +helm registry login -u $USER 8gears.container-registry.com +helm push n8n-0.20.1.tgz oci://8gears.container-registry.com/library/n8n ``` diff --git a/artifacthub-repo.yml b/artifacthub-repo.yml new file mode 100644 index 0000000..caed787 --- /dev/null +++ b/artifacthub-repo.yml @@ -0,0 +1,15 @@ +# Artifact Hub repository metadata file +# +# Some settings like the verified publisher flag or the ignored packages won't +# be applied until the next time the repository is processed. Please keep in +# mind that the repository won't be processed if it has not changed since the +# last time it was processed. Depending on the repository kind, this is checked +# in a different way. For Helm http based repositories, we consider it has +# changed if the `index.yaml` file changes. For git based repositories, it does +# when the hash of the last commit in the branch you set up changes. This does +# NOT apply to ownership claim operations, which are processed immediately. +# +repositoryID: b37cafa3-373b-42f7-8020-7a577030f0cd +owners: + - name: vad1mo + email: vad1mo@8gears.com