Files
instance-template-v3/templates/odoo-pvc.yaml

31 lines
1.3 KiB
YAML

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "instance.fullname" . }}-odoo
labels:
{{- include "instance.labels" . | nindent 4 }}
spec:
accessModes: [ReadWriteOnce]
{{- if .Values.instance.storageClassName }}
# Tower stamps storageClassName when the destination cluster has
# Longhorn (or another snapshot-capable CSI). Empty here means
# bind to the cluster's default StorageClass — k3s default is
# local-path which doesn't support snapshots, so spawn-env /
# Refresh ↓ on those instances falls back to the S3 path.
# ADR 0003 phase 6.
storageClassName: {{ .Values.instance.storageClassName | quote }}
{{- end }}
{{- if and .Values.instance.dataSource .Values.instance.dataSource.filestore .Values.instance.dataSource.filestore.snapshotName }}
# Seed from VolumeSnapshot — Tower's VolumeClone path for
# spawn-env / Refresh ↓ (ADR 0003 phase 3+4). The snapshot must
# exist in the same namespace before this PVC is provisioned;
# Tower creates it before triggering the chart sync.
dataSource:
apiGroup: snapshot.storage.k8s.io
kind: VolumeSnapshot
name: {{ .Values.instance.dataSource.filestore.snapshotName | quote }}
{{- end }}
resources:
requests:
storage: {{ include "instance.storage" (dict "Values" .Values "layer" "filestore") | quote }}