Skip to content

PVC / VCT

Appears in

  • .Values.persistence.$name

labels

Additional labels for persistence

Keypersistence.$name.labels
Typemap
Required
Helm tpl✅ (On value only)
Default{}

Example

persistence:
pvc-vol:
labels:
label1: value1

annotations

Additional annotations for persistence

Keypersistence.$name.annotations
Typemap
Required
Helm tpl✅ (On value only)
Default{}

Example

persistence:
pvc-vol:
annotations:
annotation1: value1

namespace

Define the namespace for this object

Keypersistence.$name.namespace
Typestring
Required
Helm tpl
Default""

Example

persistence:
pvc-vol:
namespace: some-namespace

retain

Define wether the to add helm annotation to retain resource on uninstall. This does not guarantee that the resource will be retained.

Keypersistence.$name.retain
Typebool
Required
Helm tpl
DefaultSee default here

Example

persistence:
pvc-vol:
retain: true

accessModes

Define the accessModes of the PVC, if it’s single can be defined as a string, multiple as a list

Keypersistence.$name.accessModes
Typestring or list
Required
Helm tpl
DefaultSee default here

Example

persistence:
pvc-vol:
accessModes: ReadWriteOnce
persistence:
pvc-vol:
accessModes:
- ReadWriteOnce
- ReadWriteMany

volumeName

Define the volumeName of a PV, backing the claim

Keypersistence.$name.volumeName
Typestring
Required
Helm tpl
Default""

Example

persistence:
pvc-vol:
volumeName: volume-name-backing-the-pvc

existingClaim

Define an existing claim to use

Keypersistence.$name.existingClaim
Typestring
Required
Helm tpl
Default""

Example

persistence:
pvc-vol:
existingClaim: existing-claim-name

size

Define the size of the PVC

Keypersistence.$name.size
Typestring
Required
Helm tpl
DefaultSee default pvcSize and vctSize

Example

persistence:
pvc-vol:
size: 2Gi

storageClass

Define the storageClass to use

:::note How storageClass is resolved

  • If storageClass is defined on the persistence
    • - -> "", (which means requesting a PV without class)
    • SCALE-ZFS -> {{ .Values.global.ixChartContext.storageClassName }}
    • Else -> as is
  • Else if ixChartContext (TrueNAS SCALE), -> {{ .Values.global.ixChartContext.storageClassName }}.
  • Else if fallback storageClass, -> this
  • Else -> nothing (which means requesting a PV without class)

:::

Keypersistence.$name.storageClass
Typestring
Required
Helm tpl
Default""

Example

persistence:
pvc-vol:
storageClass: storage-class-name

dataSource

Define dataSource for the pvc

Keypersistence.$name.dataSource
Typemap
Required
Helm tpl
Default{}

Example

persistence:
pvc-vol:
dataSource: {}

dataSource.kind

Define the kind of the dataSource

Keypersistence.$name.dataSource.kind
Typestring
Required
Helm tpl
Default""

Valid Values

  • PersistentVolumeClaim
  • VolumeSnapshot

Example

persistence:
pvc-vol:
dataSource:
kind: "PersistentVolumeClaim"

dataSource.name

Define the name of the dataSource

Keypersistence.$name.dataSource.name
Typestring
Required
Helm tpl
Default""

Example

persistence:
pvc-vol:
dataSource:
name: "existingPVC"

static

Define static provisioning for the pvc

Keypersistence.$name.static
Typemap
Required
Helm tpl
Default{}

Example

persistence:
pvc-vol:
static: {}

static.mode

Define the mode of the static provisioning

Keypersistence.$name.static.mode
Typestring
Required
Helm tpl
Default""

Valid Values

Example

persistence:
pvc-vol:
static:
mode: nfs

mountOptions

Define mountOptions for the pvc. Available only for static.mode: nfs|smb

Keypersistence.$name.mountOptions
Typelist of map
Required
Helm tpl
Default[]

Example

persistence:
pvc-vol:
mountOptions: []

mountOptions[].key

Define the key of the mountOption

Keypersistence.$name.mountOptions[].key
Typestring
Required
Helm tpl
Default""

Example

persistence:
pvc-vol:
mountOptions:
- key: some-key

mountOptions[].value

Define the value of the mountOption

Keypersistence.$name.mountOptions[].value
Typestring
Required
Helm tpl
Default""

Example

persistence:
pvc-vol:
mountOptions:
- value: some-value

volumeSnapshots

Define volumeSnapshots for the pvc

Keypersistence.$name.volumeSnapshots
Typelist of map
Required
Helm tpl
Default[]

Example

persistence:
pvc-vol:
volumeSnapshots: []

volumeSnapshots[].name

Define the name of the volumeSnapshot

Keypersistence.$name.volumeSnapshots[].name
Typestring
Required
Helm tpl
Default""

Example

persistence:
pvc-vol:
volumeSnapshots:
- name: example1

volumeSnapshots[].enabled

Define if the volumeSnapshot is enabled

Keypersistence.$name.volumeSnapshots[].enabled
Typebool
Required
Helm tpl
Defaultfalse

Example

persistence:
pvc-vol:
volumeSnapshots:
- enabled: true

volumeSnapshots[].labels

Define the labels of the volumeSnapshot

Keypersistence.$name.volumeSnapshots[].labels
Typemap
Required
Helm tpl✅ (On value only)
Default{}

Example

persistence:
pvc-vol:
volumeSnapshots:
- labels:
label1: value1

volumeSnapshots[].annotations

Define the annotations of the volumeSnapshot

Keypersistence.$name.volumeSnapshots[].annotations
Typemap
Required
Helm tpl✅ (On value only)
Default{}

Example

persistence:
pvc-vol:
volumeSnapshots:
- annotations:
annotation1: value1

volumeSnapshots[].volumeSnapshotClassName

Define the volumeSnapshotClassName of the volumeSnapshot

Keypersistence.$name.volumeSnapshots[].volumeSnapshotClassName
Typestring
Required
Helm tpl
Default""

Example

persistence:
pvc-vol:
volumeSnapshots:
- volumeSnapshotClassName: some-name

Full Examples

persistence:
pvc-vol:
enabled: true
type: pvc
namespace: some-namespace
labels:
label1: value1
annotations:
annotation1: value1
dataSource:
kind: "PersistentVolumeClaim"
name: "existingPVC"
accessModes: ReadWriteOnce
volumeName: volume-name-backing-the-pvc
existingClaim: existing-claim-name
retain: true
size: 2Gi
mountOptions:
- key: some-key
value: some-value
# static:
# mode: custom
# provisioner: provisioner
# driver: driver
# csi:
# key: value
volumeSnapshots:
- name: example1
enabled: true
labels:
label1: value1
annotations:
annotation1: value1
volumeSnapshotClassName: some-name
# targetSelectAll: true
targetSelector:
pod-name:
container-name:
mountPath: /path/to/mount