How do I override environment variables in a .env file for Go with Helm?
With C# I do the following:
In appsettings.json:
{
"Animals":{
"Pig": "Squeek"
},
}
In values.yaml:
animals:
pig: "Oink"
In configmap.yaml:
apiVersion: v1
kind: ConfigMap
metadata:
name: animal-configmap
pig: {{ .Values.animals.pig }}
And finally in deployment.yaml:
spec:
...
template:
...
spec:
...
containers:
...
env:
- name: Animals__Pig
valueFrom:
configMapKeyRef:
name: animal-configmap
key: pig
Not the double __.
How would one go about updating an environment value for Go?
Here is the Go .env file example:
PIG=SQUEEK