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

Add support for "existing secrets" #41

Merged
merged 2 commits into from
Jun 29, 2023
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ config: # Dict with all n8n config options
# postgresdb:
# database: n8n
# host: localhost
#
# existingSecret: "" # Use an existing Kubernetes secret, e.g created by hand or Vault operator.
gmemstr marked this conversation as resolved.
Show resolved Hide resolved
secret: # Dict with all n8n config options, unlike config the values here will end up in a secret.
# database:
# postgresdb:
Expand Down
6 changes: 3 additions & 3 deletions templates/deployment.webhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ spec:
configMap:
name: {{ include "n8n.fullname" . }}
{{- end }}
{{- if .Values.secret }}
{{- if or (.Values.secret) (.Values.existingSecret) }}
- name: secret-volume
secret:
secretName: {{ include "n8n.fullname" . }}
secretName: {{ if .Values.existingSecret }}{{ .Values.existingSecret }}{{ else }}{{ include "n8n.fullname" . }}{{ end }}
items:
- key: "secret.json"
path: "secret.json"
{{- end }}
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions templates/deployment.worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ spec:
configMap:
name: {{ include "n8n.fullname" . }}
{{- end }}
{{- if .Values.secret }}
{{- if or (.Values.secret) (.Values.existingSecret) }}
- name: secret-volume
secret:
secretName: {{ include "n8n.fullname" . }}
secretName: {{ if .Values.existingSecret }}{{ .Values.existingSecret }}{{ else }}{{ include "n8n.fullname" . }}{{ end }}
items:
- key: "secret.json"
path: "secret.json"
{{- end }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ spec:
configMap:
name: {{ include "n8n.fullname" . }}
{{- end }}
{{- if .Values.secret }}
{{- if or (.Values.secret) (.Values.existingSecret) }}
- name: secret-volume
secret:
secretName: {{ include "n8n.fullname" . }}
secretName: {{ if .Values.existingSecret }}{{ .Values.existingSecret }}{{ else }}{{ include "n8n.fullname" . }}{{ end }}
items:
- key: "secret.json"
path: "secret.json"
Expand Down
2 changes: 1 addition & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ config:
pruneData: "true" # prune executions by default
pruneDataMaxAge: 3760 # Per defaut we store 1 year of history

# 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.

# Typical Example of a config in combination with a secret.
Expand Down