kubernetes.client.models.v1_csi_storage_capacity module

Kubernetes

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: release-1.36 Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

class kubernetes.client.models.v1_csi_storage_capacity.V1CSIStorageCapacity(*, api_version: Annotated[str, Strict(strict=True)] | None = None, capacity: Annotated[str, Strict(strict=True)] | None = None, kind: Annotated[str, Strict(strict=True)] | None = None, maximum_volume_size: Annotated[str, Strict(strict=True)] | None = None, metadata: V1ObjectMeta | None = None, node_topology: V1LabelSelector | None = None, storage_class_name: Annotated[str, Strict(strict=True)])

Bases: BaseModel

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.

Attributes:
openapi_types (dict): The key is attribute name

and the value is attribute type.

attribute_map (dict): The key is attribute name

and the value is json key in definition.

api_version: StrictStr | None
attribute_map: ClassVar[Dict[str, str]] = {'api_version': 'apiVersion', 'capacity': 'capacity', 'kind': 'kind', 'maximum_volume_size': 'maximumVolumeSize', 'metadata': 'metadata', 'node_topology': 'nodeTopology', 'storage_class_name': 'storageClassName'}
capacity: StrictStr | None
classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of V1CSIStorageCapacity from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of V1CSIStorageCapacity from a JSON string

kind: StrictStr | None
maximum_volume_size: StrictStr | None
metadata: V1ObjectMeta | None
model_config = {'extra': 'forbid', 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

node_topology: V1LabelSelector | None
openapi_types: ClassVar[Dict[str, str]] = {'api_version': 'str', 'capacity': 'str', 'kind': 'str', 'maximum_volume_size': 'str', 'metadata': 'V1ObjectMeta', 'node_topology': 'V1LabelSelector', 'storage_class_name': 'str'}
storage_class_name: StrictStr
to_dict(serialize: bool = False) Dict[str, Any]

Return all declared model fields using public or wire names.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model