From 60ddfec8940376bad76b2143110b0605f14f4e82 Mon Sep 17 00:00:00 2001 From: Sebastian Melchior Date: Sat, 7 Apr 2018 11:50:07 +0200 Subject: [PATCH] [stable/neo4j] Fix dataVolume Persistence (#4046) * make data volume persistent + make subPath optional * fix README format * change minor version --- stable/neo4j/Chart.yaml | 2 +- stable/neo4j/README.md | 1 + stable/neo4j/templates/core-statefulset.yaml | 5 +++-- stable/neo4j/values.yaml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/stable/neo4j/Chart.yaml b/stable/neo4j/Chart.yaml index 53188f65da..fbd3908532 100644 --- a/stable/neo4j/Chart.yaml +++ b/stable/neo4j/Chart.yaml @@ -1,6 +1,6 @@ name: neo4j home: https://www.neo4j.com -version: 0.6.1 +version: 0.7.0 appVersion: 3.2.3 description: Neo4j is the world's leading graph database icon: http://info.neo4j.com/rs/773-GON-065/images/neo4j_logo.png diff --git a/stable/neo4j/README.md b/stable/neo4j/README.md index a1973eb212..0c65ca63a1 100644 --- a/stable/neo4j/README.md +++ b/stable/neo4j/README.md @@ -64,6 +64,7 @@ their default values. | `core.persistentVolume.storageClass` | Storage class of backing PVC | `standard` (uses beta storage class annotation) | | `core.persistentVolume.size` | Size of data volume | `10Gi` | | `core.persistentVolume.mountPath` | Persistent Volume mount root path | `/data` | +| `core.persistentVolume.subPath` | Subdirectory of the volume to mount | `nil` | | `core.persistentVolume.annotations` | Persistent Volume Claim annotations | `{}` | | `readReplica.numberOfServers` | Number of machines in READ_REPLICA mode | `0` | | `readReplica.initContainers` | Init containers to add to the replica pod. Example use case is a script that installs the APOC library | `{}` | diff --git a/stable/neo4j/templates/core-statefulset.yaml b/stable/neo4j/templates/core-statefulset.yaml index ae42b90b88..28b197af89 100644 --- a/stable/neo4j/templates/core-statefulset.yaml +++ b/stable/neo4j/templates/core-statefulset.yaml @@ -76,8 +76,9 @@ spec: volumeMounts: - name: datadir mountPath: "{{ .Values.core.persistentVolume.mountPath }}" - subPath: "{{ .Values.core.persistentVolume.subPath }}" - volumeMounts: + {{- if .Values.core.persistentVolume.subPath }} + subPath: {{ .Values.core.persistentVolume.subPath }} + {{- end }} - name: plugins mountPath: /plugins resources: diff --git a/stable/neo4j/values.yaml b/stable/neo4j/values.yaml index b5239058c3..d639ac796e 100644 --- a/stable/neo4j/values.yaml +++ b/stable/neo4j/values.yaml @@ -46,7 +46,7 @@ core: ## Subdirectory of core server data Persistent Volume to mount ## Useful if the volume's root directory is not empty ## - subPath: "" + ## subPath: "" ## Pass extra environment variables to the Neo4j container. ##