CSIStorageCapacity

final case class CSIStorageCapacity(storageClassName: String, maximumVolumeSize: Option[Quantity], nodeTopology: Option[LabelSelector], metadata: Option[ObjectMeta], capacity: Option[Quantity]) extends KObject

CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.

For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123"

The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero

The producer of these objects can decide which approach is more suitable.

They are consumed by the kube-scheduler when a CSI driver opts into capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler compares the MaximumVolumeSize against the requested size of pending volumes to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back to a comparison against the less precise Capacity. If that is also unset, the scheduler assumes that capacity is insufficient and tries some other node.

Source:
CSIStorageCapacity.scala
trait KObject
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

if capacity has a value, transforms to the result of function

if capacity has a value, transforms to the result of function

Source:
CSIStorageCapacity.scala

if maximumVolumeSize has a value, transforms to the result of function

if maximumVolumeSize has a value, transforms to the result of function

Source:
CSIStorageCapacity.scala

if metadata has a value, transforms to the result of function

if metadata has a value, transforms to the result of function

Source:
CSIStorageCapacity.scala

if nodeTopology has a value, transforms to the result of function

if nodeTopology has a value, transforms to the result of function

Source:
CSIStorageCapacity.scala

transforms storageClassName to result of function

transforms storageClassName to result of function

Source:
CSIStorageCapacity.scala

Returns a new data with capacity set to new value

Returns a new data with capacity set to new value

Source:
CSIStorageCapacity.scala

Returns a new data with maximumVolumeSize set to new value

Returns a new data with maximumVolumeSize set to new value

Source:
CSIStorageCapacity.scala

Returns a new data with metadata set to new value

Returns a new data with metadata set to new value

Source:
CSIStorageCapacity.scala

Returns a new data with nodeTopology set to new value

Returns a new data with nodeTopology set to new value

Source:
CSIStorageCapacity.scala

Returns a new data with storageClassName set to new value

Returns a new data with storageClassName set to new value

Source:
CSIStorageCapacity.scala

Inherited methods

final def group: String
Inherited from:
KObject
Source:
ResourceKind.scala
Inherited from:
Product

Inherited fields

final lazy val apiVersion: String
Inherited from:
KObject
Source:
ResourceKind.scala
final lazy val kind: String
Inherited from:
KObject
Source:
ResourceKind.scala
final lazy val version: String
Inherited from:
KObject
Source:
ResourceKind.scala