Class KubeCsiStorageCapacity
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.ApiObject
-
- org.cdk8s.plus24.k8s.KubeCsiStorageCapacity
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.75.0 (build 63bb957)", date="2023-02-20T02:42:02.123Z") @Stability(Stable) public class KubeCsiStorageCapacity extends org.cdk8s.ApiObject
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KubeCsiStorageCapacity.Builder
A fluent builder forKubeCsiStorageCapacity
.
-
Field Summary
Fields Modifier and Type Field Description static org.cdk8s.GroupVersionKind
GVK
Returns the apiVersion and kind for "io.k8s.api.storage.v1.CSIStorageCapacity".
-
Constructor Summary
Constructors Modifier Constructor Description protected
KubeCsiStorageCapacity(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected
KubeCsiStorageCapacity(software.amazon.jsii.JsiiObjectRef objRef)
KubeCsiStorageCapacity(software.constructs.Construct scope, String id, KubeCsiStorageCapacityProps props)
Defines a "io.k8s.api.storage.v1.CSIStorageCapacity" API object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Object
manifest(KubeCsiStorageCapacityProps props)
Renders a Kubernetes manifest for "io.k8s.api.storage.v1.CSIStorageCapacity".Object
toJson()
Renders the object to Kubernetes JSON.-
Methods inherited from class org.cdk8s.ApiObject
addDependency, addJsonPatch, getApiGroup, getApiVersion, getChart, getKind, getMetadata, getName, of
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
KubeCsiStorageCapacity
protected KubeCsiStorageCapacity(software.amazon.jsii.JsiiObjectRef objRef)
-
KubeCsiStorageCapacity
protected KubeCsiStorageCapacity(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
KubeCsiStorageCapacity
@Stability(Stable) public KubeCsiStorageCapacity(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull KubeCsiStorageCapacityProps props)
Defines a "io.k8s.api.storage.v1.CSIStorageCapacity" API object.- Parameters:
scope
- the scope in which to define this object. This parameter is required.id
- a scope-local name for the object. This parameter is required.props
- initialization props. This parameter is required.
-
-
Method Detail
-
manifest
@Stability(Stable) @NotNull public static Object manifest(@NotNull KubeCsiStorageCapacityProps props)
Renders a Kubernetes manifest for "io.k8s.api.storage.v1.CSIStorageCapacity".This can be used to inline resource manifests inside other objects (e.g. as templates).
- Parameters:
props
- initialization props. This parameter is required.
-
toJson
@Stability(Stable) @NotNull public Object toJson()
Renders the object to Kubernetes JSON.- Overrides:
toJson
in classorg.cdk8s.ApiObject
-
-