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

ci(lint): lint and test helm chart #103

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/conventional-commits-check.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Conventional Commits Check

on:
pull_request:
branches: [ master ]
on: pull_request

jobs:
check-conventional-commits:
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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 }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

TartanLeGrand marked this conversation as resolved.
Show resolved Hide resolved
- 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 }}
15 changes: 0 additions & 15 deletions .github/workflows/lint.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions Chart.lock

This file was deleted.

6 changes: 6 additions & 0 deletions charts/n8n/Chart.lock
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 4 additions & 2 deletions Chart.yaml β†’ charts/n8n/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ sources:
- https://github.com/n8n-io/n8n
- https://n8n.io/
maintainers:
- name: 8gears AG
- name: 8gears
email: contact@8gears.com
- name: n8n Community
url: https://github.com/8gears
- name: n8n
email: _@8gears.com
url: https://github.com/n8n-io

dependencies:
- name: redis
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
60 changes: 30 additions & 30 deletions values.yaml β†’ charts/n8n/values.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
TartanLeGrand marked this conversation as resolved.
Show resolved Hide resolved
# 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
Expand All @@ -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

Expand All @@ -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: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
Expand Down Expand Up @@ -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%"
Expand Down Expand Up @@ -184,7 +185,6 @@ podAnnotations: {}

podLabels: {}

#
podSecurityContext:
runAsNonRoot: true
runAsUser: 1000
Expand All @@ -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"]
Expand All @@ -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
Expand Down Expand Up @@ -290,8 +290,8 @@ resources:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
# cpu: 100m
# memory: 128Mi

autoscaling:
enabled: false
Expand Down
Binary file removed charts/redis-17.2.0.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repositories:
releases:
- name: n8n
namespace: {{ .Values.namespace }}
chart: .
chart: ./charts/n8n
values:
- n8n:
encryption_key: {{ .Values.encryption_key }}
Expand Down
Loading