remove ReplicationControllerSpec.TemplateRef from v1beta3/types.go and v1/types.go for now

This commit is contained in:
Chao Xu 2015-05-28 16:29:06 -07:00
parent 677d0fdf87
commit 0798ea9ff7
12 changed files with 38 additions and 75 deletions

View File

@ -54,3 +54,6 @@ $ kube-up.sh
``` ```
Note that we are still working on making all containerized the master components run smoothly in rkt. Before that we are not able to run the master node with rkt yet. Note that we are still working on making all containerized the master components run smoothly in rkt. Before that we are not able to run the master node with rkt yet.
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/getting-started-guides/rkt/README.md?pixel)]()

View File

@ -1582,14 +1582,6 @@ func deepCopy_api_ReplicationControllerSpec(in ReplicationControllerSpec, out *R
} else { } else {
out.Selector = nil out.Selector = nil
} }
if in.TemplateRef != nil {
out.TemplateRef = new(ObjectReference)
if err := deepCopy_api_ObjectReference(*in.TemplateRef, out.TemplateRef, c); err != nil {
return err
}
} else {
out.TemplateRef = nil
}
if in.Template != nil { if in.Template != nil {
out.Template = new(PodTemplateSpec) out.Template = new(PodTemplateSpec)
if err := deepCopy_api_PodTemplateSpec(*in.Template, out.Template, c); err != nil { if err := deepCopy_api_PodTemplateSpec(*in.Template, out.Template, c); err != nil {

View File

@ -107,7 +107,7 @@ func FuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer {
}, },
func(j *api.ReplicationControllerSpec, c fuzz.Continue) { func(j *api.ReplicationControllerSpec, c fuzz.Continue) {
c.FuzzNoCustom(j) // fuzz self without calling this function again c.FuzzNoCustom(j) // fuzz self without calling this function again
j.TemplateRef = nil // this is required for round trip //j.TemplateRef = nil // this is required for round trip
}, },
func(j *api.ReplicationControllerStatus, c fuzz.Continue) { func(j *api.ReplicationControllerStatus, c fuzz.Continue) {
// only replicas round trips // only replicas round trips

View File

@ -966,7 +966,7 @@ type ReplicationControllerSpec struct {
// TemplateRef is a reference to an object that describes the pod that will be created if // TemplateRef is a reference to an object that describes the pod that will be created if
// insufficient replicas are detected. This reference is ignored if a Template is set. // insufficient replicas are detected. This reference is ignored if a Template is set.
// Must be set before converting to a v1beta3 API object // Must be set before converting to a v1beta3 API object
TemplateRef *ObjectReference `json:"templateRef,omitempty"` //TemplateRef *ObjectReference `json:"templateRef,omitempty"`
// Template is the object that describes the pod that will be created if // Template is the object that describes the pod that will be created if
// insufficient replicas are detected. Internally, this takes precedence over a // insufficient replicas are detected. Internally, this takes precedence over a

View File

@ -193,14 +193,14 @@ func convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *a
} else { } else {
out.Selector = nil out.Selector = nil
} }
if in.TemplateRef != nil { //if in.TemplateRef != nil {
out.TemplateRef = new(ObjectReference) // out.TemplateRef = new(ObjectReference)
if err := convert_api_ObjectReference_To_v1_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil { // if err := convert_api_ObjectReference_To_v1_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil {
return err // return err
} // }
} else { //} else {
out.TemplateRef = nil // out.TemplateRef = nil
} //}
if in.Template != nil { if in.Template != nil {
out.Template = new(PodTemplateSpec) out.Template = new(PodTemplateSpec)
if err := convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in.Template, out.Template, s); err != nil { if err := convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in.Template, out.Template, s); err != nil {
@ -225,14 +225,14 @@ func convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(in *R
} else { } else {
out.Selector = nil out.Selector = nil
} }
if in.TemplateRef != nil { //if in.TemplateRef != nil {
out.TemplateRef = new(api.ObjectReference) // out.TemplateRef = new(api.ObjectReference)
if err := convert_v1_ObjectReference_To_api_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil { // if err := convert_v1_ObjectReference_To_api_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil {
return err // return err
} // }
} else { //} else {
out.TemplateRef = nil // out.TemplateRef = nil
} //}
if in.Template != nil { if in.Template != nil {
out.Template = new(api.PodTemplateSpec) out.Template = new(api.PodTemplateSpec)
if err := convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, out.Template, s); err != nil { if err := convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, out.Template, s); err != nil {

View File

@ -1518,14 +1518,6 @@ func deepCopy_v1_ReplicationControllerSpec(in ReplicationControllerSpec, out *Re
} else { } else {
out.Selector = nil out.Selector = nil
} }
if in.TemplateRef != nil {
out.TemplateRef = new(ObjectReference)
if err := deepCopy_v1_ObjectReference(*in.TemplateRef, out.TemplateRef, c); err != nil {
return err
}
} else {
out.TemplateRef = nil
}
if in.Template != nil { if in.Template != nil {
out.Template = new(PodTemplateSpec) out.Template = new(PodTemplateSpec)
if err := deepCopy_v1_PodTemplateSpec(*in.Template, out.Template, c); err != nil { if err := deepCopy_v1_PodTemplateSpec(*in.Template, out.Template, c); err != nil {

View File

@ -962,7 +962,7 @@ type ReplicationControllerSpec struct {
// TemplateRef is a reference to an object that describes the pod that will be created if // TemplateRef is a reference to an object that describes the pod that will be created if
// insufficient replicas are detected. // insufficient replicas are detected.
TemplateRef *ObjectReference `json:"templateRef,omitempty" description:"reference to an object that describes the pod that will be created if insufficient replicas are detected"` //TemplateRef *ObjectReference `json:"templateRef,omitempty" description:"reference to an object that describes the pod that will be created if insufficient replicas are detected"`
// Template is the object that describes the pod that will be created if // Template is the object that describes the pod that will be created if
// insufficient replicas are detected. This takes precedence over a // insufficient replicas are detected. This takes precedence over a

View File

@ -474,13 +474,13 @@ func addConversionFuncs() {
if err := s.Convert(&in.Selector, &out.ReplicaSelector, 0); err != nil { if err := s.Convert(&in.Selector, &out.ReplicaSelector, 0); err != nil {
return err return err
} }
if in.TemplateRef != nil && in.Template == nil { //if in.TemplateRef != nil && in.Template == nil {
return &api.ConversionError{ // return &api.ConversionError{
In: in, // In: in,
Out: out, // Out: out,
Message: "objects with a template ref cannot be converted to older objects, must populate template", // Message: "objects with a template ref cannot be converted to older objects, must populate template",
} // }
} //}
if in.Template != nil { if in.Template != nil {
if err := s.Convert(in.Template, &out.PodTemplate, 0); err != nil { if err := s.Convert(in.Template, &out.PodTemplate, 0); err != nil {
return err return err

View File

@ -253,13 +253,13 @@ func addConversionFuncs() {
if err := s.Convert(&in.Selector, &out.ReplicaSelector, 0); err != nil { if err := s.Convert(&in.Selector, &out.ReplicaSelector, 0); err != nil {
return err return err
} }
if in.TemplateRef != nil && in.Template == nil { //if in.TemplateRef != nil && in.Template == nil {
return &api.ConversionError{ // return &api.ConversionError{
In: in, // In: in,
Out: out, // Out: out,
Message: "objects with a template ref cannot be converted to older objects, must populate template", // Message: "objects with a template ref cannot be converted to older objects, must populate template",
} // }
} //}
if in.Template != nil { if in.Template != nil {
if err := s.Convert(in.Template, &out.PodTemplate, 0); err != nil { if err := s.Convert(in.Template, &out.PodTemplate, 0); err != nil {
return err return err

View File

@ -1593,14 +1593,6 @@ func convert_api_ReplicationControllerSpec_To_v1beta3_ReplicationControllerSpec(
} else { } else {
out.Selector = nil out.Selector = nil
} }
if in.TemplateRef != nil {
out.TemplateRef = new(ObjectReference)
if err := convert_api_ObjectReference_To_v1beta3_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil {
return err
}
} else {
out.TemplateRef = nil
}
if in.Template != nil { if in.Template != nil {
out.Template = new(PodTemplateSpec) out.Template = new(PodTemplateSpec)
if err := convert_api_PodTemplateSpec_To_v1beta3_PodTemplateSpec(in.Template, out.Template, s); err != nil { if err := convert_api_PodTemplateSpec_To_v1beta3_PodTemplateSpec(in.Template, out.Template, s); err != nil {
@ -3739,14 +3731,6 @@ func convert_v1beta3_ReplicationControllerSpec_To_api_ReplicationControllerSpec(
} else { } else {
out.Selector = nil out.Selector = nil
} }
if in.TemplateRef != nil {
out.TemplateRef = new(api.ObjectReference)
if err := convert_v1beta3_ObjectReference_To_api_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil {
return err
}
} else {
out.TemplateRef = nil
}
if in.Template != nil { if in.Template != nil {
out.Template = new(api.PodTemplateSpec) out.Template = new(api.PodTemplateSpec)
if err := convert_v1beta3_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, out.Template, s); err != nil { if err := convert_v1beta3_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, out.Template, s); err != nil {

View File

@ -1517,14 +1517,6 @@ func deepCopy_v1beta3_ReplicationControllerSpec(in ReplicationControllerSpec, ou
} else { } else {
out.Selector = nil out.Selector = nil
} }
if in.TemplateRef != nil {
out.TemplateRef = new(ObjectReference)
if err := deepCopy_v1beta3_ObjectReference(*in.TemplateRef, out.TemplateRef, c); err != nil {
return err
}
} else {
out.TemplateRef = nil
}
if in.Template != nil { if in.Template != nil {
out.Template = new(PodTemplateSpec) out.Template = new(PodTemplateSpec)
if err := deepCopy_v1beta3_PodTemplateSpec(*in.Template, out.Template, c); err != nil { if err := deepCopy_v1beta3_PodTemplateSpec(*in.Template, out.Template, c); err != nil {

View File

@ -966,7 +966,7 @@ type ReplicationControllerSpec struct {
// TemplateRef is a reference to an object that describes the pod that will be created if // TemplateRef is a reference to an object that describes the pod that will be created if
// insufficient replicas are detected. // insufficient replicas are detected.
TemplateRef *ObjectReference `json:"templateRef,omitempty" description:"reference to an object that describes the pod that will be created if insufficient replicas are detected"` //TemplateRef *ObjectReference `json:"templateRef,omitempty" description:"reference to an object that describes the pod that will be created if insufficient replicas are detected"`
// Template is the object that describes the pod that will be created if // Template is the object that describes the pod that will be created if
// insufficient replicas are detected. This takes precedence over a // insufficient replicas are detected. This takes precedence over a