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
- Alphabetic
- By Inheritance
- CSIStorageCapacity
- KObject
- Product
- Equals
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new CSIStorageCapacity(storageClassName: String, maximumVolumeSize: Option[Quantity] = None, nodeTopology: Option[LabelSelector] = None, metadata: Option[ObjectMeta] = None, capacity: Option[Quantity] = None)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val _resourceKind: ResourceKind
- Attributes
- protected
- Definition Classes
- CSIStorageCapacity → KObject
- final lazy val apiVersion: String
- Definition Classes
- KObject
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val capacity: Option[Quantity]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def foldTo[T](implicit arg0: Builder[T]): T
- Definition Classes
- CSIStorageCapacity → KObject
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def group: String
- Definition Classes
- KObject
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final lazy val kind: String
- Definition Classes
- KObject
- def mapCapacity(f: (Quantity) => Quantity): CSIStorageCapacity
if capacity has a value, transforms to the result of function
- def mapMaximumVolumeSize(f: (Quantity) => Quantity): CSIStorageCapacity
if maximumVolumeSize has a value, transforms to the result of function
- def mapMetadata(f: (ObjectMeta) => ObjectMeta): CSIStorageCapacity
if metadata has a value, transforms to the result of function
- def mapNodeTopology(f: (LabelSelector) => LabelSelector): CSIStorageCapacity
if nodeTopology has a value, transforms to the result of function
- def mapStorageClassName(f: (String) => String): CSIStorageCapacity
transforms storageClassName to result of function
- val maximumVolumeSize: Option[Quantity]
- val metadata: Option[ObjectMeta]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val nodeTopology: Option[LabelSelector]
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val storageClassName: String
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final lazy val version: String
- Definition Classes
- KObject
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withCapacity(value: Quantity): CSIStorageCapacity
Returns a new data with capacity set to new value
- def withMaximumVolumeSize(value: Quantity): CSIStorageCapacity
Returns a new data with maximumVolumeSize set to new value
- def withMetadata(value: ObjectMeta): CSIStorageCapacity
Returns a new data with metadata set to new value
- def withNodeTopology(value: LabelSelector): CSIStorageCapacity
Returns a new data with nodeTopology set to new value
- def withStorageClassName(value: String): CSIStorageCapacity
Returns a new data with storageClassName set to new value