I am trying to create a helm chart of kind ConfigMap that will replace the following command from kubernates.
kubectl create configmap my-config -n $namespace --from-file=./my-directory
my-directory contains around 5 files, 2 of them are properties file and 2 of them jpg file. I see the following result for kubectl get cm, I can see 4 DATA files in configMap
[admin@cluster ~]$ kubectl get cm
NAME DATA AGE
warm-up-config 4 41m
I created a template as follows, it work if I specify only properties file but If I add jpg files it doesn't work at all
apiVersion: v1
kind: ConfigMap
metadata:
name: my-config
data:
{{ (.Files.Glob "resources/*").AsConfig | nindent 2 }}
Does anyone know how I make this work.
所有评论(0)