Skip to content
Install the CLI

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.

StabilityStable
package valuepackages.storage-classes
RolesstorageClasses

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:

    {
    local-path-retain = {
    provisioner = "rancher.io/local-path";
    reclaimPolicy = "Retain";
    volumeBindingMode = "WaitForFirstConsumer";
    };
    }

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

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: [ ]

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: { }

Labels on the StorageClass.

  • Type: attribute set of string
  • Default: { }

Mount options for volumes of this class. Omitted from the manifest when empty.

  • Type: list of string
  • Default: [ ]

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: { }

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

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"

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"