Skip to content

Commit

Permalink
Merge pull request #107 from almahmoud/master
Browse files Browse the repository at this point in the history
Add persistence.existingClaim to nfs-ganesha-external-provisioner
  • Loading branch information
k8s-ci-robot committed Jan 4, 2023
2 parents 5cdf626 + 3b34189 commit d7b4433
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/nfs-server-provisioner/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: 3.0.0
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.
name: nfs-server-provisioner
version: 1.4.0
version: 1.5.0
maintainers:
- name: kiall
email: kiall@macinnes.ie
Expand Down
1 change: 1 addition & 0 deletions charts/nfs-server-provisioner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ their default values.
| `persistence.storageClass` | PVC Storage Class for config volume | `nil` |
| `persistence.accessMode` | PVC Access Mode for config volume | `ReadWriteOnce` |
| `persistence.size` | PVC Storage Request for config volume | `1Gi` |
| `persistence.existingClaim` | Use an existing Persistent Volume Claim for persistence | `nil` |
| `storageClass.create` | Enable creation of a StorageClass to consume this nfs-server-provisioner instance | `true` |
| `storageClass.provisionerName` | The provisioner name for the storageclass | `cluster.local/{release-name}-{chart-name}` |
| `storageClass.defaultClass` | Whether to set the created StorageClass as the clusters default StorageClass | `false` |
Expand Down
7 changes: 7 additions & 0 deletions charts/nfs-server-provisioner/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ spec:
{{- end }}

{{- if .Values.persistence.enabled }}
{{- if .Values.persistence.existingClaim }}
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ tpl .Values.persistence.existingClaim . }}
{{- else }}
volumeClaimTemplates:
- metadata:
name: data
Expand All @@ -144,3 +150,4 @@ spec:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/nfs-server-provisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ service:

persistence:
enabled: false

## Existing Persistent Volume Claim
## This should be used with persistence.enabled=true
## If defined, an existing volume claim will be used, instead
## of creating a new one. i.e. volume definition:
## persistentVolumeClaim:
## claimName: {{ tpl .Values.persistence.existingClaim . }}
# existingClaim: "my-existing-pvc"

## Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
Expand Down

0 comments on commit d7b4433

Please sign in to comment.