a_kauerz
(Alexander Kauerz)
January 11, 2021, 4:18pm
1
Chart-Version: dgraph-0.0.13
Using the chart options to disable persistence for a test installation the statefulset.yaml of alpha and zero fail to render because of false indentation.
Used values.yml:
zero:
persistence:
enabled: false
storageClass: "none"
accessModes:
- ReadWriteOnce
size: 8Gi
alpha:
persistence:
enabled: false
storageClass: "none"
accessModes:
- ReadWriteOnce
size: 10Gi
annotations: {}
Snippet of the wrong rendered yaml:
volumes:
- name: datadir
persistentVolumeClaim:
claimName: datadir
- name: datadir
emptyDir: {}
Check the indentation of the last two lines!
After resolving this the helm deployment is succesfull, but kubernets won’t render any pods.
Now we have two volumes with the name “datadir”
volumes:
- name: datadir
persistentVolumeClaim:
claimName: datadir
- name: datadir
emptyDir: {}
I resolved this by fetching the chart and deleting the lines in StateFulSet of alpha and zero which created the false volumes.
joaquin
(Joaquin Menchaca)
January 14, 2021, 1:24am
5
Hello.
Thank you so much for bringing this up. We will look into this.
Joaquin
dmai
(Daniel Mai)
January 14, 2021, 7:13am
7
This PR fixes the failed Helm installation when persistence is disabled:
dgraph-io:master
← dgraph-io:danielmai/fix-emptydir-persistence
opened 06:35AM - 14 Jan 21 UTC
The helm installation fails when persistence is disabled. e.g., setting either
… alpha.persistence.enabled or zero.persistence.enabled to false.
$ helm install dev dgraph/dgraph --set alpha.persistence.enabled=false,zero.persistence.enabled=false
Error: YAML parse error on dgraph/templates/alpha/statefulset.yaml: error converting YAML to JSON: yaml: line 88: did not find expected key
The cause for this error can be seen when rendering the template. The emptyDir
config gets mangled with the configMap:
- name: config-volume
configMap:
name: dev-dgraph-alpha-config
- name: datadir
emptyDir: {}
Error: YAML parse error on dgraph/templates/alpha/statefulset.yaml: error converting YAML to JSON: yaml: line 88: did not find expected key
helm.go:81: [debug] error converting YAML to JSON: yaml: line 88: did not find expected key
This change sets the emptyDir config in the volumes section for datadir.
Resolves https://discuss.dgraph.io/t/helm-chart-deployment-fails-when-persistence-is-disabled/12240
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/dgraph-io/charts/60)
<!-- Reviewable:end -->
joaquin
(Joaquin Menchaca)
January 15, 2021, 5:29am
8
@a_kauerz This fix now available in dgraph-0.0.14
:
1 Like