k8s-charts/charts/silverbullet/templates/pvc.yaml

32 lines
1.0 KiB
YAML
Raw Normal View History

2024-02-14 21:39:42 +00:00
{{- if .Values.persistence.enabled -}}
{{- if not .Values.persistence.existingClaim -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "silverbullet.fullname" . }}-pvc
labels:
{{- include "silverbullet.labels" . | nindent 4 }}
# app.kubernetes.io/name: {{ include "silverbullet.name" . }}
# helm.sh/chart: {{ include "silverbullet.chart" . }}
# app.kubernetes.io/instance: {{ .Release.Name }}
# app.kubernetes.io/managed-by: {{ .Release.Service }}
# app.kubernetes.io/component: app
{{- if .Values.persistence.annotations }}
annotations:
{{ toYaml .Values.persistence.annotations | indent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}