diff --git a/pkg/apis/storage/types.go b/pkg/apis/storage/types.go index 68f344aef2f..6c6fd11d804 100644 --- a/pkg/apis/storage/types.go +++ b/pkg/apis/storage/types.go @@ -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 diff --git a/staging/src/k8s.io/api/storage/v1/types.go b/staging/src/k8s.io/api/storage/v1/types.go index c054464acf7..4812287abf6 100644 --- a/staging/src/k8s.io/api/storage/v1/types.go +++ b/staging/src/k8s.io/api/storage/v1/types.go @@ -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"` diff --git a/staging/src/k8s.io/api/storage/v1alpha1/types.go b/staging/src/k8s.io/api/storage/v1alpha1/types.go index e819ce29d1d..fe8c9e3cd0a 100644 --- a/staging/src/k8s.io/api/storage/v1alpha1/types.go +++ b/staging/src/k8s.io/api/storage/v1alpha1/types.go @@ -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"` diff --git a/staging/src/k8s.io/api/storage/v1beta1/types.go b/staging/src/k8s.io/api/storage/v1beta1/types.go index 1c4ba7f5f34..b39414b9605 100644 --- a/staging/src/k8s.io/api/storage/v1beta1/types.go +++ b/staging/src/k8s.io/api/storage/v1beta1/types.go @@ -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"`