diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index cb2073a..51f1b85 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Helm uses: azure/setup-helm@v1 with: - version: v3.4.0 + version: v3.8.1 - uses: actions/setup-python@v2 with: @@ -23,20 +23,24 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.2.1 + - name: Add helm repos + run: | + helm repo add bitnami https://charts.bitnami.com/bitnami + - name: Run chart-testing (list-changed) id: list-changed run: | - changed=$(ct list-changed) + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --chart-dirs .) if [[ -n "$changed" ]]; then echo "::set-output name=changed::true" fi - name: Run chart-testing (lint) - run: ct lint + run: ct lint --target-branch ${{ github.event.repository.default_branch }} --chart-dirs . --validate-maintainers=false - name: Create kind cluster uses: helm/kind-action@v1.2.0 if: steps.list-changed.outputs.changed == 'true' - name: Run chart-testing (install) - run: ct install + run: ct install --target-branch ${{ github.event.repository.default_branch }} --chart-dirs . \ No newline at end of file diff --git a/n8n/Chart.yaml b/n8n/Chart.yaml index a6cd025..2914d43 100644 --- a/n8n/Chart.yaml +++ b/n8n/Chart.yaml @@ -3,23 +3,23 @@ name: n8n description: A Helm chart for n8n.io dependencies: -- name: redis - version: "15.x.x" - repository: "https://charts.bitnami.com/bitnami" + - name: redis + version: "15.x.x" + repository: "https://charts.bitnami.com/bitnami" -- name: postgresql - version: "11.x" - repository: "https://charts.bitnami.com/bitnami" + - name: postgresql + version: "11.x" + repository: "https://charts.bitnami.com/bitnami" type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.0 +version: 0.2.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.145.0" +appVersion: "0.203.0" diff --git a/n8n/templates/configmap.yaml b/n8n/templates/configmap.yaml index 6b11706..a23da73 100644 --- a/n8n/templates/configmap.yaml +++ b/n8n/templates/configmap.yaml @@ -3,15 +3,22 @@ apiVersion: v1 metadata: name: {{ include "n8n.fullname" . }} data: - {{ if .Values.postgresql.enabled }}DB_TYPE: "postgresdb" {{ end }} + {{ if .Values.postgresql.enabled }} + DB_TYPE: "postgresdb" DB_POSTGRESDB_HOST: {{ include "n8n.fullname" . }}-postgresql - DB_POSTGRESDB_USER: {{ .Values.postgresql.postgresqlUsername }} - DB_POSTGRESDB_DATABASE: {{ .Values.postgresql.postgresqlDatabase }} - DB_POSTGRESDB_PASSWORD: {{ .Values.postgresql.postgresqlPassword }} + DB_POSTGRESDB_USER: {{ .Values.postgresql.auth.username }} + DB_POSTGRESDB_DATABASE: {{ .Values.postgresql.auth.database }} + DB_POSTGRESDB_PASSWORD: {{ .Values.postgresql.auth.password }} + {{ end }} + + N8N_METRICS: "true" + N8N_METRICS_PREFIX: "n8n_" QUEUE_BULL_REDIS_HOST: {{ include "n8n.fullname" . }}-redis-headless QUEUE_BULL_REDIS_PORT: "6379" QUEUE_BULL_REDIS_DB: "0" + QUEUE_HEALTH_CHECK_ACTIVE: "true" + QUEUE_HEALTH_CHECK_PORT: "5679" {{ if .Values.n8n.auth.enabled }} N8N_BASIC_AUTH_ACTIVE: "true" @@ -27,4 +34,8 @@ data: N8N_SKIP_WEBHOOK_DEREGISTRATION_SHUTDOWN: "true" EXECUTIONS_DATA_PRUNE: {{ .Values.n8n.data.prune.enabled | quote}} - EXECUTIONS_DATA_MAX_AGE: {{ .Values.n8n.data.prune.max_age | quote }} \ No newline at end of file + EXECUTIONS_DATA_MAX_AGE: {{ .Values.n8n.data.prune.max_age | quote }} + + N8N_LOG_LEVEL: {{ .Values.n8n.log_level | default "debug" | quote }} + DB_LOGGING_ENABLED: {{ .Values.n8n.db_logging_enabled | default "true" | quote }} + DB_LOGGING_OPTIONS: {{ .Values.n8n.db_logging_options | default "all" | quote }} \ No newline at end of file diff --git a/n8n/templates/deployment.yaml b/n8n/templates/deployment.yaml index 441aa8a..ceef6d4 100644 --- a/n8n/templates/deployment.yaml +++ b/n8n/templates/deployment.yaml @@ -102,6 +102,18 @@ spec: - n8n args: - worker + ports: + - name: healthz + containerPort: 5679 + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: healthz + readinessProbe: + httpGet: + path: /healthz + port: healthz imagePullPolicy: {{ .Values.image.pullPolicy }} envFrom: - configMapRef: diff --git a/n8n/templates/tests/test-connection.yaml b/n8n/templates/tests/test-connection.yaml index 5dbe7df..1d34a97 100644 --- a/n8n/templates/tests/test-connection.yaml +++ b/n8n/templates/tests/test-connection.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Pod metadata: - name: "{{ include "n8n.fullname" . }}-test-connection" + name: "{{ include "n8n.fullname" . }}-test-main-connection" labels: {{- include "n8n.labels" . | nindent 4 }} annotations: @@ -11,5 +11,21 @@ spec: - name: wget image: busybox command: ['wget'] - args: ['{{ include "n8n.fullname" . }}:{{ .Values.service.port }}'] + args: ['http://{{ include "n8n.fullname" . }}-main:{{ .Values.service.port }}/healthz'] + restartPolicy: Never +--- +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "n8n.fullname" . }}-test-webhook-connection" + labels: + {{- include "n8n.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['http://{{ include "n8n.fullname" . }}-webhook:{{ .Values.service.port }}/healthz'] restartPolicy: Never diff --git a/n8n/values.yaml b/n8n/values.yaml index 087f2d8..8eabf29 100644 --- a/n8n/values.yaml +++ b/n8n/values.yaml @@ -25,9 +25,10 @@ redis: # values for N8N n8n: + log_level: "debug" timezone: "" webhook: - #TODO: use default serice url + # TODO: use default service url url: http://localhost auth: enabled: false @@ -42,9 +43,10 @@ n8n: # values for PostgreSql helm chart postgresql: enabled: true - postgresqlUsername: n8n - postgresqlDatabase: n8n - postgresqlPassword: "N8nPassW0r$" + auth: + database: "n8n" + username: "n8n" + password: "N8nPassW0r$" persistence: size: 1Gi