Skip to content

persistence

Configure persistent storage and mount options. Each key is an identifier for a persistence item. Supported types: persistentVolumeClaim (default), configMap, secret, nfs, emptyDir, hostPath, image, custom. By default each item mounts to /<identifier>. Use globalMounts or advancedMounts to customize mount paths.

object

Keys are identifiers for persistence instances.

persistence:
main:
enabled: true
# ... configuration
secondary:
enabled: true
# ... configuration
persistence:
config:
type: persistentVolumeClaim
accessMode: ReadWriteOnce
size: 1Gi
globalMounts:
- path: /config
tmp:
type: emptyDir
persistence:
config:
type: persistentVolumeClaim
accessMode: ReadWriteOnce
size: 1Gi
More examples (19)
persistence:
config:
type: persistentVolumeClaim
accessMode: ReadWriteOnce
size: 10Gi
storageClass: fast-ssd
retain: true
globalMounts:
- path: /config
persistence:
config:
type: persistentVolumeClaim
existingClaim: my-app-data
persistence:
config:
type: configMap
name: my-configmap
persistence:
config:
type: configMap
identifier: my-chart-configmap
globalMounts:
- path: /etc/app/config
readOnly: true
persistence:
config:
type: configMap
name: my-configmap
items:
- key: settings.yaml
path: settings.yaml
persistence:
credentials:
type: secret
name: my-secret
persistence:
tls:
type: secret
name: app-tls-cert
globalMounts:
- path: /etc/ssl/certs
readOnly: true
persistence:
media:
type: nfs
server: 192.168.1.100
path: /mnt/share/media
persistence:
backups:
type: nfs
server: nas.example.lan
path: /volume/Backups/k8s/app
globalMounts:
- path: /backups
persistence:
tmp:
type: emptyDir
persistence:
cache:
type: emptyDir
medium: Memory
sizeLimit: 256Mi
persistence:
cache:
type: ephemeral
persistence:
cache:
type: ephemeral
accessMode: ReadWriteOnce
storageClass: fast-ssd
size: 10Gi
persistence:
dev-tun:
type: hostPath
hostPath: /dev/net/tun
hostPathType: CharDevice
persistence:
data:
type: hostPath
hostPath: /mnt/local-data
hostPathType: DirectoryOrCreate
persistence:
static-assets:
type: image
image: registry.example.com/assets:v1.0
persistence:
tools:
type: image
image:
repository: registry.example.com/tools
tag: latest
pullPolicy: Always
persistence:
ceph:
type: custom
volumeSpec:
cephfs:
monitors:
- 10.0.0.1:6789
user: admin
secretRef:
name: ceph-secret
persistence:
projected:
type: custom
volumeSpec:
projected:
sources:
- secret:
name: my-secret
- configMap:
name: my-config

Dynamically provision a PersistentVolumeClaim. This is the default persistence type and will be used when no type is specified.

persistence:
config:
type: persistentVolumeClaim
accessMode: ReadWriteOnce
size: 1Gi
PropertyTypeRequiredDefaultDescription
accessModestringYes-AccessMode for the persistent volume. Make sure to select…
annotationsobject / nullNo-Annotations to set on the item.
dataSourceobjectNo-The optional data source for the persistentVolumeClaim. S…
dataSourceRefobjectNo-The optional volume populator for the persistentVolumeCla…
forceRenamestringNo-Override the default resource name. Mutually exclusive wi…
labelsobject / nullNo-Labels to set on the item.
prefixstringNoPrefix to prepend to the resource name. Mutually exclusiv…
retainbooleanNo-Set to true to retain the PVC upon helm uninstall.
sizestringYes-The amount of storage that is requested for the persisten…
storageClassstringNo-Storage Class for the config volume. If set to ’-&#39…
suffixstringNo-Suffix to append to the resource name. Defaults to the re…
volumeNamestringNo-

Common properties:

PropertyTypeRequiredDefaultDescription
accessModestringYes-AccessMode for the persistent volume. Make sure to select…
advancedMountsobjectNo-Explicitly configure mounts for specific controllers and …
annotationsobject / nullNo-Annotations to set on the item.
dataSourceobjectNo-The optional data source for the persistentVolumeClaim. S…
dataSourceRefobjectNo-The optional volume populator for the persistentVolumeCla…
enabledbooleanNotrueSet to false to disable the persistence item.
forceRenamestringNo-Override the default resource name. Mutually exclusive wi…
globalMountsarrayNo-Configure mounts to all controllers and containers. By de…
labelsobject / nullNo-Labels to set on the item.
prefixstringNoPrefix to prepend to the resource name. Mutually exclusiv…
retainbooleanNo-Set to true to retain the PVC upon helm uninstall.
sizestringYes-The amount of storage that is requested for the persisten…
storageClassstringNo-Storage Class for the config volume. If set to ’-&#39…
suffixstringNo-Suffix to append to the resource name. Defaults to the re…
typeanyNo-
volumeNamestringNo-

AccessMode for the persistent volume. Make sure to select an access mode that is supported by your storage provider! See https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes

Explicitly configure mounts for specific controllers and containers. Structure: advancedMounts.<controller_name>.<container_name>[].path Use this instead of globalMounts when different controllers need different mount configurations.

Override the default resource name. Mutually exclusive with prefix and suffix.

Configure mounts to all controllers and containers. By default the persistence item will be mounted to /<name_of_the_persistence_item>. Each entry supports: path, readOnly, subPath, subPathExpr, and mountPropagation.

Prefix to prepend to the resource name. Mutually exclusive with forceRename.

The amount of storage that is requested for the persistent volume.

Storage Class for the config volume. If set to ’-’, dynamic provisioning is disabled. If set to something else, the given storageClass is used. If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner.

Suffix to append to the resource name. Defaults to the resource identifier if there are multiple items, otherwise empty. Mutually exclusive with forceRename.