db6c9ac78c
Some applications require perisitant volumes to be stored on the hosts where they running, usually its done via kubernetes PV. One of PV implementations is local-volume-provisioner [0] This patch adds helm chart to deploy LVP. Since LVP creates a volumes for each mountpoint, helm chart provides a script to create mountpoints in the directory, which later exposed to kubernetes as individual volumes. Change-Id: I3f61088ddcbd0a83a729eb940cbf9b2bf1e65894
28 lines
831 B
YAML
28 lines
831 B
YAML
{{- if .Values.manifests.storageclass }}
|
|
{{- $envAll := . }}
|
|
{{- range $val := $envAll.Values.conf.fake_mounts.classes }}
|
|
{{- if $val.storageClass }}
|
|
---
|
|
apiVersion: storage.k8s.io/v1
|
|
kind: StorageClass
|
|
metadata:
|
|
name: {{ $val.name }}
|
|
{{- if kindIs "map" $val.storageClass }}
|
|
{{- if $val.storageClass.isDefaultClass }}
|
|
annotations:
|
|
storageclass.kubernetes.io/is-default-class: "true"
|
|
{{- end }}
|
|
{{- end }}
|
|
labels:
|
|
{{ tuple $envAll $envAll.Chart.Name "storageclass" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
|
provisioner: kubernetes.io/no-provisioner
|
|
volumeBindingMode: WaitForFirstConsumer
|
|
{{- if kindIs "map" $val.storageClass }}
|
|
reclaimPolicy: {{ $val.storageClass.reclaimPolicy | default "Delete" }}
|
|
{{- else }}
|
|
reclaimPolicy: Delete
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|