Vault-helm and annotations in a helm chart

Hi,

When I use the following annotation in a helm chart I receive an error “function “secret” not defined” but it works fine in a regular manifest

  annotations:
    vault.hashicorp.com/agent-inject: "true"
    vault.hashicorp.com/agent-inject-template-helloworld: |
      {{- with secret "kv2/data/secret" -}}
      postgresql://{{ .Data.data.username }}:{{ .Data.data.password }}@postgres:5432/wizard
      {{- end }}

What am I missing here? Thanks in advance!

1 Like