0
votes
"Helm Deploy": Error: UPGRADE FAILED: template: helm/templates/secrets.yaml:24:10: executing "helm/templates/secrets.yaml" at <.Files.Glob>: nil pointer evaluating interface {}.Glob

The same code works for me locally, but I'm getting the above error when deploying within GCP CloudBuild... Both setups are using helm 3.5.3.

I'm copying files to the helm chart directory within a folder, (ie. helm/fileSecrets), and trying to create secrets from them via:

apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: file-secrets
  namespace: "{{ $.Values.namespace }}"
data:
{{ (.Files.Glob "fileSecrets/*").AsSecrets | indent 2 }}
1

1 Answers

0
votes

Seems using the .Files from the global context works (using $.Files)