forked from FraunhoferIOSB/FROST-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb-local-volume.yaml
28 lines (28 loc) · 949 Bytes
/
db-local-volume.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{{- if .Values.frost.db.enableIntegratedDb -}}
{{- if .Values.frost.db.persistence.enabled -}}
{{- if .Values.frost.db.persistence.storageClassName -}}
{{- if eq .Values.frost.db.persistence.storageClassName "frost-server-db-local" -}}
{{- $tier := "db-local-volume" -}}
{{- $fullName := include "frost-server.fullName" (merge (dict "tier" $tier) .) -}}
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ $fullName }}
labels:
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
helm.sh/chart: {{ include "frost-server.chart" . }}
app: {{ include "frost-server.name" . }}
component: {{ $tier }}
spec:
storageClassName: frost-server-db-local
capacity:
storage: {{ .Values.frost.db.persistence.capacity }}
accessModes:
- ReadWriteOnce
hostPath:
path: {{ .Values.frost.db.persistence.local.nodeMountPath }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}