mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
remove ReplicationControllerSpec.TemplateRef from v1beta3/types.go and v1/types.go for now
This commit is contained in:
parent
677d0fdf87
commit
0798ea9ff7
@ -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.
|
||||
|
||||
|
||||
[]()
|
||||
|
@ -1582,14 +1582,6 @@ func deepCopy_api_ReplicationControllerSpec(in ReplicationControllerSpec, out *R
|
||||
} else {
|
||||
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 {
|
||||
out.Template = new(PodTemplateSpec)
|
||||
if err := deepCopy_api_PodTemplateSpec(*in.Template, out.Template, c); err != nil {
|
||||
|
@ -106,8 +106,8 @@ func FuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer {
|
||||
j.Target.Name = c.RandString()
|
||||
},
|
||||
func(j *api.ReplicationControllerSpec, c fuzz.Continue) {
|
||||
c.FuzzNoCustom(j) // fuzz self without calling this function again
|
||||
j.TemplateRef = nil // this is required for round trip
|
||||
c.FuzzNoCustom(j) // fuzz self without calling this function again
|
||||
//j.TemplateRef = nil // this is required for round trip
|
||||
},
|
||||
func(j *api.ReplicationControllerStatus, c fuzz.Continue) {
|
||||
// only replicas round trips
|
||||
|
@ -966,7 +966,7 @@ type ReplicationControllerSpec struct {
|
||||
// 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.
|
||||
// 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
|
||||
// insufficient replicas are detected. Internally, this takes precedence over a
|
||||
|
@ -193,14 +193,14 @@ func convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *a
|
||||
} else {
|
||||
out.Selector = nil
|
||||
}
|
||||
if in.TemplateRef != nil {
|
||||
out.TemplateRef = new(ObjectReference)
|
||||
if err := convert_api_ObjectReference_To_v1_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.TemplateRef = nil
|
||||
}
|
||||
//if in.TemplateRef != nil {
|
||||
// out.TemplateRef = new(ObjectReference)
|
||||
// if err := convert_api_ObjectReference_To_v1_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil {
|
||||
// return err
|
||||
// }
|
||||
//} else {
|
||||
// out.TemplateRef = nil
|
||||
//}
|
||||
if in.Template != nil {
|
||||
out.Template = new(PodTemplateSpec)
|
||||
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 {
|
||||
out.Selector = nil
|
||||
}
|
||||
if in.TemplateRef != nil {
|
||||
out.TemplateRef = new(api.ObjectReference)
|
||||
if err := convert_v1_ObjectReference_To_api_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.TemplateRef = nil
|
||||
}
|
||||
//if in.TemplateRef != nil {
|
||||
// out.TemplateRef = new(api.ObjectReference)
|
||||
// if err := convert_v1_ObjectReference_To_api_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil {
|
||||
// return err
|
||||
// }
|
||||
//} else {
|
||||
// out.TemplateRef = nil
|
||||
//}
|
||||
if in.Template != nil {
|
||||
out.Template = new(api.PodTemplateSpec)
|
||||
if err := convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, out.Template, s); err != nil {
|
||||
|
@ -1518,14 +1518,6 @@ func deepCopy_v1_ReplicationControllerSpec(in ReplicationControllerSpec, out *Re
|
||||
} else {
|
||||
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 {
|
||||
out.Template = new(PodTemplateSpec)
|
||||
if err := deepCopy_v1_PodTemplateSpec(*in.Template, out.Template, c); err != nil {
|
||||
|
@ -962,7 +962,7 @@ type ReplicationControllerSpec struct {
|
||||
|
||||
// TemplateRef is a 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"`
|
||||
//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
|
||||
// insufficient replicas are detected. This takes precedence over a
|
||||
|
@ -474,13 +474,13 @@ func addConversionFuncs() {
|
||||
if err := s.Convert(&in.Selector, &out.ReplicaSelector, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.TemplateRef != nil && in.Template == nil {
|
||||
return &api.ConversionError{
|
||||
In: in,
|
||||
Out: out,
|
||||
Message: "objects with a template ref cannot be converted to older objects, must populate template",
|
||||
}
|
||||
}
|
||||
//if in.TemplateRef != nil && in.Template == nil {
|
||||
// return &api.ConversionError{
|
||||
// In: in,
|
||||
// Out: out,
|
||||
// Message: "objects with a template ref cannot be converted to older objects, must populate template",
|
||||
// }
|
||||
//}
|
||||
if in.Template != nil {
|
||||
if err := s.Convert(in.Template, &out.PodTemplate, 0); err != nil {
|
||||
return err
|
||||
|
@ -253,13 +253,13 @@ func addConversionFuncs() {
|
||||
if err := s.Convert(&in.Selector, &out.ReplicaSelector, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.TemplateRef != nil && in.Template == nil {
|
||||
return &api.ConversionError{
|
||||
In: in,
|
||||
Out: out,
|
||||
Message: "objects with a template ref cannot be converted to older objects, must populate template",
|
||||
}
|
||||
}
|
||||
//if in.TemplateRef != nil && in.Template == nil {
|
||||
// return &api.ConversionError{
|
||||
// In: in,
|
||||
// Out: out,
|
||||
// Message: "objects with a template ref cannot be converted to older objects, must populate template",
|
||||
// }
|
||||
//}
|
||||
if in.Template != nil {
|
||||
if err := s.Convert(in.Template, &out.PodTemplate, 0); err != nil {
|
||||
return err
|
||||
|
@ -1593,14 +1593,6 @@ func convert_api_ReplicationControllerSpec_To_v1beta3_ReplicationControllerSpec(
|
||||
} else {
|
||||
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 {
|
||||
out.Template = new(PodTemplateSpec)
|
||||
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 {
|
||||
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 {
|
||||
out.Template = new(api.PodTemplateSpec)
|
||||
if err := convert_v1beta3_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, out.Template, s); err != nil {
|
||||
|
@ -1517,14 +1517,6 @@ func deepCopy_v1beta3_ReplicationControllerSpec(in ReplicationControllerSpec, ou
|
||||
} else {
|
||||
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 {
|
||||
out.Template = new(PodTemplateSpec)
|
||||
if err := deepCopy_v1beta3_PodTemplateSpec(*in.Template, out.Template, c); err != nil {
|
||||
|
@ -966,7 +966,7 @@ type ReplicationControllerSpec struct {
|
||||
|
||||
// TemplateRef is a 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"`
|
||||
//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
|
||||
// insufficient replicas are detected. This takes precedence over a
|
||||
|
Loading…
Reference in New Issue
Block a user