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

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
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CSIStorageCapacity
  2. KObject
  3. Product
  4. Equals
  5. Serializable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new CSIStorageCapacity(storageClassName: String, maximumVolumeSize: Option[Quantity] = None, nodeTopology: Option[LabelSelector] = None, metadata: Option[ObjectMeta] = None, capacity: Option[Quantity] = None)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val _resourceKind: ResourceKind
    Attributes
    protected
    Definition Classes
    CSIStorageCapacityKObject
  5. final lazy val apiVersion: String
    Definition Classes
    KObject
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val capacity: Option[Quantity]
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. def foldTo[T](implicit arg0: Builder[T]): T
    Definition Classes
    CSIStorageCapacityKObject
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def group: String
    Definition Classes
    KObject
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final lazy val kind: String
    Definition Classes
    KObject
  16. def mapCapacity(f: (Quantity) => Quantity): CSIStorageCapacity

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

  17. def mapMaximumVolumeSize(f: (Quantity) => Quantity): CSIStorageCapacity

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

  18. def mapMetadata(f: (ObjectMeta) => ObjectMeta): CSIStorageCapacity

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

  19. def mapNodeTopology(f: (LabelSelector) => LabelSelector): CSIStorageCapacity

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

  20. def mapStorageClassName(f: (String) => String): CSIStorageCapacity

    transforms storageClassName to result of function

  21. val maximumVolumeSize: Option[Quantity]
  22. val metadata: Option[ObjectMeta]
  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. val nodeTopology: Option[LabelSelector]
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. def productElementNames: Iterator[String]
    Definition Classes
    Product
  28. val storageClassName: String
  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. final lazy val version: String
    Definition Classes
    KObject
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  34. def withCapacity(value: Quantity): CSIStorageCapacity

    Returns a new data with capacity set to new value

  35. def withMaximumVolumeSize(value: Quantity): CSIStorageCapacity

    Returns a new data with maximumVolumeSize set to new value

  36. def withMetadata(value: ObjectMeta): CSIStorageCapacity

    Returns a new data with metadata set to new value

  37. def withNodeTopology(value: LabelSelector): CSIStorageCapacity

    Returns a new data with nodeTopology set to new value

  38. def withStorageClassName(value: String): CSIStorageCapacity

    Returns a new data with storageClassName set to new value

Inherited from KObject

Inherited from Product

Inherited from Equals

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped