Skip to content

Commit

Permalink
Merge pull request #18 from alexandrud/osrm-backend
Browse files Browse the repository at this point in the history
add pv template to mount existing NFS share
  • Loading branch information
alexandrud authored Jan 25, 2021
2 parents 1375140 + 4a545ad commit c35d719
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/osrm-backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: osrm-backend
description: Helm chart for Open Source Routing Machine
type: application
version: 0.0.2
version: 0.0.3
appVersion: "v5.23.0"
keywords:
- maps
Expand Down
25 changes: 25 additions & 0 deletions charts/osrm-backend/templates/pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if .Values.persistence.existingVolume.id -}}
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ template "osrm-backend.fullname" . }}
annotations:
pv.kubernetes.io/provisioned-by: {{ .Values.persistence.existingVolume.provisioner }}
spec:
accessModes:
{{- range .Values.persistence.accessModes }}
- {{ . | quote }}
{{- end }}
capacity:
storage: {{ .Values.persistence.size | quote}}
csi:
driver: {{ .Values.persistence.existingVolume.driver }}
fsType: {{ .Values.persistence.existingVolume.type }}
{{- with .Values.persistence.annotations }}
volumeAttributes:
{{ toYaml . | indent 6 }}
{{- end }}
volumeHandle: {{ .Values.persistence.existingVolume.id }}
persistentVolumeReclaimPolicy: Retain
storageClassName: {{ .Values.persistence.storageClassName }}
{{- end -}}
8 changes: 6 additions & 2 deletions charts/osrm-backend/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- if .Values.persistence.storageClassName }}
{{- if and .Values.persistence.storageClassName }}
storageClassName: {{ .Values.persistence.storageClassName }}
{{- end -}}
{{- end }}
{{- if .Values.persistence.existingVolume.id }}
volumeName: {{ template "osrm-backend.fullname" . }}
{{- end }}

{{- end -}}
5 changes: 5 additions & 0 deletions charts/osrm-backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ affinity: {}

persistence:
enabled: false
existingVolume:
id:
driver: "nas.csi.everest.io"
type: "nfs"
provisioner: "everest-csi-provisioner"
storageClassName: ""
accessModes:
- ReadWriteMany
Expand Down

0 comments on commit c35d719

Please sign in to comment.