vendor: update kube to v1.7.6

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2017-09-18 13:04:23 +02:00
parent e8cfe3b867
commit 5e7c932771
No known key found for this signature in database
GPG key ID: B2BEAD150DE936B9
16 changed files with 893 additions and 870 deletions

View file

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

File diff suppressed because it is too large Load diff

View file

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

View file

@ -700,7 +700,7 @@ type EmptyDirVolumeSource struct {
// The default is nil which means that the limit is undefined.
// More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
// +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.

View file

@ -21,6 +21,7 @@ limitations under the License.
package v1
import (
resource "k8s.io/apimachinery/pkg/api/resource"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
@ -1240,7 +1241,7 @@ func Convert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(in *api.D
func autoConvert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in *EmptyDirVolumeSource, out *api.EmptyDirVolumeSource, s conversion.Scope) error {
out.Medium = api.StorageMedium(in.Medium)
out.SizeLimit = in.SizeLimit
out.SizeLimit = (*resource.Quantity)(unsafe.Pointer(in.SizeLimit))
return nil
}
@ -1251,7 +1252,7 @@ func Convert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in *EmptyDirVol
func autoConvert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in *api.EmptyDirVolumeSource, out *EmptyDirVolumeSource, s conversion.Scope) error {
out.Medium = StorageMedium(in.Medium)
out.SizeLimit = in.SizeLimit
out.SizeLimit = (*resource.Quantity)(unsafe.Pointer(in.SizeLimit))
return nil
}

View file

@ -21,6 +21,7 @@ limitations under the License.
package v1
import (
resource "k8s.io/apimachinery/pkg/api/resource"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
@ -858,7 +859,11 @@ func DeepCopy_v1_EmptyDirVolumeSource(in interface{}, out interface{}, c *conver
in := in.(*EmptyDirVolumeSource)
out := out.(*EmptyDirVolumeSource)
*out = *in
out.SizeLimit = in.SizeLimit.DeepCopy()
if in.SizeLimit != nil {
in, out := &in.SizeLimit, &out.SizeLimit
*out = new(resource.Quantity)
**out = (*in).DeepCopy()
}
return nil
}
}

View file

@ -399,10 +399,13 @@ func validateVolumeSource(source *api.VolumeSource, fldPath *field.Path) field.E
if source.EmptyDir != nil {
numVolumes++
if !utilfeature.DefaultFeatureGate.Enabled(features.LocalStorageCapacityIsolation) {
unsetSizeLimit := resource.Quantity{}
if unsetSizeLimit.Cmp(source.EmptyDir.SizeLimit) != 0 {
if source.EmptyDir.SizeLimit != nil && source.EmptyDir.SizeLimit.Cmp(resource.Quantity{}) != 0 {
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 {
@ -3353,6 +3356,16 @@ func ValidateNodeUpdate(node, oldNode *api.Node) field.ErrorList {
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "podCIDR"), "node updates may not change podCIDR except from \"\" to valid"))
}
}
// Allow controller manager updating provider ID when not set
if len(oldNode.Spec.ProviderID) == 0 {
oldNode.Spec.ProviderID = node.Spec.ProviderID
} else {
if oldNode.Spec.ProviderID != node.Spec.ProviderID {
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "providerID"), "node updates may not change providerID except from \"\" to valid"))
}
}
// TODO: move reset function to its own location
// Ignore metadata changes now that they have been tested
oldNode.ObjectMeta = node.ObjectMeta

View file

@ -21,6 +21,7 @@ limitations under the License.
package api
import (
resource "k8s.io/apimachinery/pkg/api/resource"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
fields "k8s.io/apimachinery/pkg/fields"
@ -860,7 +861,11 @@ func DeepCopy_api_EmptyDirVolumeSource(in interface{}, out interface{}, c *conve
in := in.(*EmptyDirVolumeSource)
out := out.(*EmptyDirVolumeSource)
*out = *in
out.SizeLimit = in.SizeLimit.DeepCopy()
if in.SizeLimit != nil {
in, out := &in.SizeLimit, &out.SizeLimit
*out = new(resource.Quantity)
**out = (*in).DeepCopy()
}
return nil
}
}