Merge branch 'master' of github.com:kubernetes/kubernetes

This commit is contained in:
Yinan Li
2017-08-03 11:54:44 -07:00
744 changed files with 62087 additions and 31514 deletions

View File

@@ -43,6 +43,8 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
Convert_apps_StatefulSetUpdateStrategy_To_v1beta2_StatefulSetUpdateStrategy,
Convert_extensions_RollingUpdateDaemonSet_To_v1beta2_RollingUpdateDaemonSet,
Convert_v1beta2_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet,
Convert_v1beta2_StatefulSetStatus_To_apps_StatefulSetStatus,
Convert_apps_StatefulSetStatus_To_v1beta2_StatefulSetStatus,
// extensions
// TODO: below conversions should be dropped in favor of auto-generated
// ones, see https://github.com/kubernetes/kubernetes/issues/39865
@@ -223,6 +225,31 @@ func Convert_apps_StatefulSetUpdateStrategy_To_v1beta2_StatefulSetUpdateStrategy
return nil
}
func Convert_v1beta2_StatefulSetStatus_To_apps_StatefulSetStatus(in *appsv1beta2.StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error {
out.ObservedGeneration = new(int64)
*out.ObservedGeneration = in.ObservedGeneration
out.Replicas = in.Replicas
out.ReadyReplicas = in.ReadyReplicas
out.CurrentReplicas = in.CurrentReplicas
out.UpdatedReplicas = in.UpdatedReplicas
out.CurrentRevision = in.CurrentRevision
out.UpdateRevision = in.UpdateRevision
return nil
}
func Convert_apps_StatefulSetStatus_To_v1beta2_StatefulSetStatus(in *apps.StatefulSetStatus, out *appsv1beta2.StatefulSetStatus, s conversion.Scope) error {
if in.ObservedGeneration != nil {
out.ObservedGeneration = *in.ObservedGeneration
}
out.Replicas = in.Replicas
out.ReadyReplicas = in.ReadyReplicas
out.CurrentReplicas = in.CurrentReplicas
out.UpdatedReplicas = in.UpdatedReplicas
out.CurrentRevision = in.CurrentRevision
out.UpdateRevision = in.UpdateRevision
return nil
}
func Convert_extensions_ScaleStatus_To_v1beta2_ScaleStatus(in *extensions.ScaleStatus, out *appsv1beta2.ScaleStatus, s conversion.Scope) error {
out.Replicas = int32(in.Replicas)

View File

@@ -102,7 +102,7 @@ func SetDefaults_StatefulSet(obj *appsv1beta2.StatefulSet) {
// in extensions. These addons are:
// - MaxUnavailable during rolling update set to 25% (1 in extensions)
// - MaxSurge value during rolling update set to 25% (1 in extensions)
// - RevisionHistoryLimit set to 2 (not set in extensions)
// - RevisionHistoryLimit set to 10 (not set in extensions)
// - ProgressDeadlineSeconds set to 600s (not set in extensions)
func SetDefaults_Deployment(obj *appsv1beta2.Deployment) {
// Default labels and selector to labels from pod template spec.
@@ -144,7 +144,7 @@ func SetDefaults_Deployment(obj *appsv1beta2.Deployment) {
}
if obj.Spec.RevisionHistoryLimit == nil {
obj.Spec.RevisionHistoryLimit = new(int32)
*obj.Spec.RevisionHistoryLimit = 2
*obj.Spec.RevisionHistoryLimit = 10
}
if obj.Spec.ProgressDeadlineSeconds == nil {
obj.Spec.ProgressDeadlineSeconds = new(int32)

View File

@@ -186,7 +186,7 @@ func TestSetDefaultDeployment(t *testing.T) {
MaxUnavailable: &defaultIntOrString,
},
},
RevisionHistoryLimit: newInt32(2),
RevisionHistoryLimit: newInt32(10),
ProgressDeadlineSeconds: newInt32(600),
Template: defaultTemplate,
},
@@ -213,7 +213,7 @@ func TestSetDefaultDeployment(t *testing.T) {
MaxUnavailable: &defaultIntOrString,
},
},
RevisionHistoryLimit: newInt32(2),
RevisionHistoryLimit: newInt32(10),
ProgressDeadlineSeconds: newInt32(600),
Template: defaultTemplate,
},
@@ -239,7 +239,7 @@ func TestSetDefaultDeployment(t *testing.T) {
MaxUnavailable: &defaultIntOrString,
},
},
RevisionHistoryLimit: newInt32(2),
RevisionHistoryLimit: newInt32(10),
ProgressDeadlineSeconds: newInt32(600),
Template: defaultTemplate,
},

View File

