Merge pull request #50163 from jingxu97/Aug/sizeLimit

Automatic merge from submit-queue (batch tested with PRs 51707, 51662, 51723, 50163, 51633)

Change SizeLimit to a pointer

This PR fixes issue #50121

```release-note
The `emptyDir.sizeLimit` field is now correctly omitted from API requests and responses when unset.
```
This commit is contained in:
Kubernetes Submit Queue
2017-08-31 18:43:38 -07:00
committed by GitHub
15 changed files with 917 additions and 874 deletions

View File

@@ -651,7 +651,7 @@ type EmptyDirVolumeSource struct {
// The default is nil which means that the limit is undefined. // The default is nil which means that the limit is undefined.
// More info: http://kubernetes.io/docs/user-guide/volumes#emptydir // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
// +optional // +optional
SizeLimit resource.Quantity SizeLimit *resource.Quantity
} }
// StorageMedium defines ways that storage can be allocated to a volume. // StorageMedium defines ways that storage can be allocated to a volume.

View File

@@ -23,6 +23,7 @@ go_library(
"//pkg/util/parsers:go_default_library", "//pkg/util/parsers:go_default_library",
"//pkg/util/pointer:go_default_library", "//pkg/util/pointer:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",

View File

@@ -22,6 +22,7 @@ package v1
import ( import (
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resource "k8s.io/apimachinery/pkg/api/resource"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
@@ -1329,7 +1330,7 @@ func Convert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(in *api.D
func autoConvert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in *v1.EmptyDirVolumeSource, out *api.EmptyDirVolumeSource, s conversion.Scope) error { func autoConvert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in *v1.EmptyDirVolumeSource, out *api.EmptyDirVolumeSource, s conversion.Scope) error {
out.Medium = api.StorageMedium(in.Medium) out.Medium = api.StorageMedium(in.Medium)
out.SizeLimit = in.SizeLimit out.SizeLimit = (*resource.Quantity)(unsafe.Pointer(in.SizeLimit))
return nil return nil
} }
@@ -1340,7 +1341,7 @@ func Convert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in *v1.EmptyDir
func autoConvert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in *api.EmptyDirVolumeSource, out *v1.EmptyDirVolumeSource, s conversion.Scope) error { func autoConvert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in *api.EmptyDirVolumeSource, out *v1.EmptyDirVolumeSource, s conversion.Scope) error {
out.Medium = v1.StorageMedium(in.Medium) out.Medium = v1.StorageMedium(in.Medium)
out.SizeLimit = in.SizeLimit out.SizeLimit = (*resource.Quantity)(unsafe.Pointer(in.SizeLimit))
return nil return nil
} }

View File

