Reference / Package catalog
storage-classes
These docs describe Kix's main branch, which can include changes not yet released. Read the docs for the latest release.
StorageClasses for CSI drivers already installed in the cluster
This page is generated from kix/packages/stable/storage-classes.
| Stability | Stable |
package value | packages.storage-classes |
| Roles | storageClasses |
Options
Section titled “Options”classes
Section titled “classes”StorageClasses to create, keyed by class name. The CSI driver each
class names in provisioner must already run in the cluster.
Annotate one class storageclass.kubernetes.io/is-default-class = "true" to make it the cluster default; this is refused when the
flavor reports that the environment already has a default class
(cluster.roles.storageClasses.binding = "shadowable").
-
Type:
attribute set of (submodule) -
Example:
1{2local-path-retain = {3provisioner = "rancher.io/local-path";4reclaimPolicy = "Retain";5volumeBindingMode = "WaitForFirstConsumer";6};7}
classes.<name>.allowVolumeExpansion
Section titled “classes.<name>.allowVolumeExpansion”Whether a claim of this class may grow. Omitted from the manifest when false, because the apiserver leaves the field unset and rendering false would differ from an adopted class.
- Type:
boolean - Default:
false
classes.<name>.allowedTopologies
Section titled “classes.<name>.allowedTopologies”Nodes volumes of this class may be provisioned for. Omitted from the manifest when empty.
- Type:
list of (submodule) - Default:
[ ]
classes.<name>.allowedTopologies.*.matchLabelExpressions
Section titled “classes.<name>.allowedTopologies.*.matchLabelExpressions”Label requirements a node must meet for a volume of this class to be provisioned there.
- Type:
list of (submodule) - Default:
[ ]
classes.<name>.allowedTopologies.*.matchLabelExpressions.*.key
Section titled “classes.<name>.allowedTopologies.*.matchLabelExpressions.*.key”Node label key, such as topology.kubernetes.io/zone.
- Type:
string
classes.<name>.allowedTopologies.*.matchLabelExpressions.*.values
Section titled “classes.<name>.allowedTopologies.*.matchLabelExpressions.*.values”Label values the node must carry one of.
- Type:
list of string - Default:
[ ]
classes.<name>.annotations
Section titled “classes.<name>.annotations”Annotations on the StorageClass. "storageclass.kubernetes.io/is-default-class" = "true"
makes it the cluster default, which the apiserver gives every
claim that names no class.
- Type:
attribute set of string - Default:
{ }
classes.<name>.labels
Section titled “classes.<name>.labels”Labels on the StorageClass.
- Type:
attribute set of string - Default:
{ }
classes.<name>.mountOptions
Section titled “classes.<name>.mountOptions”Mount options for volumes of this class. Omitted from the manifest when empty.
- Type:
list of string - Default:
[ ]
classes.<name>.parameters
Section titled “classes.<name>.parameters”Driver-specific parameters passed to the provisioner. Null values are left out. Omitted from the manifest when empty. The apiserver refuses changes to this field, so changing it means deleting and recreating the class.
- Type:
attribute set of string - Default:
{ }
classes.<name>.provisioner
Section titled “classes.<name>.provisioner”Name of the CSI driver that provisions volumes of this class, such as rancher.io/local-path. The driver must already run in the cluster. The apiserver refuses changes to this field, so changing it means deleting and recreating the class.
- Type:
string
classes.<name>.reclaimPolicy
Section titled “classes.<name>.reclaimPolicy”What happens to a volume when its claim is deleted. The apiserver refuses changes to this field, so changing it means deleting and recreating the class.
- Type:
one of "Delete", "Retain" - Default:
"Delete"
classes.<name>.volumeBindingMode
Section titled “classes.<name>.volumeBindingMode”When a volume is provisioned: as soon as the claim exists, or once a pod using it is scheduled. Node-local drivers need WaitForFirstConsumer. The apiserver refuses changes to this field, so changing it means deleting and recreating the class.
- Type:
one of "Immediate", "WaitForFirstConsumer" - Default:
"Immediate"