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

feat: init-container when using dynamic persistence #82

Merged
merged 2 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 7 additions & 2 deletions Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: n8n
version: 0.22.0
version: 0.23.0
appVersion: 1.30.0
type: application

Expand Down Expand Up @@ -33,4 +33,9 @@ annotations:
description: "Apply Security Context to all Pods"
links:
- name: "Related GitHub Issue"
Karitham marked this conversation as resolved.
Show resolved Hide resolved
url: https://github.com/8gears/n8n-helm-chart/issues/71
url: https://github.com/8gears/n8n-helm-chart/issues/71
- kind: fixed
description: "Fixed issue with dynamic volumes not having the correct directories laid out"
links:
- name: "Related GitHub Issue"
url: https://github.com/8gears/n8n-helm-chart/issues/71
12 changes: 11 additions & 1 deletion templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,20 @@ spec:
serviceAccountName: {{ include "n8n.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.initContainers }}
{{- if or .Values.initContainers (and .Values.persistence.enabled (eq .Values.persistence.type "dynamic")) }}
initContainers:
{{- if and .Values.persistence.enabled (eq .Values.persistence.type "dynamic") }}
- name: init-data-dir
image: busybox:1.31.1
Karitham marked this conversation as resolved.
Show resolved Hide resolved
command: ["/bin/sh", "-c", "mkdir -p /home/node/.n8n/"]
volumeMounts:
- name: data
mountPath: /home/node/.n8n
{{- end }}
{{- if .Values.initContainers }}
{{ tpl (toYaml .Values.initContainers) . | nindent 8 }}
{{- end }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{- with .Values.command }}
Expand Down