@@ -386,10 +386,13 @@ func validateVolumeSource(source *api.VolumeSource, fldPath *field.Path, volName
if source.EmptyDir != nil { if source.EmptyDir != nil {
numVolumes++ numVolumes++
if !utilfeature.DefaultFeatureGate.Enabled(features.LocalStorageCapacityIsolation) { if !utilfeature.DefaultFeatureGate.Enabled(features.LocalStorageCapacityIsolation) {
unsetSizeLimit := resource.Quantity{} if source.EmptyDir.SizeLimit != nil && source.EmptyDir.SizeLimit.Cmp(resource.Quantity{}) != 0 {
if unsetSizeLimit.Cmp(source.EmptyDir.SizeLimit) != 0 {
allErrs = append(allErrs, field.Forbidden(fldPath.Child("emptyDir").Child("sizeLimit"), "SizeLimit field disabled by feature-gate for EmptyDir volumes")) allErrs = append(allErrs, field.Forbidden(fldPath.Child("emptyDir").Child("sizeLimit"), "SizeLimit field disabled by feature-gate for EmptyDir volumes"))
} }
} else {
if source.EmptyDir.SizeLimit != nil && source.EmptyDir.SizeLimit.Cmp(resource.Quantity{}) < 0 {
allErrs = append(allErrs, field.Forbidden(fldPath.Child("emptyDir").Child("sizeLimit"), "SizeLimit field must be a valid resource quantity"))
}
} }
} }
if source.HostPath != nil { if source.HostPath != nil {

View File

@@ -2656,7 +2656,7 @@ func TestValidateVolumes(t *testing.T) {
func TestAlphaLocalStorageCapacityIsolation(t *testing.T) { func TestAlphaLocalStorageCapacityIsolation(t *testing.T) {
testCases := []api.VolumeSource{ testCases := []api.VolumeSource{
{EmptyDir: &api.EmptyDirVolumeSource{SizeLimit: *resource.NewQuantity(int64(5), resource.BinarySI)}}, {EmptyDir: &api.EmptyDirVolumeSource{SizeLimit: resource.NewQuantity(int64(5), resource.BinarySI)}},
} }
// Enable alpha feature LocalStorageCapacityIsolation // Enable alpha feature LocalStorageCapacityIsolation
err := utilfeature.DefaultFeatureGate.Set("LocalStorageCapacityIsolation=true") err := utilfeature.DefaultFeatureGate.Set("LocalStorageCapacityIsolation=true")

View File

@@ -21,6 +21,7 @@ limitations under the License.
package api package api
import ( import (
resource "k8s.io/apimachinery/pkg/api/resource"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
@@ -1787,7 +1788,15 @@ func (in *DownwardAPIVolumeSource) DeepCopy() *DownwardAPIVolumeSource {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EmptyDirVolumeSource) DeepCopyInto(out *EmptyDirVolumeSource) { func (in *EmptyDirVolumeSource) DeepCopyInto(out *EmptyDirVolumeSource) {
*out = *in *out = *in
out.SizeLimit = in.SizeLimit.DeepCopy() if in.SizeLimit != nil {
in, out := &in.SizeLimit, &out.SizeLimit
if *in == nil {
*out = nil
} else {
*out = new(resource.Quantity)
**out = (*in).DeepCopy()
}
}
return return
} }

View File

@@ -496,7 +496,7 @@ func (m *managerImpl) emptyDirLimitEviction(podStats statsapi.PodStats, pod *v1.
if source.EmptyDir != nil { if source.EmptyDir != nil {
size := source.EmptyDir.SizeLimit size := source.EmptyDir.SizeLimit
used := podVolumeUsed[pod.Spec.Volumes[i].Name] used := podVolumeUsed[pod.Spec.Volumes[i].Name]
if used != nil && size.Sign() == 1 && used.Cmp(size) > 0 { if used != nil && size != nil && size.Sign() == 1 && used.Cmp(*size) > 0 {
// the emptyDir usage exceeds the size limit, evict the pod // the emptyDir usage exceeds the size limit, evict the pod
return m.evictPod(pod, v1.ResourceName("EmptyDir"), fmt.Sprintf("emptyDir usage exceeds the limit %q", size.String())) return m.evictPod(pod, v1.ResourceName("EmptyDir"), fmt.Sprintf("emptyDir usage exceeds the limit %q", size.String()))
} }

View File

@@ -124,7 +124,7 @@ func addStorageLimit(pod *v1.Pod, sizeLimit int64, medium v1.StorageMedium) *v1.
Name: "emptyDirVolumeName", Name: "emptyDirVolumeName",
VolumeSource: v1.VolumeSource{ VolumeSource: v1.VolumeSource{
EmptyDir: &v1.EmptyDirVolumeSource{ EmptyDir: &v1.EmptyDirVolumeSource{
SizeLimit: *resource.NewQuantity(sizeLimit, resource.BinarySI), SizeLimit: resource.NewQuantity(sizeLimit, resource.BinarySI),
Medium: medium, Medium: medium,
}, },
}, },

View File

@@ -3314,88 +3314,88 @@ func init() {
} }
var fileDescriptorGenerated = []byte{ var fileDescriptorGenerated = []byte{
// 1320 bytes of a gzipped FileDescriptorProto // 1317 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6f, 0x1b, 0x45, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcb, 0x6f, 0x5b, 0xc5,
0x14, 0x8f, 0x1d, 0x27, 0x0d, 0xe3, 0x34, 0x29, 0xd3, 0xaa, 0x75, 0x53, 0x6a, 0x47, 0x2b, 0x84, 0x17, 0x8e, 0x1d, 0x27, 0xcd, 0x6f, 0x9c, 0x26, 0xfd, 0x4d, 0xab, 0xd6, 0x4d, 0xa9, 0x1d, 0x5d,
0x5a, 0x50, 0x77, 0x89, 0xdb, 0xa2, 0x1e, 0x10, 0x52, 0x6c, 0x04, 0xad, 0x48, 0xda, 0x32, 0x0d, 0x21, 0x54, 0x40, 0xbd, 0x97, 0xb8, 0x2d, 0xea, 0x02, 0x21, 0xc5, 0x46, 0xd0, 0x8a, 0xa4, 0x2d,
0x05, 0xf1, 0x3d, 0xd9, 0x9d, 0x3a, 0x43, 0xbc, 0x1f, 0x9a, 0x19, 0x47, 0xa4, 0x02, 0x89, 0x0b, 0xd3, 0x50, 0x10, 0xef, 0xc9, 0xbd, 0x53, 0x67, 0x88, 0xef, 0x43, 0x33, 0x63, 0x8b, 0x54, 0x20,
0x77, 0x2e, 0x95, 0xf8, 0x27, 0x38, 0xc3, 0x19, 0x84, 0xd4, 0x0b, 0xa2, 0xc7, 0x0a, 0x09, 0x8b, 0xb1, 0x61, 0xcf, 0xa6, 0x12, 0xff, 0x04, 0x6b, 0x58, 0x83, 0x90, 0xba, 0x41, 0x74, 0x59, 0x21,
0x9a, 0xff, 0xa2, 0x27, 0x34, 0x1f, 0xfb, 0x65, 0x7b, 0xeb, 0xd4, 0x84, 0x8f, 0xdb, 0xee, 0xbc, 0x61, 0x51, 0xf3, 0x5f, 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06, 0xf5, 0x18, 0xd6, 0x4b, 0x0f, 0x87, 0xf5, 0xd2, 0xa3, 0x61, 0xbd, 0xf4, 0xfb, 0xb0, 0x5e, 0xfa, 0xfa,
0xd2, 0x37, 0x7f, 0xd6, 0x67, 0xde, 0x5f, 0x88, 0x07, 0xdf, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xfa, 0xcc, 0x7b, 0x0b, 0xf1, 0xe0, 0xfb, 0x33, 0x00, 0x00, 0xff, 0xff, 0x57, 0x59, 0x55,
0xaf, 0x1f, 0x57, 0xd9, 0xcd, 0x12, 0x00, 0x00, 0xf6, 0xa2, 0x12, 0x00, 0x00,
} }

View File

@@ -21,7 +21,6 @@ syntax = 'proto2';
package k8s.io.api.autoscaling.v2alpha1; package k8s.io.api.autoscaling.v2alpha1;
import "k8s.io/api/autoscaling/v1/generated.proto";
import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";

File diff suppressed because it is too large Load Diff

View File

@@ -11638,7 +11638,7 @@ func (x *EmptyDirVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
_, _, _ = yysep2, yyq2, yy2arr2 _, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false const yyr2 bool = false
yyq2[0] = x.Medium != "" yyq2[0] = x.Medium != ""
yyq2[1] = true yyq2[1] = x.SizeLimit != nil
var yynn2 int var yynn2 int
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
r.EncodeArrayStart(2) r.EncodeArrayStart(2)
@@ -11670,15 +11670,18 @@ func (x *EmptyDirVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[1] { if yyq2[1] {
yy7 := &x.SizeLimit if x.SizeLimit == nil {
yym8 := z.EncBinary() r.EncodeNil()
_ = yym8
if false {
} else if z.HasExtensions() && z.EncExt(yy7) {
} else if !yym8 && z.IsJSONHandle() {
z.EncJSONMarshal(yy7)
} else { } else {
z.EncFallback(yy7) yym7 := z.EncBinary()
_ = yym7
if false {
} else if z.HasExtensions() && z.EncExt(x.SizeLimit) {
} else if !yym7 && z.IsJSONHandle() {
z.EncJSONMarshal(x.SizeLimit)
} else {
z.EncFallback(x.SizeLimit)
}
} }
} else { } else {
r.EncodeNil() r.EncodeNil()
@@ -11688,15 +11691,18 @@ func (x *EmptyDirVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("sizeLimit")) r.EncodeString(codecSelferC_UTF81234, string("sizeLimit"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy9 := &x.SizeLimit if x.SizeLimit == nil {
yym10 := z.EncBinary() r.EncodeNil()
_ = yym10
if false {
} else if z.HasExtensions() && z.EncExt(yy9) {
} else if !yym10 && z.IsJSONHandle() {
z.EncJSONMarshal(yy9)
} else { } else {
z.EncFallback(yy9) yym8 := z.EncBinary()
_ = yym8
if false {
} else if z.HasExtensions() && z.EncExt(x.SizeLimit) {
} else if !yym8 && z.IsJSONHandle() {
z.EncJSONMarshal(x.SizeLimit)
} else {
z.EncFallback(x.SizeLimit)
}
} }
} }
} }
@@ -11770,17 +11776,21 @@ func (x *EmptyDirVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decode
} }
case "sizeLimit": case "sizeLimit":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.SizeLimit = pkg3_resource.Quantity{} if x.SizeLimit != nil {
x.SizeLimit = nil
}
} else { } else {
yyv5 := &x.SizeLimit if x.SizeLimit == nil {
x.SizeLimit = new(pkg3_resource.Quantity)
}
yym6 := z.DecBinary() yym6 := z.DecBinary()
_ = yym6 _ = yym6
if false { if false {
} else if z.HasExtensions() && z.DecExt(yyv5) { } else if z.HasExtensions() && z.DecExt(x.SizeLimit) {
} else if !yym6 && z.IsJSONHandle() { } else if !yym6 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv5) z.DecJSONUnmarshal(x.SizeLimit)
} else { } else {
z.DecFallback(yyv5, false) z.DecFallback(x.SizeLimit, false)
} }
} }
default: default:
@@ -11826,17 +11836,21 @@ func (x *EmptyDirVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Deco
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.SizeLimit = pkg3_resource.Quantity{} if x.SizeLimit != nil {
x.SizeLimit = nil
}
} else { } else {
yyv9 := &x.SizeLimit if x.SizeLimit == nil {
x.SizeLimit = new(pkg3_resource.Quantity)
}
yym10 := z.DecBinary() yym10 := z.DecBinary()
_ = yym10 _ = yym10
if false { if false {
} else if z.HasExtensions() && z.DecExt(yyv9) { } else if z.HasExtensions() && z.DecExt(x.SizeLimit) {
} else if !yym10 && z.IsJSONHandle() { } else if !yym10 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv9) z.DecJSONUnmarshal(x.SizeLimit)
} else { } else {
z.DecFallback(yyv9, false) z.DecFallback(x.SizeLimit, false)
} }
} }
for { for {

View File

@@ -739,7 +739,7 @@ type EmptyDirVolumeSource struct {
// The default is nil which means that the limit is undefined. // The default is nil which means that the limit is undefined.
// More info: http://kubernetes.io/docs/user-guide/volumes#emptydir // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
// +optional // +optional
SizeLimit resource.Quantity `json:"sizeLimit,omitempty" protobuf:"bytes,2,opt,name=sizeLimit"` SizeLimit *resource.Quantity `json:"sizeLimit,omitempty" protobuf:"bytes,2,opt,name=sizeLimit"`
} }
// Represents a Glusterfs mount that lasts the lifetime of a pod. // Represents a Glusterfs mount that lasts the lifetime of a pod.

View File

@@ -21,6 +21,7 @@ limitations under the License.
package v1 package v1
import ( import (
resource "k8s.io/apimachinery/pkg/api/resource"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
@@ -1787,7 +1788,15 @@ func (in *DownwardAPIVolumeSource) DeepCopy() *DownwardAPIVolumeSource {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EmptyDirVolumeSource) DeepCopyInto(out *EmptyDirVolumeSource) { func (in *EmptyDirVolumeSource) DeepCopyInto(out *EmptyDirVolumeSource) {
*out = *in *out = *in
out.SizeLimit = in.SizeLimit.DeepCopy() if in.SizeLimit != nil {
in, out := &in.SizeLimit, &out.SizeLimit
if *in == nil {
*out = nil
} else {
*out = new(resource.Quantity)
**out = (*in).DeepCopy()
}
}
return return
} }

View File

@@ -75,7 +75,7 @@ var _ = framework.KubeDescribe("LocalStorageCapacityIsolationEviction [Slow] [Se
Name: emptyDirVolumeName, Name: emptyDirVolumeName,
VolumeSource: v1.VolumeSource{ VolumeSource: v1.VolumeSource{
EmptyDir: &v1.EmptyDirVolumeSource{ EmptyDir: &v1.EmptyDirVolumeSource{
SizeLimit: *resource.NewQuantity(int64(1000), resource.BinarySI), SizeLimit: resource.NewQuantity(int64(1000), resource.BinarySI),
}, },
}, },
}, },
@@ -112,7 +112,7 @@ var _ = framework.KubeDescribe("LocalStorageCapacityIsolationEviction [Slow] [Se
VolumeSource: v1.VolumeSource{ VolumeSource: v1.VolumeSource{
EmptyDir: &v1.EmptyDirVolumeSource{ EmptyDir: &v1.EmptyDirVolumeSource{
Medium: "Memory", Medium: "Memory",
SizeLimit: *resource.NewQuantity(int64(10000), resource.BinarySI), SizeLimit: resource.NewQuantity(int64(10000), resource.BinarySI),
}, },
}, },
}, },
@@ -148,7 +148,7 @@ var _ = framework.KubeDescribe("LocalStorageCapacityIsolationEviction [Slow] [Se
Name: emptyDirVolumeName, Name: emptyDirVolumeName,
VolumeSource: v1.VolumeSource{ VolumeSource: v1.VolumeSource{
EmptyDir: &v1.EmptyDirVolumeSource{ EmptyDir: &v1.EmptyDirVolumeSource{
SizeLimit: *resource.NewQuantity(int64(100000), resource.BinarySI), SizeLimit: resource.NewQuantity(int64(100000), resource.BinarySI),
}, },
}, },
}, },
@@ -218,7 +218,7 @@ var _ = framework.KubeDescribe("LocalStorageCapacityIsolationEviction [Slow] [Se
Name: emptyDirVolumeName, Name: emptyDirVolumeName,
VolumeSource: v1.VolumeSource{ VolumeSource: v1.VolumeSource{
EmptyDir: &v1.EmptyDirVolumeSource{ EmptyDir: &v1.EmptyDirVolumeSource{
SizeLimit: *resource.NewQuantity(int64(100000), resource.BinarySI), SizeLimit: resource.NewQuantity(int64(100000), resource.BinarySI),
}, },
}, },
}, },