@@ -190,7 +190,7 @@ func autoConvert_apps_StatefulSetSpec_To_v1beta2_StatefulSetSpec(in *apps.Statef
}
func autoConvert_v1beta2_StatefulSetStatus_To_apps_StatefulSetStatus(in *v1beta2.StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error {
out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
// WARNING: in.ObservedGeneration requires manual conversion: inconvertible types (int64 vs *int64)
out.Replicas = in.Replicas
out.ReadyReplicas = in.ReadyReplicas
out.CurrentReplicas = in.CurrentReplicas
@@ -200,13 +200,8 @@ func autoConvert_v1beta2_StatefulSetStatus_To_apps_StatefulSetStatus(in *v1beta2
return nil
}
// Convert_v1beta2_StatefulSetStatus_To_apps_StatefulSetStatus is an autogenerated conversion function.
func Convert_v1beta2_StatefulSetStatus_To_apps_StatefulSetStatus(in *v1beta2.StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error {
return autoConvert_v1beta2_StatefulSetStatus_To_apps_StatefulSetStatus(in, out, s)
}
func autoConvert_apps_StatefulSetStatus_To_v1beta2_StatefulSetStatus(in *apps.StatefulSetStatus, out *v1beta2.StatefulSetStatus, s conversion.Scope) error {
out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
// WARNING: in.ObservedGeneration requires manual conversion: inconvertible types (*int64 vs int64)
out.Replicas = in.Replicas
out.ReadyReplicas = in.ReadyReplicas
out.CurrentReplicas = in.CurrentReplicas
@@ -216,11 +211,6 @@ func autoConvert_apps_StatefulSetStatus_To_v1beta2_StatefulSetStatus(in *apps.St
return nil
}
// Convert_apps_StatefulSetStatus_To_v1beta2_StatefulSetStatus is an autogenerated conversion function.
func Convert_apps_StatefulSetStatus_To_v1beta2_StatefulSetStatus(in *apps.StatefulSetStatus, out *v1beta2.StatefulSetStatus, s conversion.Scope) error {
return autoConvert_apps_StatefulSetStatus_To_v1beta2_StatefulSetStatus(in, out, s)
}
func autoConvert_v1beta2_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(in *v1beta2.StatefulSetUpdateStrategy, out *apps.StatefulSetUpdateStrategy, s conversion.Scope) error {
out.Type = apps.StatefulSetUpdateStrategyType(in.Type)
if in.RollingUpdate != nil {

View File

@@ -28,13 +28,14 @@ import (
reflect "reflect"
)
// Deprecated: register deep-copy functions.
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
@@ -85,19 +86,19 @@ func (in *ControllerRevision) DeepCopyInto(out *ControllerRevision) {
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevision.
func (x *ControllerRevision) DeepCopy() *ControllerRevision {
if x == nil {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevision.
func (in *ControllerRevision) DeepCopy() *ControllerRevision {
if in == nil {
return nil
}
out := new(ControllerRevision)
x.DeepCopyInto(out)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *ControllerRevision) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
func (in *ControllerRevision) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
@@ -119,19 +120,19 @@ func (in *ControllerRevisionList) DeepCopyInto(out *ControllerRevisionList) {
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevisionList.
func (x *ControllerRevisionList) DeepCopy() *ControllerRevisionList {
if x == nil {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevisionList.
func (in *ControllerRevisionList) DeepCopy() *ControllerRevisionList {
if in == nil {
return nil
}
out := new(ControllerRevisionList)
x.DeepCopyInto(out)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *ControllerRevisionList) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
func (in *ControllerRevisionList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
@@ -144,13 +145,13 @@ func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateState
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateStatefulSetStrategy.
func (x *RollingUpdateStatefulSetStrategy) DeepCopy() *RollingUpdateStatefulSetStrategy {
if x == nil {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateStatefulSetStrategy.
func (in *RollingUpdateStatefulSetStrategy) DeepCopy() *RollingUpdateStatefulSetStrategy {
if in == nil {
return nil
}
out := new(RollingUpdateStatefulSetStrategy)
x.DeepCopyInto(out)
in.DeepCopyInto(out)
return out
}
@@ -164,19 +165,19 @@ func (in *StatefulSet) DeepCopyInto(out *StatefulSet) {
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSet.
func (x *StatefulSet) DeepCopy() *StatefulSet {
if x == nil {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSet.
func (in *StatefulSet) DeepCopy() *StatefulSet {
if in == nil {
return nil
}
out := new(StatefulSet)
x.DeepCopyInto(out)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *StatefulSet) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
func (in *StatefulSet) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
@@ -198,19 +199,19 @@ func (in *StatefulSetList) DeepCopyInto(out *StatefulSetList) {
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetList.
func (x *StatefulSetList) DeepCopy() *StatefulSetList {
if x == nil {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetList.
func (in *StatefulSetList) DeepCopy() *StatefulSetList {
if in == nil {
return nil
}
out := new(StatefulSetList)
x.DeepCopyInto(out)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *StatefulSetList) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
func (in *StatefulSetList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
@@ -250,13 +251,13 @@ func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) {
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetSpec.
func (x *StatefulSetSpec) DeepCopy() *StatefulSetSpec {
if x == nil {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetSpec.
func (in *StatefulSetSpec) DeepCopy() *StatefulSetSpec {
if in == nil {
return nil
}
out := new(StatefulSetSpec)
x.DeepCopyInto(out)
in.DeepCopyInto(out)
return out
}
@@ -275,13 +276,13 @@ func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus) {
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetStatus.
func (x *StatefulSetStatus) DeepCopy() *StatefulSetStatus {
if x == nil {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetStatus.
func (in *StatefulSetStatus) DeepCopy() *StatefulSetStatus {
if in == nil {
return nil
}
out := new(StatefulSetStatus)
x.DeepCopyInto(out)
in.DeepCopyInto(out)
return out
}
@@ -300,12 +301,12 @@ func (in *StatefulSetUpdateStrategy) DeepCopyInto(out *StatefulSetUpdateStrategy
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetUpdateStrategy.
func (x *StatefulSetUpdateStrategy) DeepCopy() *StatefulSetUpdateStrategy {
if x == nil {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetUpdateStrategy.
func (in *StatefulSetUpdateStrategy) DeepCopy() *StatefulSetUpdateStrategy {
if in == nil {
return nil
}
out := new(StatefulSetUpdateStrategy)
x.DeepCopyInto(out)
in.DeepCopyInto(out)
return out
}