thirdparty-ops-docker-helm/charts/opal/templates/persistence/mysql-pvc.yaml

25 lines
789 B
YAML
Raw Normal View History

2018-10-23 21:22:53 +02:00
{{- if .Values.persistence.enabled }}
apiVersion: extensions/v1beta1
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Values.mysql.persistence.claim }}
annotations:
{{- if .Values.persistence.retain }}
volume.beta.kubernetes.io/storage-class: "nfs-provisioner-retain"
{{- else }}
volume.beta.kubernetes.io/storage-class: "nfs-provisioner"
{{- end }}
spec:
accessModes:
- ReadWriteMany
resources:
requests:
2018-10-30 12:24:17 +01:00
{{- if eq .Values.opal.type.kind "small" }}
2018-10-23 21:22:53 +02:00
storage: {{ .Values.mysql.type.small.persistence.size }}
2018-10-30 12:24:17 +01:00
{{- else if eq .Values.opal.type.kind "medium" }}
2018-10-23 21:22:53 +02:00
storage: {{ .Values.mysql.type.medium.persistence.size }}
2018-10-30 12:24:17 +01:00
{{- else }}
2018-10-23 21:22:53 +02:00
storage: {{ .Values.mysql.type.large.persistence.size }}
{{- end }}
{{- end }}