storage capacity: clarify relationship between capacity fields

This commit is contained in:
Patrick Ohly 2022-03-09 16:43:27 +01:00
parent 921edae2b4
commit 5122b6bb92
4 changed files with 33 additions and 13 deletions

View File

@ -572,8 +572,13 @@ type CSINodeList struct {
//
// The producer of these objects can decide which approach is more suitable.
//
// They are consumed by the kube-scheduler if a CSI driver opts into
// capacity-aware scheduling with CSIDriverSpec.StorageCapacity.
// 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.
type CSIStorageCapacity struct {
metav1.TypeMeta
// Standard object's metadata. The name has no particular meaning. It must be
@ -591,7 +596,7 @@ type CSIStorageCapacity struct {
// NodeTopology defines which nodes have access to the storage
// for which capacity was reported. If not set, the storage is
// not accessible from any node in the cluster. If empty, the
// storage is accessible from all nodes. This field is
// storage is accessible from all nodes. This field is
// immutable.
//
// +optional
@ -612,7 +617,7 @@ type CSIStorageCapacity struct {
// The semantic is currently (CSI spec 1.2) defined as:
// The available capacity, in bytes, of the storage that can be used
// to provision volumes. If not set, that information is currently
// unavailable and treated like zero capacity.
// unavailable.
//
// +optional
Capacity *resource.Quantity

View File

@ -579,8 +579,13 @@ type CSINodeList struct {
//
// The producer of these objects can decide which approach is more suitable.
//
// They are consumed by the kube-scheduler if a CSI driver opts into
// capacity-aware scheduling with CSIDriverSpec.StorageCapacity.
// 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.
type CSIStorageCapacity struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata. The name has no particular meaning. It must be
@ -619,7 +624,7 @@ type CSIStorageCapacity struct {
// The semantic is currently (CSI spec 1.2) defined as:
// The available capacity, in bytes, of the storage that can be used
// to provision volumes. If not set, that information is currently
// unavailable and treated like zero capacity.
// unavailable.
//
// +optional
Capacity *resource.Quantity `json:"capacity,omitempty" protobuf:"bytes,4,opt,name=capacity"`

View File

@ -165,8 +165,13 @@ type VolumeError struct {
//
// The producer of these objects can decide which approach is more suitable.
//
// They are consumed by the kube-scheduler if a CSI driver opts into
// capacity-aware scheduling with CSIDriverSpec.StorageCapacity.
// 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.
type CSIStorageCapacity struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata. The name has no particular meaning. It must be
@ -205,7 +210,7 @@ type CSIStorageCapacity struct {
// The semantic is currently (CSI spec 1.2) defined as:
// The available capacity, in bytes, of the storage that can be used
// to provision volumes. If not set, that information is currently
// unavailable and treated like zero capacity.
// unavailable.
//
// +optional
Capacity *resource.Quantity `json:"capacity,omitempty" protobuf:"bytes,4,opt,name=capacity"`

View File

@ -604,8 +604,13 @@ type CSINodeList struct {
//
// The producer of these objects can decide which approach is more suitable.
//
// They are consumed by the kube-scheduler if a CSI driver opts into
// capacity-aware scheduling with CSIDriverSpec.StorageCapacity.
// 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.
type CSIStorageCapacity struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata. The name has no particular meaning. It must be
@ -644,7 +649,7 @@ type CSIStorageCapacity struct {
// The semantic is currently (CSI spec 1.2) defined as:
// The available capacity, in bytes, of the storage that can be used
// to provision volumes. If not set, that information is currently
// unavailable and treated like zero capacity.
// unavailable.
//
// +optional
Capacity *resource.Quantity `json:"capacity,omitempty" protobuf:"bytes,4,opt,name=capacity"`