Skip to content

Commit

Permalink
Merge pull request #99641 from pohly/storage-capacity-beta
Browse files Browse the repository at this point in the history
CSIStorageCapacity beta API
  • Loading branch information
k8s-ci-robot committed Mar 8, 2021
2 parents 7c70213 + 4c7e4c6 commit 14c25ee
Show file tree
Hide file tree
Showing 56 changed files with 3,800 additions and 300 deletions.
1 change: 1 addition & 0 deletions api/api-rules/violation_exceptions.list
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ API rule violation: list_type_missing,k8s.io/api/storage/v1alpha1,CSIStorageCapa
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSIDriverSpec,VolumeLifecycleModes
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSINodeDriver,TopologyKeys
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSINodeSpec,Drivers
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSIStorageCapacityList,Items
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,StorageClass,AllowedTopologies
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,StorageClass,MountOptions
API rule violation: list_type_missing,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,ConversionRequest,Objects
Expand Down
1,226 changes: 1,184 additions & 42 deletions api/openapi-spec/swagger.json

Large diffs are not rendered by default.

20 changes: 18 additions & 2 deletions pkg/apis/storage/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ type CSIDriverSpec struct {
// unset or false and it can be flipped later when storage
// capacity information has been published.
//
// This is an alpha field and only available when the CSIStorageCapacity
// This is a beta field and only available when the CSIStorageCapacity
// feature is enabled. The default is false.
//
// +optional
Expand Down Expand Up @@ -564,7 +564,9 @@ type CSINodeList struct {
//
// The producer of these objects can decide which approach is more suitable.
//
// This is an alpha feature and only available when the CSIStorageCapacity feature is enabled.
// 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.
type CSIStorageCapacity struct {
metav1.TypeMeta
// Standard object's metadata. The name has no particular meaning. It must be
Expand Down Expand Up @@ -607,6 +609,20 @@ type CSIStorageCapacity struct {
//
// +optional
Capacity *resource.Quantity

// MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse
// for a GetCapacityRequest with topology and parameters that match the
// previous fields.
//
// This is defined since CSI spec 1.4.0 as the largest size
// that may be used in a
// CreateVolumeRequest.capacity_range.required_bytes field to
// create a volume with the same parameters as those in
// GetCapacityRequest. The corresponding value in the Kubernetes
// API is ResourceRequirements.Requests in a volume claim.
//
// +optional
MaximumVolumeSize *resource.Quantity
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/storage/v1alpha1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 79 additions & 7 deletions pkg/apis/storage/v1beta1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 14c25ee

Please sign in to comment.