diff --git a/.github/workflows/conventional-commits-check.yaml b/.github/workflows/conventional-commits-check.yaml index 5d4a8d7..ab0152d 100644 --- a/.github/workflows/conventional-commits-check.yaml +++ b/.github/workflows/conventional-commits-check.yaml @@ -1,8 +1,6 @@ name: Conventional Commits Check -on: - pull_request: - branches: [ master ] +on: pull_request jobs: check-conventional-commits: diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml new file mode 100644 index 0000000..49b0f56 --- /dev/null +++ b/.github/workflows/lint-test.yaml @@ -0,0 +1,51 @@ +name: Lint and Test Charts + +on: pull_request + +jobs: + lint-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v4.2.0 + with: + version: v3.14.4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + check-latest: true + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.6.1 + + - name: Add Helm Repositories + run: | + helm repo add bitnami https://charts.bitnami.com/bitnami + helm repo update + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + echo "changed=$changed" + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + fi + + - name: Run chart-testing (lint) + if: steps.list-changed.outputs.changed == 'true' + run: ct lint --target-branch ${{ github.event.repository.default_branch }} + + - name: Create kind cluster + if: steps.list-changed.outputs.changed == 'true' + uses: helm/kind-action@v1.10.0 + + - name: Run chart-testing (install) + if: steps.list-changed.outputs.changed == 'true' + run: ct install --target-branch ${{ github.event.repository.default_branch }} \ No newline at end of file diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml deleted file mode 100644 index 0c03318..0000000 --- a/.github/workflows/lint.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: Lint and Test Charts - -on: pull_request - -jobs: - lint-charts: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: "0" - - name: Lint n8n Chart - uses: WyriHaximus/github-action-helm3@v4 - with: - exec: helm lint . diff --git a/Chart.lock b/Chart.lock deleted file mode 100644 index 09104cb..0000000 --- a/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: redis - repository: https://charts.bitnami.com/bitnami - version: 17.2.0 -digest: sha256:989a8e3f05d54b04db15e782bd24ca5a5872a36f5dc02b7882b25491a5a5ddde -generated: "2022-09-30T08:49:11.0457529+02:00" diff --git a/charts/n8n/Chart.lock b/charts/n8n/Chart.lock new file mode 100644 index 0000000..1ddcb6f --- /dev/null +++ b/charts/n8n/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: redis + repository: https://charts.bitnami.com/bitnami + version: 18.6.1 +digest: sha256:679512a5d6167cd529b9b6d861a6605f62683c3497b8f920fc344dd00bf0ba82 +generated: "2024-06-30T21:39:40.024252056+02:00" diff --git a/Chart.yaml b/charts/n8n/Chart.yaml similarity index 92% rename from Chart.yaml rename to charts/n8n/Chart.yaml index b9f5d91..9418697 100644 --- a/Chart.yaml +++ b/charts/n8n/Chart.yaml @@ -18,10 +18,12 @@ sources: - https://github.com/n8n-io/n8n - https://n8n.io/ maintainers: - - name: 8gears AG + - name: 8gears email: contact@8gears.com + url: https://github.com/8gears - name: n8n Community email: _@8gears.com + url: https://github.com/n8n-io dependencies: - name: redis diff --git a/templates/NOTES.txt b/charts/n8n/templates/NOTES.txt similarity index 100% rename from templates/NOTES.txt rename to charts/n8n/templates/NOTES.txt diff --git a/templates/_helpers.tpl b/charts/n8n/templates/_helpers.tpl similarity index 100% rename from templates/_helpers.tpl rename to charts/n8n/templates/_helpers.tpl diff --git a/templates/configmap.yaml b/charts/n8n/templates/configmap.yaml similarity index 100% rename from templates/configmap.yaml rename to charts/n8n/templates/configmap.yaml diff --git a/templates/deployment.webhooks.yaml b/charts/n8n/templates/deployment.webhooks.yaml similarity index 100% rename from templates/deployment.webhooks.yaml rename to charts/n8n/templates/deployment.webhooks.yaml diff --git a/templates/deployment.worker.yaml b/charts/n8n/templates/deployment.worker.yaml similarity index 100% rename from templates/deployment.worker.yaml rename to charts/n8n/templates/deployment.worker.yaml diff --git a/templates/deployment.yaml b/charts/n8n/templates/deployment.yaml similarity index 100% rename from templates/deployment.yaml rename to charts/n8n/templates/deployment.yaml diff --git a/templates/hpa.yaml b/charts/n8n/templates/hpa.yaml similarity index 100% rename from templates/hpa.yaml rename to charts/n8n/templates/hpa.yaml diff --git a/templates/ingress.yaml b/charts/n8n/templates/ingress.yaml similarity index 100% rename from templates/ingress.yaml rename to charts/n8n/templates/ingress.yaml diff --git a/templates/pvc.yaml b/charts/n8n/templates/pvc.yaml similarity index 100% rename from templates/pvc.yaml rename to charts/n8n/templates/pvc.yaml diff --git a/templates/secret.yaml b/charts/n8n/templates/secret.yaml similarity index 100% rename from templates/secret.yaml rename to charts/n8n/templates/secret.yaml diff --git a/templates/service.webhooks.yaml b/charts/n8n/templates/service.webhooks.yaml similarity index 100% rename from templates/service.webhooks.yaml rename to charts/n8n/templates/service.webhooks.yaml diff --git a/templates/service.yaml b/charts/n8n/templates/service.yaml similarity index 100% rename from templates/service.yaml rename to charts/n8n/templates/service.yaml diff --git a/templates/serviceaccount.yaml b/charts/n8n/templates/serviceaccount.yaml similarity index 100% rename from templates/serviceaccount.yaml rename to charts/n8n/templates/serviceaccount.yaml diff --git a/templates/tests/test-connection.yaml b/charts/n8n/templates/tests/test-connection.yaml similarity index 100% rename from templates/tests/test-connection.yaml rename to charts/n8n/templates/tests/test-connection.yaml diff --git a/values.yaml b/charts/n8n/values.yaml similarity index 88% rename from values.yaml rename to charts/n8n/values.yaml index 2f6e800..2e3bd12 100644 --- a/values.yaml +++ b/charts/n8n/values.yaml @@ -1,17 +1,21 @@ # Default helm values for n8n. # Default values within the n8n application can be found under https://github.com/n8n-io/n8n/blob/master/packages/cli/src/config/index.ts n8n: - encryption_key: # if not specified n8n on first launch creates a random encryption key for encrypting saved credentials and saves it in the ~/.n8n folder + # if not specified n8n on first launch creates a random encryption key for encrypting saved credentials and saves it in the ~/.n8n folder + encryption_key: defaults: config: executions: - pruneData: "true" # prune executions by default - pruneDataMaxAge: 3760 # Per default we store 1 year of history + # prune executions by default + pruneData: "true" + # Per default we store 1 year of history + pruneDataMaxAge: 3760 # existingSecret and secret are exclusive, with existingSecret taking priority. # existingSecret: "" # Use an existing Kubernetes secret, e.g created by hand or Vault operator. -secret: # Dict with all n8n json config options, unlike config the values here will end up in a secret. +# Dict with all n8n json config options, unlike config the values here will end up in a secret. +secret: # Typical Example of a config in combination with a secret. # config: @@ -26,7 +30,7 @@ secret: # Dict with all n8n json config options, unlike config the values here w ## ALL possible n8n Values -#database: +# database: # type: # Type of database to use - Other possible types ['sqlite', 'mariadb', 'mysqldb', 'postgresdb'] - default: sqlite # tablePrefix: # Prefix for table names - default: '' # postgresdb: @@ -47,12 +51,12 @@ secret: # Dict with all n8n json config options, unlike config the values here w # password: # MySQL Password - default: '' # port: # MySQL Port - default: 3306 # user: # MySQL User - default: root -#credentials: +# credentials: # overwrite: # data: # Overwrites for credentials - default: "{}" # endpoint: # Fetch credentials from API - default: '' # -#executions: +# executions: # process: # In what process workflows should be executed - possible values [main, own] - default: own # timeout: # Max run time (seconds) before stopping the workflow execution - default: -1 # maxTimeout: # Max execution time (seconds) that can be set for a workflow individually - default: 3600 @@ -62,16 +66,16 @@ secret: # Dict with all n8n json config options, unlike config the values here w # pruneData: # Delete data of past executions on a rolling basis - default: false # pruneDataMaxAge: # How old (hours) the execution data has to be to get deleted - default: 336 # pruneDataTimeout: # Timeout (seconds) after execution data has been pruned - default: 3600 -#generic: +# generic: # timezone: # The timezone to use - default: America/New_York -#path: # Path n8n is deployed to - default: "/" -#host: # Host name n8n can be reached - default: localhost -#port: # HTTP port n8n can be reached - default: 5678 -#listen_address: # IP address n8n should listen on - default: 0.0.0.0 -#protocol: # HTTP Protocol via which n8n can be reached - possible values [http , https] - default: http -#ssl_key: # SSL Key for HTTPS Protocol - default: '' -#ssl_cert: # SSL Cert for HTTPS Protocol - default: '' -#security: +# path: # Path n8n is deployed to - default: "/" +# host: # Host name n8n can be reached - default: localhost +# port: # HTTP port n8n can be reached - default: 5678 +# listen_address: # IP address n8n should listen on - default: 0.0.0.0 +# protocol: # HTTP Protocol via which n8n can be reached - possible values [http , https] - default: http +# ssl_key: # SSL Key for HTTPS Protocol - default: '' +# ssl_cert: # SSL Cert for HTTPS Protocol - default: '' +# security: # excludeEndpoints: # Additional endpoints to exclude auth checks. Multiple endpoints can be separated by colon - default: '' # basicAuth: # active: # If basic auth should be activated for editor and REST-API - default: false @@ -87,13 +91,13 @@ secret: # Dict with all n8n json config options, unlike config the values here w # jwtNamespace: # JWT namespace to expect (optional) - default: '' # jwtAllowedTenantKey: # JWT tenant key name to inspect within JWT namespace (optional) - default: '' # jwtAllowedTenant: # JWT tenant to allow (optional) - default: '' -#endpoints: +# endpoints: # rest: # Path for rest endpoint default: rest # webhook: # Path for webhook endpoint default: webhook # webhookTest: # Path for test-webhook endpoint default: webhook-test # webhookWaiting: # Path for waiting-webhook endpoint default: webhook-waiting -#externalHookFiles: # Files containing external hooks. Multiple files can be separated by colon - default: '' -#nodes: +# externalHookFiles: # Files containing external hooks. Multiple files can be separated by colon - default: '' +# nodes: # exclude: # Nodes not to load - default: "[]" # errorTriggerType: # Node Type to use as Error Trigger - default: n8n-nodes-base.errorTrigger @@ -112,16 +116,13 @@ extraEnvSecrets: {} # name: postgres-user-auth # key: password -## -## -## -## ## Common Kubernetes Config Settings persistence: ## If true, use a Persistent Volume Claim, If false, use emptyDir ## enabled: false - type: emptyDir # what type volume, possible options are [existing, emptyDir, dynamic] dynamic for Dynamic Volume Provisioning, existing for using an existing Claim + # what type volume, possible options are [existing, emptyDir, dynamic] dynamic for Dynamic Volume Provisioning, existing for using an existing Claim + type: emptyDir ## Persistent Volume Storage Class ## If defined, storageClassName: ## If set to "-", storageClassName: "", which disables dynamic provisioning @@ -153,7 +154,7 @@ replicaCount: 1 # here you can specify the deployment strategy as Recreate or RollingUpdate with optional maxSurge and maxUnavailable # If theses options are not set, default values are 25% -#deploymentStrategy: +# deploymentStrategy: # type: RollingUpdate # maxSurge: "50%" # maxUnavailable: "50%" @@ -184,7 +185,6 @@ podAnnotations: {} podLabels: {} -# podSecurityContext: runAsNonRoot: true runAsUser: 1000 @@ -206,7 +206,7 @@ lifecycle: {} # here's the sample configuration to add mysql-client to the container -#lifecycle: +# lifecycle: # postStart: # exec: # command: ["/bin/sh", "-c", "apk add mysql-client"] @@ -217,7 +217,7 @@ lifecycle: command: [] # sample configuration that overrides starting script and solves above issue (also it runs n8n as root, so be careful): -#command: +# command: # - tini # - -- # - /bin/sh @@ -290,8 +290,8 @@ resources: # cpu: 100m # memory: 128Mi # requests: -# cpu: 100m -# memory: 128Mi + # cpu: 100m + # memory: 128Mi autoscaling: enabled: false diff --git a/charts/redis-17.2.0.tgz b/charts/redis-17.2.0.tgz deleted file mode 100644 index 20075b9..0000000 Binary files a/charts/redis-17.2.0.tgz and /dev/null differ diff --git a/helmfile.yaml b/helmfile.yaml index 591f3e0..d2cfacf 100644 --- a/helmfile.yaml +++ b/helmfile.yaml @@ -18,7 +18,7 @@ repositories: releases: - name: n8n namespace: {{ .Values.namespace }} - chart: . + chart: ./charts/n8n values: - n8n: encryption_key: {{ .Values.encryption_key }}