Getting this error message after kubectl apply -f .
error: error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{"include (print $.Template.BasePath \"/configmap.yaml\") . | sha256sum":interface {}(nil)}
I've tried putting checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
in different places, but I don't really understand YAML or JSON to figure out the issue.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: demo
spec:
replicas: 1
selector:
matchLabels:
app: demo
template:
metadata:
labels:
app: demo
spec:
containers:
- name: demo
image: cloudnatived/demo:hello-config-env
ports:
- containerPort: 8888
env:
- name: GREETING
valueFrom:
configMapKeyRef:
name: demo-config
key: greeting
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
I just want to be able to update my pods when the config is changed. I'm supposed to helm upgrade
here somewhere but I'm not sure what arguments to give it.