2024-02-19 00:08:20 +01:00
|
|
|
{{- with .Values.persistence }}
|
|
|
|
{{- if and
|
|
|
|
.enabled
|
|
|
|
(not .existingClaim)
|
|
|
|
(not .hostPath)
|
|
|
|
-}}
|
|
|
|
---
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
2024-11-12 12:41:26 +01:00
|
|
|
name: {{ template "mautrix-bridge.fullname" $ }}
|
2024-02-19 00:08:20 +01:00
|
|
|
labels:
|
2024-11-12 12:41:26 +01:00
|
|
|
{{- include "mautrix-bridge.labels" $ | nindent 4 }}
|
2024-02-19 00:08:20 +01:00
|
|
|
{{- with .annotations }}
|
|
|
|
annotations:
|
|
|
|
{{ toYaml . | indent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- {{ .accessMode | quote }}
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: {{ .size | quote }}
|
|
|
|
{{- with .storageClass }}
|
|
|
|
{{- if (eq "-" .) }}
|
|
|
|
storageClassName: ""
|
|
|
|
{{- else }}
|
|
|
|
storageClassName: {{ . | quote }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}{{/* end-if .enabled */}}
|
|
|
|
{{- end }}{{/* end-with .persistence */}}
|
|
|
|
|