class K8S::Api::Storage::V1alpha1::CSIStorageCapacity

Overview

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"]("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 if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.

Included Modules

Defined in:

versions/v1.22/api/storage/v1alpha1/csi_storage_capacity.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module K8S::Kubernetes::Resource::Object

api_version : String api_version, kind : String kind, metadata : Apimachinery::Apis::Meta::V1::ObjectMeta? metadata, metadata! : Apimachinery::Apis::Meta::V1::ObjectMeta metadata!

Instance methods inherited from class K8S::Kubernetes::Resource

api_version : String api_version, kind : String kind

Constructor methods inherited from class K8S::Kubernetes::Resource

new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
new(pull : JSON::PullParser)
new

Class methods inherited from class K8S::Kubernetes::Resource

from_file(file) from_file

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(*, storage_class_name : String, capacity : Int32 | String | Nil = nil, maximum_volume_size : Int32 | String | Nil = nil, metadata : Apimachinery::Apis::Meta::V1::ObjectMeta? = nil, node_topology : Apimachinery::Apis::Meta::V1::LabelSelector? = nil) #

[View source]

Class Method Detail

def self.from_h(hash) #

[View source]

Instance Method Detail

def api_version : String #

[View source]
def capacity : Int32 | String | Nil #

[View source]
def capacity=(capacity : Int32 | String | Nil) #

[View source]
def kind : String #

[View source]
def maximum_volume_size : Int32 | String | Nil #

[View source]
def maximum_volume_size=(maximum_volume_size : Int32 | String | Nil) #

[View source]
def merge(other) #

[View source]

[View source]
def metadata=(metadata : Apimachinery::Apis::Meta::V1::ObjectMeta?) #

[View source]

[View source]
def node_topology=(node_topology : Apimachinery::Apis::Meta::V1::LabelSelector?) #

[View source]
def storage_class_name : String #

[View source]
def storage_class_name=(storage_class_name : String) #

[View source]
def to_h #

[View source]