Home function "env" not defined
Reply: 0

function "env" not defined

user1012 Published in March 22, 2018, 9:20 pm

I'm pretty new to helm and go templates so please bear with me

I have a template called secrets.yaml:

apiVersion: v1
kind: Secret
  name: fooo-secrets
    app: {{ template "fooo.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
type: Opaque # TODO
  SUPER_SECRET: {{env SUPER_SECRET | quote }} <--- the problem line

I got env from sprig. The idea is that I can load up my secrets into my local environment and then deploy from there.

But when I lint my chart:

> helm lint fooo                                                   [13:29]
==> Linting fooo
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/: parse error in "drone_ci/templates/secrets.yaml": template: drone_ci/templates/secrets.yaml:12: function "env" not defined

What am I doing wrong here?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.30645 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO