Reputation: 10709
I'm positive this is going to be something mundane, but can't seem to figure it out. Using helm I'm trying to insert all files in a folder one directory up into a ConfigMap
. The glob pattern works fine if the folder is in the same directory as the configmap.yaml
file, however move it one level above and it finds nothing. Below is the folder structure, below that is that yaml with the helm.
configmap.yaml
Screen shot to illustrate the path to the file:
Text:
apiVersion: v1
kind: ConfigMap
metadata:
name: helm-configmap
data:
{{ (.Files.Glob "../prop/*").AsConfig | indent 2 }}
Upvotes: 1
Views: 3394
Reputation: 2527
The working directory of helm is the directory where Chart.yaml is located, so the relative path should be based on this.
So your configuration should be written like this:
apiVersion: v1
kind: ConfigMap
metadata:
name: helm-configmap
data:
{{ (.Files.Glob "prop/*").AsConfig | indent 2 }}
In addition, Some files cannot be accessed through the .Files object, usually for security reasons.
templates/
cannot be accessed..helmignore
cannot be accessed.Upvotes: 5