apiVersion: v1
kind: configMap
data:
[service]
port: 3000
Environment: "dev"
[database]
name:
host:
port:
[kube]
server:
cert:
key:
metadata:
name:
namespace:
How we can add value when we create this file as helm config file
As @Harsh Manvar mentioned in comments
you add values inside values.yaml which store the values and use that values inside helm chart.
There is a link to helm documentation about how to do it.
Specially part with
Values files can contain more structured content, too. For example, we could create a favorite section in our values.yaml file, and then add several keys there:
values.yaml
favorite:
drink: coffee
food: pizza
ConfigMap
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-configmap
data:
myvalue: "Hello World"
drink: {{ .Values.favorite.drink }}
food: {{ .Values.favorite.food }}
Hope this answer your question.