Add custom pod conversion functions from pre-v1.1 mirror pods

The functions would default values added after v1.0, so that kubelet wouldn't
fail at comparing the mirror pods against their associated static pods.

This code would need to be maintained if we ever change the default value in
Pod until we drop support for v1.0 nodes.
This commit is contained in:
Yu-Ju Hong
2015-10-21 14:11:32 -07:00
parent bffdd242d8
commit e5c82d2292
3 changed files with 95 additions and 8 deletions

View File

@@ -1887,10 +1887,6 @@ func autoconvert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) er
return nil
}
func convert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error {
return autoconvert_api_Pod_To_v1_Pod(in, out, s)
}
func autoconvert_api_PodAttachOptions_To_v1_PodAttachOptions(in *api.PodAttachOptions, out *PodAttachOptions, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*api.PodAttachOptions))(in)
@@ -4912,10 +4908,6 @@ func autoconvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) er
return nil
}
func convert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error {
return autoconvert_v1_Pod_To_api_Pod(in, out, s)
}
func autoconvert_v1_PodAttachOptions_To_api_PodAttachOptions(in *PodAttachOptions, out *api.PodAttachOptions, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*PodAttachOptions))(in)