diff --git a/charts/common/Chart.yaml b/charts/common/Chart.yaml index a8ea28fe..51347228 100644 --- a/charts/common/Chart.yaml +++ b/charts/common/Chart.yaml @@ -9,4 +9,4 @@ maintainers: email: sebastien@scroll.io name: common type: library -version: 1.5.1 +version: 1.5.2 diff --git a/charts/common/README.md b/charts/common/README.md index de8e6a62..c5cb55cc 100644 --- a/charts/common/README.md +++ b/charts/common/README.md @@ -1,6 +1,6 @@ # common -![Version: 1.5.1](https://img.shields.io/badge/Version-1.5.1-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) +![Version: 1.5.2](https://img.shields.io/badge/Version-1.5.2-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) Function library for Helm charts @@ -125,6 +125,7 @@ Kubernetes: `>=1.22.0-0` | persistence | object | See below | Configure persistence for the chart here. Additional items can be added by adding a dictionary key similar to the 'config' key. | | persistence.config | object | See below | Default persistence for configuration files. | | persistence.config.accessMode | string | `"ReadWriteOnce"` | AccessMode for the persistent volume. Make sure to select an access mode that is supported by your storage provider! [[ref]](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) | +| persistence.config.dataSource | string | `nil` | Set dataSource to mount pvc from a snapshot | | persistence.config.enabled | bool | `false` | Enables or disables the persistence item | | persistence.config.existingClaim | string | `nil` | If you want to reuse an existing claim, the name of the existing PVC can be passed here. | | persistence.config.mountPath | string | `nil` | Where to mount the volume in the main container. Defaults to `/`, setting to '-' creates the volume but disables the volumeMount. | diff --git a/charts/common/templates/classes/_pvc.tpl b/charts/common/templates/classes/_pvc.tpl index 3723abc5..16550d70 100644 --- a/charts/common/templates/classes/_pvc.tpl +++ b/charts/common/templates/classes/_pvc.tpl @@ -42,4 +42,8 @@ spec: {{- if $values.volumeName }} volumeName: {{ $values.volumeName | quote }} {{- end }} + {{- if $values.dataSource }} + dataSource: + {{- $values.dataSource | toYaml | nindent 4 }} + {{- end }} {{- end -}} diff --git a/charts/common/values.yaml b/charts/common/values.yaml index 891402d3..d94029dc 100644 --- a/charts/common/values.yaml +++ b/charts/common/values.yaml @@ -535,6 +535,12 @@ persistence: # -- Set to true to retain the PVC upon `helm uninstall` retain: false + # -- Set dataSource to mount pvc from a snapshot + dataSource: + # name: "" + # kind: VolumeSnapshot + # apiGroup: snapshot.storage.k8s.io + # -- Create an emptyDir volume to share between all containers # [[ref]]https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) # @default -- See below