Skip to content

fix: Configure no-persistence emptyDir correctly. #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2021

Conversation

danielmai
Copy link
Contributor

@danielmai danielmai commented Jan 14, 2021

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


This change is Reviewable

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
Copy link
Contributor

@darkn3rd darkn3rd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: LGTM

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @danielmai)

@darkn3rd darkn3rd merged commit 8855f54 into master Jan 14, 2021
@darkn3rd darkn3rd deleted the danielmai/fix-emptydir-persistence branch January 14, 2021 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants