Files
openebs/charts/rawfile-localpv/templates/snapshotclass.yaml
2025-12-09 19:34:54 +11:00

17 lines
478 B
YAML

{{- $vals := .Values }}
{{- range $class := .Values.snapshotClasses }}
{{- if $class.enabled }}
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: {{ $class.name }}
annotations:
"helm.sh/hook": post-install
"helm.sh/hook-weight": "-5"
{{- if $class.isDefault }}snapshot.storage.kubernetes.io/is-default-class: "true"{{ end }}
driver: {{ $vals.provisionerName }}
deletionPolicy: {{ $class.deletionPolicy }}
---
{{- end }}
{{- end }}