storage
Description
The Storage
property is a list of storage definitions. Storage definitions fall into two categories: ephemeral and persistent. For persistent storage definitions, the Persistent Volume must use an access mode of ReadWriteOnce
.
The following fields can be modified:
type
path
size
class
volumeMode
selector
deleteClaim
type
type
defines the kind of storage volume that will be created. There are two valid options: ephemeral
and persistent
. Ephemeral storage takes the form of EmptyDir volumes mounted on path
. Persistent
storage takes the form of Persistent Volume Claims.
path
path
is simply the path internal to the container to persist. The path
also informs the names of the volume resources to ensure uniqueness.
This field applies to both ephemeral and persistent types.
size
size
is the size of the persisted volume. The expected format is some form of #Gi
. For more information on resource definitions, see Resources doc.
This field applies to both ephemeral and persistent types.
class
class
is a direct pass through to the storageClassName
field for the Persistent Volume Claim. It determines which class to use for the volume. StorageClass doc
This field applies only to the persistent type.
volumeMode
volumeMode
is a switch between Filesystem
and Block
volume types. Our default type is Filesystem
. VolumeMode doc
This field applies only to the persistent type.
selector
selector
is a set of label selectors to refine the search for a Persistent Volume to bind.
This field applies only to the persistent type.
deleteClaim
deleteClaim
is a boolean value to specify whether a persistent volume claim should be deleted or retained.
This field applies only to the persistent type.
Example
storage:
- type: persistent
path: /opt/ibm/datapower/drouter/config
size: 10Gi
class: velox-block
volumeMode: Block
selector:
matchLabels:
example.label: some.value
- type: ephemeral
path: /opt/ibm/datapower/drouter/temporary
size: 2Gi