8gears / n8n-helm-chart

A Kubernetes Helm chart for n8n a Workflow Automation Tool. Easily automate tasks across different services.
https://artifacthub.io/packages/helm/open-8gears/n8n
Apache License 2.0
187 stars 97 forks source link

semverCompare when version is in place #53

Closed peterhadac closed 1 year ago

peterhadac commented 1 year ago

We are trying to use chart with automated pulling of newest version and images. We are fetching Chart and use helm template to gather images from templated chart. We are getting

helm template n8n n8n-0.12.1.tgz

Error: template: n8n/templates/deployment.yaml:73:31: executing "n8n/templates/deployment.yaml" at <semverCompare ">=1.0" .Values.image.tag>: error calling semverCompare: Invalid Semantic Version

Use --debug flag to render out invalid YAML

Is there possibility evaluate version after it was fetched ?

peterhadac commented 1 year ago

Maybe resolution is

mountPath: {{ if semverCompare ">=1.0.0" (.Values.image.tag | default .Chart.AppVersion) }}/home/node/.n8n{{ else }}/root/.n8n{{ end }}
rkosegi commented 1 year ago

There seems to be 2 issues here:

kplanz commented 1 year ago

1.0 is actually a valid semantic version expression. The problem is only the missing parenthesis, thanks for the PR!

Temporary fix for me was to specify the image tag manually.