aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/so/charts/mariadb/templates/pv.yaml
blob: 27343e352832677eefca0ae53cf8bfb00e2a4f97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
kind: PersistentVolume
apiVersion: v1
metadata:
  name: {{ include "common.fullname" . }}
  namespace: {{ include "common.namespace" . }}
  labels:
    app: {{ include "common.name" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
spec:
  capacity:
    storage: {{ .Values.persistence.size}}
  accessModes:
    - {{ .Values.persistence.accessMode }}
  persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
  hostPath:
    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
{{- end -}}