Skip to content

Commit d7b4433

Browse files
authored
Merge pull request #107 from almahmoud/master
Add persistence.existingClaim to nfs-ganesha-external-provisioner
2 parents 5cdf626 + 3b34189 commit d7b4433

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

charts/nfs-server-provisioner/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: 3.0.0
33
description: nfs-server-provisioner is an out-of-tree dynamic provisioner for Kubernetes. You can use it to quickly & easily deploy shared storage that works almost anywhere.
44
name: nfs-server-provisioner
5-
version: 1.4.0
5+
version: 1.5.0
66
maintainers:
77
- name: kiall
88

charts/nfs-server-provisioner/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ their default values.
7272
| `persistence.storageClass` | PVC Storage Class for config volume | `nil` |
7373
| `persistence.accessMode` | PVC Access Mode for config volume | `ReadWriteOnce` |
7474
| `persistence.size` | PVC Storage Request for config volume | `1Gi` |
75+
| `persistence.existingClaim` | Use an existing Persistent Volume Claim for persistence | `nil` |
7576
| `storageClass.create` | Enable creation of a StorageClass to consume this nfs-server-provisioner instance | `true` |
7677
| `storageClass.provisionerName` | The provisioner name for the storageclass | `cluster.local/{release-name}-{chart-name}` |
7778
| `storageClass.defaultClass` | Whether to set the created StorageClass as the clusters default StorageClass | `false` |

charts/nfs-server-provisioner/templates/statefulset.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ spec:
128128
{{- end }}
129129

130130
{{- if .Values.persistence.enabled }}
131+
{{- if .Values.persistence.existingClaim }}
132+
volumes:
133+
- name: data
134+
persistentVolumeClaim:
135+
claimName: {{ tpl .Values.persistence.existingClaim . }}
136+
{{- else }}
131137
volumeClaimTemplates:
132138
- metadata:
133139
name: data
@@ -144,3 +150,4 @@ spec:
144150
requests:
145151
storage: {{ .Values.persistence.size | quote }}
146152
{{- end }}
153+
{{- end }}

charts/nfs-server-provisioner/values.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ service:
3939

4040
persistence:
4141
enabled: false
42+
43+
## Existing Persistent Volume Claim
44+
## This should be used with persistence.enabled=true
45+
## If defined, an existing volume claim will be used, instead
46+
## of creating a new one. i.e. volume definition:
47+
## persistentVolumeClaim:
48+
## claimName: {{ tpl .Values.persistence.existingClaim . }}
49+
# existingClaim: "my-existing-pvc"
4250

4351
## Persistent Volume Storage Class
4452
## If defined, storageClassName: <storageClass>

0 commit comments

Comments
 (0)