Rename ScheduledJob to CronJob
This commit is contained in:
@@ -49,8 +49,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&Job{},
|
||||
&JobList{},
|
||||
&JobTemplate{},
|
||||
&ScheduledJob{},
|
||||
&ScheduledJobList{},
|
||||
&CronJob{},
|
||||
&CronJobList{},
|
||||
&api.ListOptions{},
|
||||
)
|
||||
return nil
|
||||
|
@@ -2822,7 +2822,7 @@ func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJob) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
func (x *CronJob) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
@@ -2967,7 +2967,7 @@ func (x *ScheduledJob) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJob) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
func (x *CronJob) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -2997,7 +2997,7 @@ func (x *ScheduledJob) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3040,14 +3040,14 @@ func (x *ScheduledJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
}
|
||||
case "spec":
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Spec = ScheduledJobSpec{}
|
||||
x.Spec = CronJobSpec{}
|
||||
} else {
|
||||
yyv269 := &x.Spec
|
||||
yyv269.CodecDecodeSelf(d)
|
||||
}
|
||||
case "status":
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Status = ScheduledJobStatus{}
|
||||
x.Status = CronJobStatus{}
|
||||
} else {
|
||||
yyv270 := &x.Status
|
||||
yyv270.CodecDecodeSelf(d)
|
||||
@@ -3059,7 +3059,7 @@ func (x *ScheduledJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3127,7 +3127,7 @@ func (x *ScheduledJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
}
|
||||
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Spec = ScheduledJobSpec{}
|
||||
x.Spec = CronJobSpec{}
|
||||
} else {
|
||||
yyv275 := &x.Spec
|
||||
yyv275.CodecDecodeSelf(d)
|
||||
@@ -3144,7 +3144,7 @@ func (x *ScheduledJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
}
|
||||
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Status = ScheduledJobStatus{}
|
||||
x.Status = CronJobStatus{}
|
||||
} else {
|
||||
yyv276 := &x.Status
|
||||
yyv276.CodecDecodeSelf(d)
|
||||
@@ -3165,7 +3165,7 @@ func (x *ScheduledJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJobList) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
func (x *CronJobList) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3286,7 +3286,7 @@ func (x *ScheduledJobList) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
_ = yym291
|
||||
if false {
|
||||
} else {
|
||||
h.encSliceScheduledJob(([]ScheduledJob)(x.Items), e)
|
||||
h.encSliceCronJob(([]CronJob)(x.Items), e)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -3300,7 +3300,7 @@ func (x *ScheduledJobList) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
_ = yym292
|
||||
if false {
|
||||
} else {
|
||||
h.encSliceScheduledJob(([]ScheduledJob)(x.Items), e)
|
||||
h.encSliceCronJob(([]CronJob)(x.Items), e)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3313,7 +3313,7 @@ func (x *ScheduledJobList) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobList) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
func (x *CronJobList) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3343,7 +3343,7 @@ func (x *ScheduledJobList) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3399,7 +3399,7 @@ func (x *ScheduledJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
_ = yym301
|
||||
if false {
|
||||
} else {
|
||||
h.decSliceScheduledJob((*[]ScheduledJob)(yyv300), d)
|
||||
h.decSliceCronJob((*[]CronJob)(yyv300), d)
|
||||
}
|
||||
}
|
||||
default:
|
||||
@@ -3409,7 +3409,7 @@ func (x *ScheduledJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3490,7 +3490,7 @@ func (x *ScheduledJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
|
||||
_ = yym308
|
||||
if false {
|
||||
} else {
|
||||
h.decSliceScheduledJob((*[]ScheduledJob)(yyv307), d)
|
||||
h.decSliceCronJob((*[]CronJob)(yyv307), d)
|
||||
}
|
||||
}
|
||||
for {
|
||||
@@ -3509,7 +3509,7 @@ func (x *ScheduledJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJobSpec) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
func (x *CronJobSpec) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3666,7 +3666,7 @@ func (x *ScheduledJobSpec) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobSpec) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
func (x *CronJobSpec) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3696,7 +3696,7 @@ func (x *ScheduledJobSpec) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3776,7 +3776,7 @@ func (x *ScheduledJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3926,7 +3926,7 @@ func (x *ConcurrencyPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobStatus) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
func (x *CronJobStatus) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
@@ -4043,7 +4043,7 @@ func (x *ScheduledJobStatus) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobStatus) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
func (x *CronJobStatus) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -4073,7 +4073,7 @@ func (x *ScheduledJobStatus) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -4135,7 +4135,7 @@ func (x *ScheduledJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder)
|
||||
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -4443,7 +4443,7 @@ func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.De
|
||||
}
|
||||
}
|
||||
|
||||
func (x codecSelfer1234) encSliceScheduledJob(v []ScheduledJob, e *codec1978.Encoder) {
|
||||
func (x codecSelfer1234) encSliceCronJob(v []CronJob, e *codec1978.Encoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
@@ -4456,7 +4456,7 @@ func (x codecSelfer1234) encSliceScheduledJob(v []ScheduledJob, e *codec1978.Enc
|
||||
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
}
|
||||
|
||||
func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.Decoder) {
|
||||
func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -4466,7 +4466,7 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
||||
var yyc382 bool
|
||||
if yyl382 == 0 {
|
||||
if yyv382 == nil {
|
||||
yyv382 = []ScheduledJob{}
|
||||
yyv382 = []CronJob{}
|
||||
yyc382 = true
|
||||
} else if len(yyv382) != 0 {
|
||||
yyv382 = yyv382[:0]
|
||||
@@ -4484,10 +4484,10 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
||||
if yyrl382 <= cap(yyv382) {
|
||||
yyv382 = yyv382[:yyrl382]
|
||||
} else {
|
||||
yyv382 = make([]ScheduledJob, yyrl382)
|
||||
yyv382 = make([]CronJob, yyrl382)
|
||||
}
|
||||
} else {
|
||||
yyv382 = make([]ScheduledJob, yyrl382)
|
||||
yyv382 = make([]CronJob, yyrl382)
|
||||
}
|
||||
yyc382 = true
|
||||
yyrr382 = len(yyv382)
|
||||
@@ -4502,7 +4502,7 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
||||
for ; yyj382 < yyrr382; yyj382++ {
|
||||
yyh382.ElemContainerState(yyj382)
|
||||
if r.TryDecodeAsNil() {
|
||||
yyv382[yyj382] = ScheduledJob{}
|
||||
yyv382[yyj382] = CronJob{}
|
||||
} else {
|
||||
yyv383 := &yyv382[yyj382]
|
||||
yyv383.CodecDecodeSelf(d)
|
||||
@@ -4511,10 +4511,10 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
||||
}
|
||||
if yyrt382 {
|
||||
for ; yyj382 < yyl382; yyj382++ {
|
||||
yyv382 = append(yyv382, ScheduledJob{})
|
||||
yyv382 = append(yyv382, CronJob{})
|
||||
yyh382.ElemContainerState(yyj382)
|
||||
if r.TryDecodeAsNil() {
|
||||
yyv382[yyj382] = ScheduledJob{}
|
||||
yyv382[yyj382] = CronJob{}
|
||||
} else {
|
||||
yyv384 := &yyv382[yyj382]
|
||||
yyv384.CodecDecodeSelf(d)
|
||||
@@ -4528,13 +4528,13 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
||||
for ; !r.CheckBreak(); yyj382++ {
|
||||
|
||||
if yyj382 >= len(yyv382) {
|
||||
yyv382 = append(yyv382, ScheduledJob{}) // var yyz382 ScheduledJob
|
||||
yyv382 = append(yyv382, CronJob{}) // var yyz382 CronJob
|
||||
yyc382 = true
|
||||
}
|
||||
yyh382.ElemContainerState(yyj382)
|
||||
if yyj382 < len(yyv382) {
|
||||
if r.TryDecodeAsNil() {
|
||||
yyv382[yyj382] = ScheduledJob{}
|
||||
yyv382[yyj382] = CronJob{}
|
||||
} else {
|
||||
yyv385 := &yyv382[yyj382]
|
||||
yyv385.CodecDecodeSelf(d)
|
||||
@@ -4549,7 +4549,7 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
||||
yyv382 = yyv382[:yyj382]
|
||||
yyc382 = true
|
||||
} else if yyj382 == 0 && yyv382 == nil {
|
||||
yyv382 = []ScheduledJob{}
|
||||
yyv382 = []CronJob{}
|
||||
yyc382 = true
|
||||
}
|
||||
}
|
||||
|
@@ -190,8 +190,8 @@ type JobCondition struct {
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// ScheduledJob represents the configuration of a single scheduled job.
|
||||
type ScheduledJob struct {
|
||||
// CronJob represents the configuration of a single cron job.
|
||||
type CronJob struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
@@ -201,28 +201,28 @@ type ScheduledJob struct {
|
||||
// Spec is a structure defining the expected behavior of a job, including the schedule.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Spec ScheduledJobSpec `json:"spec,omitempty"`
|
||||
Spec CronJobSpec `json:"spec,omitempty"`
|
||||
|
||||
// Status is a structure describing current status of a job.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Status ScheduledJobStatus `json:"status,omitempty"`
|
||||
Status CronJobStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// ScheduledJobList is a collection of scheduled jobs.
|
||||
type ScheduledJobList struct {
|
||||
// CronJobList is a collection of cron jobs.
|
||||
type CronJobList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard list metadata
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
// Items is the list of ScheduledJob.
|
||||
Items []ScheduledJob `json:"items"`
|
||||
// Items is the list of CronJob.
|
||||
Items []CronJob `json:"items"`
|
||||
}
|
||||
|
||||
// ScheduledJobSpec describes how the job execution will look like and when it will actually run.
|
||||
type ScheduledJobSpec struct {
|
||||
// CronJobSpec describes how the job execution will look like and when it will actually run.
|
||||
type CronJobSpec struct {
|
||||
|
||||
// Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
|
||||
Schedule string `json:"schedule"`
|
||||
@@ -242,7 +242,7 @@ type ScheduledJobSpec struct {
|
||||
Suspend *bool `json:"suspend,omitempty"`
|
||||
|
||||
// JobTemplate is the object that describes the job that will be created when
|
||||
// executing a ScheduledJob.
|
||||
// executing a CronJob.
|
||||
JobTemplate JobTemplateSpec `json:"jobTemplate"`
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ type ScheduledJobSpec struct {
|
||||
type ConcurrencyPolicy string
|
||||
|
||||
const (
|
||||
// AllowConcurrent allows ScheduledJobs to run concurrently.
|
||||
// AllowConcurrent allows CronJobs to run concurrently.
|
||||
AllowConcurrent ConcurrencyPolicy = "Allow"
|
||||
|
||||
// ForbidConcurrent forbids concurrent runs, skipping next run if previous
|
||||
@@ -264,8 +264,8 @@ const (
|
||||
ReplaceConcurrent ConcurrencyPolicy = "Replace"
|
||||
)
|
||||
|
||||
// ScheduledJobStatus represents the current state of a Job.
|
||||
type ScheduledJobStatus struct {
|
||||
// CronJobStatus represents the current state of a cron job.
|
||||
type CronJobStatus struct {
|
||||
// Active holds pointers to currently running jobs.
|
||||
// +optional
|
||||
Active []api.ObjectReference `json:"active,omitempty"`
|
||||
|
@@ -37,7 +37,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
||||
}
|
||||
|
||||
// Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
|
||||
for _, kind := range []string{"Job", "JobTemplate", "ScheduledJob"} {
|
||||
for _, kind := range []string{"Job", "JobTemplate", "CronJob"} {
|
||||
err = api.Scheme.AddFieldLabelConversionFunc("batch/v2alpha1", kind,
|
||||
func(label, value string) (string, string, error) {
|
||||
switch label {
|
||||
|
@@ -24,7 +24,7 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error {
|
||||
RegisterDefaults(scheme)
|
||||
return scheme.AddDefaultingFuncs(
|
||||
SetDefaults_Job,
|
||||
SetDefaults_ScheduledJob,
|
||||
SetDefaults_CronJob,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ func SetDefaults_Job(obj *Job) {
|
||||
}
|
||||
}
|
||||
|
||||
func SetDefaults_ScheduledJob(obj *ScheduledJob) {
|
||||
func SetDefaults_CronJob(obj *CronJob) {
|
||||
if obj.Spec.ConcurrencyPolicy == "" {
|
||||
obj.Spec.ConcurrencyPolicy = AllowConcurrent
|
||||
}
|
||||
|
@@ -32,10 +32,10 @@ limitations under the License.
|
||||
JobStatus
|
||||
JobTemplate
|
||||
JobTemplateSpec
|
||||
ScheduledJob
|
||||
ScheduledJobList
|
||||
ScheduledJobSpec
|
||||
ScheduledJobStatus
|
||||
CronJob
|
||||
CronJobList
|
||||
CronJobSpec
|
||||
CronJobStatus
|
||||
*/
|
||||
package v2alpha1
|
||||
|
||||
@@ -88,21 +88,21 @@ func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} }
|
||||
func (*JobTemplateSpec) ProtoMessage() {}
|
||||
func (*JobTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
|
||||
|
||||
func (m *ScheduledJob) Reset() { *m = ScheduledJob{} }
|
||||
func (*ScheduledJob) ProtoMessage() {}
|
||||
func (*ScheduledJob) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
|
||||
func (m *CronJob) Reset() { *m = CronJob{} }
|
||||
func (*CronJob) ProtoMessage() {}
|
||||
func (*CronJob) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
|
||||
|
||||
func (m *ScheduledJobList) Reset() { *m = ScheduledJobList{} }
|
||||
func (*ScheduledJobList) ProtoMessage() {}
|
||||
func (*ScheduledJobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
|
||||
func (m *CronJobList) Reset() { *m = CronJobList{} }
|
||||
func (*CronJobList) ProtoMessage() {}
|
||||
func (*CronJobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
|
||||
|
||||
func (m *ScheduledJobSpec) Reset() { *m = ScheduledJobSpec{} }
|
||||
func (*ScheduledJobSpec) ProtoMessage() {}
|
||||
func (*ScheduledJobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
|
||||
func (m *CronJobSpec) Reset() { *m = CronJobSpec{} }
|
||||
func (*CronJobSpec) ProtoMessage() {}
|
||||
func (*CronJobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
|
||||
|
||||
func (m *ScheduledJobStatus) Reset() { *m = ScheduledJobStatus{} }
|
||||
func (*ScheduledJobStatus) ProtoMessage() {}
|
||||
func (*ScheduledJobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
|
||||
func (m *CronJobStatus) Reset() { *m = CronJobStatus{} }
|
||||
func (*CronJobStatus) ProtoMessage() {}
|
||||
func (*CronJobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Job)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.Job")
|
||||
@@ -112,10 +112,10 @@ func init() {
|
||||
proto.RegisterType((*JobStatus)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.JobStatus")
|
||||
proto.RegisterType((*JobTemplate)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.JobTemplate")
|
||||
proto.RegisterType((*JobTemplateSpec)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.JobTemplateSpec")
|
||||
proto.RegisterType((*ScheduledJob)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.ScheduledJob")
|
||||
proto.RegisterType((*ScheduledJobList)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.ScheduledJobList")
|
||||
proto.RegisterType((*ScheduledJobSpec)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.ScheduledJobSpec")
|
||||
proto.RegisterType((*ScheduledJobStatus)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.ScheduledJobStatus")
|
||||
proto.RegisterType((*CronJob)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.CronJob")
|
||||
proto.RegisterType((*CronJobList)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.CronJobList")
|
||||
proto.RegisterType((*CronJobSpec)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.CronJobSpec")
|
||||
proto.RegisterType((*CronJobStatus)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.CronJobStatus")
|
||||
}
|
||||
func (m *Job) Marshal() (data []byte, err error) {
|
||||
size := m.Size()
|
||||
@@ -435,7 +435,7 @@ func (m *JobTemplateSpec) MarshalTo(data []byte) (int, error) {
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *ScheduledJob) Marshal() (data []byte, err error) {
|
||||
func (m *CronJob) Marshal() (data []byte, err error) {
|
||||
size := m.Size()
|
||||
data = make([]byte, size)
|
||||
n, err := m.MarshalTo(data)
|
||||
@@ -445,7 +445,7 @@ func (m *ScheduledJob) Marshal() (data []byte, err error) {
|
||||
return data[:n], nil
|
||||
}
|
||||
|
||||
func (m *ScheduledJob) MarshalTo(data []byte) (int, error) {
|
||||
func (m *CronJob) MarshalTo(data []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
@@ -477,7 +477,7 @@ func (m *ScheduledJob) MarshalTo(data []byte) (int, error) {
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *ScheduledJobList) Marshal() (data []byte, err error) {
|
||||
func (m *CronJobList) Marshal() (data []byte, err error) {
|
||||
size := m.Size()
|
||||
data = make([]byte, size)
|
||||
n, err := m.MarshalTo(data)
|
||||
@@ -487,7 +487,7 @@ func (m *ScheduledJobList) Marshal() (data []byte, err error) {
|
||||
return data[:n], nil
|
||||
}
|
||||
|
||||
func (m *ScheduledJobList) MarshalTo(data []byte) (int, error) {
|
||||
func (m *CronJobList) MarshalTo(data []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
@@ -515,7 +515,7 @@ func (m *ScheduledJobList) MarshalTo(data []byte) (int, error) {
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *ScheduledJobSpec) Marshal() (data []byte, err error) {
|
||||
func (m *CronJobSpec) Marshal() (data []byte, err error) {
|
||||
size := m.Size()
|
||||
data = make([]byte, size)
|
||||
n, err := m.MarshalTo(data)
|
||||
@@ -525,7 +525,7 @@ func (m *ScheduledJobSpec) Marshal() (data []byte, err error) {
|
||||
return data[:n], nil
|
||||
}
|
||||
|
||||
func (m *ScheduledJobSpec) MarshalTo(data []byte) (int, error) {
|
||||
func (m *CronJobSpec) MarshalTo(data []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
@@ -564,7 +564,7 @@ func (m *ScheduledJobSpec) MarshalTo(data []byte) (int, error) {
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *ScheduledJobStatus) Marshal() (data []byte, err error) {
|
||||
func (m *CronJobStatus) Marshal() (data []byte, err error) {
|
||||
size := m.Size()
|
||||
data = make([]byte, size)
|
||||
n, err := m.MarshalTo(data)
|
||||
@@ -574,7 +574,7 @@ func (m *ScheduledJobStatus) Marshal() (data []byte, err error) {
|
||||
return data[:n], nil
|
||||
}
|
||||
|
||||
func (m *ScheduledJobStatus) MarshalTo(data []byte) (int, error) {
|
||||
func (m *CronJobStatus) MarshalTo(data []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
@@ -742,7 +742,7 @@ func (m *JobTemplateSpec) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ScheduledJob) Size() (n int) {
|
||||
func (m *CronJob) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = m.ObjectMeta.Size()
|
||||
@@ -754,7 +754,7 @@ func (m *ScheduledJob) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ScheduledJobList) Size() (n int) {
|
||||
func (m *CronJobList) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = m.ListMeta.Size()
|
||||
@@ -768,7 +768,7 @@ func (m *ScheduledJobList) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ScheduledJobSpec) Size() (n int) {
|
||||
func (m *CronJobSpec) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Schedule)
|
||||
@@ -786,7 +786,7 @@ func (m *ScheduledJobSpec) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ScheduledJobStatus) Size() (n int) {
|
||||
func (m *CronJobStatus) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Active) > 0 {
|
||||
@@ -905,34 +905,34 @@ func (this *JobTemplateSpec) String() string {
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *ScheduledJob) String() string {
|
||||
func (this *CronJob) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&ScheduledJob{`,
|
||||
s := strings.Join([]string{`&CronJob{`,
|
||||
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
|
||||
`Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScheduledJobSpec", "ScheduledJobSpec", 1), `&`, ``, 1) + `,`,
|
||||
`Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScheduledJobStatus", "ScheduledJobStatus", 1), `&`, ``, 1) + `,`,
|
||||
`Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CronJobSpec", "CronJobSpec", 1), `&`, ``, 1) + `,`,
|
||||
`Status:` + strings.Replace(strings.Replace(this.Status.String(), "CronJobStatus", "CronJobStatus", 1), `&`, ``, 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *ScheduledJobList) String() string {
|
||||
func (this *CronJobList) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&ScheduledJobList{`,
|
||||
s := strings.Join([]string{`&CronJobList{`,
|
||||
`ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`,
|
||||
`Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ScheduledJob", "ScheduledJob", 1), `&`, ``, 1) + `,`,
|
||||
`Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CronJob", "CronJob", 1), `&`, ``, 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *ScheduledJobSpec) String() string {
|
||||
func (this *CronJobSpec) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&ScheduledJobSpec{`,
|
||||
s := strings.Join([]string{`&CronJobSpec{`,
|
||||
`Schedule:` + fmt.Sprintf("%v", this.Schedule) + `,`,
|
||||
`StartingDeadlineSeconds:` + valueToStringGenerated(this.StartingDeadlineSeconds) + `,`,
|
||||
`ConcurrencyPolicy:` + fmt.Sprintf("%v", this.ConcurrencyPolicy) + `,`,
|
||||
@@ -942,11 +942,11 @@ func (this *ScheduledJobSpec) String() string {
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *ScheduledJobStatus) String() string {
|
||||
func (this *CronJobStatus) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&ScheduledJobStatus{`,
|
||||
s := strings.Join([]string{`&CronJobStatus{`,
|
||||
`Active:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Active), "ObjectReference", "k8s_io_kubernetes_pkg_api_v1.ObjectReference", 1), `&`, ``, 1) + `,`,
|
||||
`LastScheduleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScheduleTime), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`,
|
||||
`}`,
|
||||
@@ -2056,7 +2056,7 @@ func (m *JobTemplateSpec) Unmarshal(data []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ScheduledJob) Unmarshal(data []byte) error {
|
||||
func (m *CronJob) Unmarshal(data []byte) error {
|
||||
l := len(data)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -2079,10 +2079,10 @@ func (m *ScheduledJob) Unmarshal(data []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ScheduledJob: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: CronJob: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ScheduledJob: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: CronJob: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
@@ -2196,7 +2196,7 @@ func (m *ScheduledJob) Unmarshal(data []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ScheduledJobList) Unmarshal(data []byte) error {
|
||||
func (m *CronJobList) Unmarshal(data []byte) error {
|
||||
l := len(data)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -2219,10 +2219,10 @@ func (m *ScheduledJobList) Unmarshal(data []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ScheduledJobList: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: CronJobList: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ScheduledJobList: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: CronJobList: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
@@ -2281,7 +2281,7 @@ func (m *ScheduledJobList) Unmarshal(data []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Items = append(m.Items, ScheduledJob{})
|
||||
m.Items = append(m.Items, CronJob{})
|
||||
if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -2307,7 +2307,7 @@ func (m *ScheduledJobList) Unmarshal(data []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ScheduledJobSpec) Unmarshal(data []byte) error {
|
||||
func (m *CronJobSpec) Unmarshal(data []byte) error {
|
||||
l := len(data)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -2330,10 +2330,10 @@ func (m *ScheduledJobSpec) Unmarshal(data []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ScheduledJobSpec: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: CronJobSpec: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ScheduledJobSpec: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: CronJobSpec: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
@@ -2486,7 +2486,7 @@ func (m *ScheduledJobSpec) Unmarshal(data []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ScheduledJobStatus) Unmarshal(data []byte) error {
|
||||
func (m *CronJobStatus) Unmarshal(data []byte) error {
|
||||
l := len(data)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -2509,10 +2509,10 @@ func (m *ScheduledJobStatus) Unmarshal(data []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ScheduledJobStatus: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: CronJobStatus: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ScheduledJobStatus: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: CronJobStatus: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
|
@@ -40,8 +40,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&Job{},
|
||||
&JobList{},
|
||||
&JobTemplate{},
|
||||
&ScheduledJob{},
|
||||
&ScheduledJobList{},
|
||||
&CronJob{},
|
||||
&CronJobList{},
|
||||
&v1.ListOptions{},
|
||||
&v1.DeleteOptions{},
|
||||
)
|
||||
|
@@ -2822,7 +2822,7 @@ func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJob) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
func (x *CronJob) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
@@ -2967,7 +2967,7 @@ func (x *ScheduledJob) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJob) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
func (x *CronJob) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -2997,7 +2997,7 @@ func (x *ScheduledJob) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3040,14 +3040,14 @@ func (x *ScheduledJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
}
|
||||
case "spec":
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Spec = ScheduledJobSpec{}
|
||||
x.Spec = CronJobSpec{}
|
||||
} else {
|
||||
yyv269 := &x.Spec
|
||||
yyv269.CodecDecodeSelf(d)
|
||||
}
|
||||
case "status":
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Status = ScheduledJobStatus{}
|
||||
x.Status = CronJobStatus{}
|
||||
} else {
|
||||
yyv270 := &x.Status
|
||||
yyv270.CodecDecodeSelf(d)
|
||||
@@ -3059,7 +3059,7 @@ func (x *ScheduledJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3127,7 +3127,7 @@ func (x *ScheduledJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
}
|
||||
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Spec = ScheduledJobSpec{}
|
||||
x.Spec = CronJobSpec{}
|
||||
} else {
|
||||
yyv275 := &x.Spec
|
||||
yyv275.CodecDecodeSelf(d)
|
||||
@@ -3144,7 +3144,7 @@ func (x *ScheduledJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
}
|
||||
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Status = ScheduledJobStatus{}
|
||||
x.Status = CronJobStatus{}
|
||||
} else {
|
||||
yyv276 := &x.Status
|
||||
yyv276.CodecDecodeSelf(d)
|
||||
@@ -3165,7 +3165,7 @@ func (x *ScheduledJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJobList) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
func (x *CronJobList) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3286,7 +3286,7 @@ func (x *ScheduledJobList) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
_ = yym291
|
||||
if false {
|
||||
} else {
|
||||
h.encSliceScheduledJob(([]ScheduledJob)(x.Items), e)
|
||||
h.encSliceCronJob(([]CronJob)(x.Items), e)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -3300,7 +3300,7 @@ func (x *ScheduledJobList) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
_ = yym292
|
||||
if false {
|
||||
} else {
|
||||
h.encSliceScheduledJob(([]ScheduledJob)(x.Items), e)
|
||||
h.encSliceCronJob(([]CronJob)(x.Items), e)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3313,7 +3313,7 @@ func (x *ScheduledJobList) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobList) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
func (x *CronJobList) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3343,7 +3343,7 @@ func (x *ScheduledJobList) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3399,7 +3399,7 @@ func (x *ScheduledJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
_ = yym301
|
||||
if false {
|
||||
} else {
|
||||
h.decSliceScheduledJob((*[]ScheduledJob)(yyv300), d)
|
||||
h.decSliceCronJob((*[]CronJob)(yyv300), d)
|
||||
}
|
||||
}
|
||||
default:
|
||||
@@ -3409,7 +3409,7 @@ func (x *ScheduledJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3490,7 +3490,7 @@ func (x *ScheduledJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
|
||||
_ = yym308
|
||||
if false {
|
||||
} else {
|
||||
h.decSliceScheduledJob((*[]ScheduledJob)(yyv307), d)
|
||||
h.decSliceCronJob((*[]CronJob)(yyv307), d)
|
||||
}
|
||||
}
|
||||
for {
|
||||
@@ -3509,7 +3509,7 @@ func (x *ScheduledJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJobSpec) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
func (x *CronJobSpec) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3666,7 +3666,7 @@ func (x *ScheduledJobSpec) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobSpec) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
func (x *CronJobSpec) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3696,7 +3696,7 @@ func (x *ScheduledJobSpec) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3776,7 +3776,7 @@ func (x *ScheduledJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -3926,7 +3926,7 @@ func (x *ConcurrencyPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobStatus) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
func (x *CronJobStatus) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
@@ -4043,7 +4043,7 @@ func (x *ScheduledJobStatus) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobStatus) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
func (x *CronJobStatus) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -4073,7 +4073,7 @@ func (x *ScheduledJobStatus) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ScheduledJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -4135,7 +4135,7 @@ func (x *ScheduledJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder)
|
||||
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
||||
}
|
||||
|
||||
func (x *ScheduledJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
func (x *CronJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -4443,7 +4443,7 @@ func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.De
|
||||
}
|
||||
}
|
||||
|
||||
func (x codecSelfer1234) encSliceScheduledJob(v []ScheduledJob, e *codec1978.Encoder) {
|
||||
func (x codecSelfer1234) encSliceCronJob(v []CronJob, e *codec1978.Encoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
@@ -4456,7 +4456,7 @@ func (x codecSelfer1234) encSliceScheduledJob(v []ScheduledJob, e *codec1978.Enc
|
||||
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
}
|
||||
|
||||
func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.Decoder) {
|
||||
func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
@@ -4466,7 +4466,7 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
||||
var yyc382 bool
|
||||
if yyl382 == 0 {
|
||||
if yyv382 == nil {
|
||||
yyv382 = []ScheduledJob{}
|
||||
yyv382 = []CronJob{}
|
||||
yyc382 = true
|
||||
} else if len(yyv382) != 0 {
|
||||
yyv382 = yyv382[:0]
|
||||
@@ -4484,10 +4484,10 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
||||
if yyrl382 <= cap(yyv382) {
|
||||
yyv382 = yyv382[:yyrl382]
|
||||
} else {
|
||||
yyv382 = make([]ScheduledJob, yyrl382)
|
||||
yyv382 = make([]CronJob, yyrl382)
|
||||
}
|
||||
} else {
|
||||
yyv382 = make([]ScheduledJob, yyrl382)
|
||||
yyv382 = make([]CronJob, yyrl382)
|
||||
}
|
||||
yyc382 = true
|
||||
yyrr382 = len(yyv382)
|
||||
@@ -4502,7 +4502,7 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
||||
for ; yyj382 < yyrr382; yyj382++ {
|
||||
yyh382.ElemContainerState(yyj382)
|
||||
if r.TryDecodeAsNil() {
|
||||
yyv382[yyj382] = ScheduledJob{}
|
||||
yyv382[yyj382] = CronJob{}
|
||||
} else {
|
||||
yyv383 := &yyv382[yyj382]
|
||||
yyv383.CodecDecodeSelf(d)
|
||||
@@ -4511,10 +4511,10 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
||||
}
|
||||
if yyrt382 {
|
||||
for ; yyj382 < yyl382; yyj382++ {
|
||||
yyv382 = append(yyv382, ScheduledJob{})
|
||||
yyv382 = append(yyv382, CronJob{})
|
||||
yyh382.ElemContainerState(yyj382)
|
||||
if r.TryDecodeAsNil() {
|
||||
yyv382[yyj382] = ScheduledJob{}
|
||||
yyv382[yyj382] = CronJob{}
|
||||
} else {
|
||||
yyv384 := &yyv382[yyj382]
|
||||
yyv384.CodecDecodeSelf(d)
|
||||
@@ -4528,13 +4528,13 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
||||
for ; !r.CheckBreak(); yyj382++ {
|
||||
|
||||
if yyj382 >= len(yyv382) {
|
||||
yyv382 = append(yyv382, ScheduledJob{}) // var yyz382 ScheduledJob
|
||||
yyv382 = append(yyv382, CronJob{}) // var yyz382 CronJob
|
||||
yyc382 = true
|
||||
}
|
||||
yyh382.ElemContainerState(yyj382)
|
||||
if yyj382 < len(yyv382) {
|
||||
if r.TryDecodeAsNil() {
|
||||
yyv382[yyj382] = ScheduledJob{}
|
||||
yyv382[yyj382] = CronJob{}
|
||||
} else {
|
||||
yyv385 := &yyv382[yyj382]
|
||||
yyv385.CodecDecodeSelf(d)
|
||||
@@ -4549,7 +4549,7 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
||||
yyv382 = yyv382[:yyj382]
|
||||
yyc382 = true
|
||||
} else if yyj382 == 0 && yyv382 == nil {
|
||||
yyv382 = []ScheduledJob{}
|
||||
yyv382 = []CronJob{}
|
||||
yyc382 = true
|
||||
}
|
||||
}
|
||||
|
@@ -196,8 +196,8 @@ type JobCondition struct {
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// ScheduledJob represents the configuration of a single scheduled job.
|
||||
type ScheduledJob struct {
|
||||
// CronJob represents the configuration of a single cron job.
|
||||
type CronJob struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
@@ -207,28 +207,28 @@ type ScheduledJob struct {
|
||||
// Spec is a structure defining the expected behavior of a job, including the schedule.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Spec ScheduledJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||
Spec CronJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||
|
||||
// Status is a structure describing current status of a job.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Status ScheduledJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
Status CronJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
|
||||
// ScheduledJobList is a collection of scheduled jobs.
|
||||
type ScheduledJobList struct {
|
||||
// CronJobList is a collection of cron jobs.
|
||||
type CronJobList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard list metadata
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of ScheduledJob.
|
||||
Items []ScheduledJob `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
// Items is the list of CronJob.
|
||||
Items []CronJob `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// ScheduledJobSpec describes how the job execution will look like and when it will actually run.
|
||||
type ScheduledJobSpec struct {
|
||||
// CronJobSpec describes how the job execution will look like and when it will actually run.
|
||||
type CronJobSpec struct {
|
||||
|
||||
// Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
|
||||
Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"`
|
||||
@@ -248,7 +248,7 @@ type ScheduledJobSpec struct {
|
||||
Suspend *bool `json:"suspend,omitempty" protobuf:"varint,4,opt,name=suspend"`
|
||||
|
||||
// JobTemplate is the object that describes the job that will be created when
|
||||
// executing a ScheduledJob.
|
||||
// executing a CronJob.
|
||||
JobTemplate JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"`
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ type ScheduledJobSpec struct {
|
||||
type ConcurrencyPolicy string
|
||||
|
||||
const (
|
||||
// AllowConcurrent allows ScheduledJobs to run concurrently.
|
||||
// AllowConcurrent allows CronJobs to run concurrently.
|
||||
AllowConcurrent ConcurrencyPolicy = "Allow"
|
||||
|
||||
// ForbidConcurrent forbids concurrent runs, skipping next run if previous
|
||||
@@ -270,8 +270,8 @@ const (
|
||||
ReplaceConcurrent ConcurrencyPolicy = "Replace"
|
||||
)
|
||||
|
||||
// ScheduledJobStatus represents the current state of a Job.
|
||||
type ScheduledJobStatus struct {
|
||||
// CronJobStatus represents the current state of a cron job.
|
||||
type CronJobStatus struct {
|
||||
// Active holds pointers to currently running jobs.
|
||||
// +optional
|
||||
Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"`
|
||||
|
@@ -110,48 +110,48 @@ func (JobTemplateSpec) SwaggerDoc() map[string]string {
|
||||
return map_JobTemplateSpec
|
||||
}
|
||||
|
||||
var map_ScheduledJob = map[string]string{
|
||||
"": "ScheduledJob represents the configuration of a single scheduled job.",
|
||||
var map_CronJob = map[string]string{
|
||||
"": "CronJob represents the configuration of a single scheduled job.",
|
||||
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
||||
"spec": "Spec is a structure defining the expected behavior of a job, including the schedule. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
|
||||
"status": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
|
||||
}
|
||||
|
||||
func (ScheduledJob) SwaggerDoc() map[string]string {
|
||||
return map_ScheduledJob
|
||||
func (CronJob) SwaggerDoc() map[string]string {
|
||||
return map_CronJob
|
||||
}
|
||||
|
||||
var map_ScheduledJobList = map[string]string{
|
||||
"": "ScheduledJobList is a collection of scheduled jobs.",
|
||||
var map_CronJobList = map[string]string{
|
||||
"": "CronJobList is a collection of scheduled jobs.",
|
||||
"metadata": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
||||
"items": "Items is the list of ScheduledJob.",
|
||||
"items": "Items is the list of CronJob.",
|
||||
}
|
||||
|
||||
func (ScheduledJobList) SwaggerDoc() map[string]string {
|
||||
return map_ScheduledJobList
|
||||
func (CronJobList) SwaggerDoc() map[string]string {
|
||||
return map_CronJobList
|
||||
}
|
||||
|
||||
var map_ScheduledJobSpec = map[string]string{
|
||||
"": "ScheduledJobSpec describes how the job execution will look like and when it will actually run.",
|
||||
var map_CronJobSpec = map[string]string{
|
||||
"": "CronJobSpec describes how the job execution will look like and when it will actually run.",
|
||||
"schedule": "Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.",
|
||||
"startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.",
|
||||
"concurrencyPolicy": "ConcurrencyPolicy specifies how to treat concurrent executions of a Job.",
|
||||
"suspend": "Suspend flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.",
|
||||
"jobTemplate": "JobTemplate is the object that describes the job that will be created when executing a ScheduledJob.",
|
||||
"jobTemplate": "JobTemplate is the object that describes the job that will be created when executing a CronJob.",
|
||||
}
|
||||
|
||||
func (ScheduledJobSpec) SwaggerDoc() map[string]string {
|
||||
return map_ScheduledJobSpec
|
||||
func (CronJobSpec) SwaggerDoc() map[string]string {
|
||||
return map_CronJobSpec
|
||||
}
|
||||
|
||||
var map_ScheduledJobStatus = map[string]string{
|
||||
"": "ScheduledJobStatus represents the current state of a Job.",
|
||||
var map_CronJobStatus = map[string]string{
|
||||
"": "CronJobStatus represents the current state of a Job.",
|
||||
"active": "Active holds pointers to currently running jobs.",
|
||||
"lastScheduleTime": "LastScheduleTime keeps information of when was the last time the job was successfully scheduled.",
|
||||
}
|
||||
|
||||
func (ScheduledJobStatus) SwaggerDoc() map[string]string {
|
||||
return map_ScheduledJobStatus
|
||||
func (CronJobStatus) SwaggerDoc() map[string]string {
|
||||
return map_CronJobStatus
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
||||
|
@@ -38,6 +38,14 @@ func init() {
|
||||
// Public to allow building arbitrary schemes.
|
||||
func RegisterConversions(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedConversionFuncs(
|
||||
Convert_v2alpha1_CronJob_To_batch_CronJob,
|
||||
Convert_batch_CronJob_To_v2alpha1_CronJob,
|
||||
Convert_v2alpha1_CronJobList_To_batch_CronJobList,
|
||||
Convert_batch_CronJobList_To_v2alpha1_CronJobList,
|
||||
Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec,
|
||||
Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec,
|
||||
Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus,
|
||||
Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus,
|
||||
Convert_v2alpha1_Job_To_batch_Job,
|
||||
Convert_batch_Job_To_v2alpha1_Job,
|
||||
Convert_v2alpha1_JobCondition_To_batch_JobCondition,
|
||||
@@ -52,17 +60,135 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
||||
Convert_batch_JobTemplate_To_v2alpha1_JobTemplate,
|
||||
Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec,
|
||||
Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec,
|
||||
Convert_v2alpha1_ScheduledJob_To_batch_ScheduledJob,
|
||||
Convert_batch_ScheduledJob_To_v2alpha1_ScheduledJob,
|
||||
Convert_v2alpha1_ScheduledJobList_To_batch_ScheduledJobList,
|
||||
Convert_batch_ScheduledJobList_To_v2alpha1_ScheduledJobList,
|
||||
Convert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec,
|
||||
Convert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec,
|
||||
Convert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus,
|
||||
Convert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus,
|
||||
)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, s conversion.Scope) error {
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_CronJob_To_batch_CronJob(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_batch_CronJob_To_v2alpha1_CronJob(in *batch.CronJob, out *CronJob, s conversion.Scope) error {
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_batch_CronJob_To_v2alpha1_CronJob(in *batch.CronJob, out *CronJob, s conversion.Scope) error {
|
||||
return autoConvert_batch_CronJob_To_v2alpha1_CronJob(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_CronJobList_To_batch_CronJobList(in *CronJobList, out *batch.CronJobList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]batch.CronJob, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v2alpha1_CronJob_To_batch_CronJob(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v2alpha1_CronJobList_To_batch_CronJobList(in *CronJobList, out *batch.CronJobList, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_CronJobList_To_batch_CronJobList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_batch_CronJobList_To_v2alpha1_CronJobList(in *batch.CronJobList, out *CronJobList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]CronJob, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_batch_CronJob_To_v2alpha1_CronJob(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_batch_CronJobList_To_v2alpha1_CronJobList(in *batch.CronJobList, out *CronJobList, s conversion.Scope) error {
|
||||
return autoConvert_batch_CronJobList_To_v2alpha1_CronJobList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in *CronJobSpec, out *batch.CronJobSpec, s conversion.Scope) error {
|
||||
out.Schedule = in.Schedule
|
||||
out.StartingDeadlineSeconds = (*int64)(unsafe.Pointer(in.StartingDeadlineSeconds))
|
||||
out.ConcurrencyPolicy = batch.ConcurrencyPolicy(in.ConcurrencyPolicy)
|
||||
out.Suspend = (*bool)(unsafe.Pointer(in.Suspend))
|
||||
if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in *CronJobSpec, out *batch.CronJobSpec, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in *batch.CronJobSpec, out *CronJobSpec, s conversion.Scope) error {
|
||||
out.Schedule = in.Schedule
|
||||
out.StartingDeadlineSeconds = (*int64)(unsafe.Pointer(in.StartingDeadlineSeconds))
|
||||
out.ConcurrencyPolicy = ConcurrencyPolicy(in.ConcurrencyPolicy)
|
||||
out.Suspend = (*bool)(unsafe.Pointer(in.Suspend))
|
||||
if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in *batch.CronJobSpec, out *CronJobSpec, s conversion.Scope) error {
|
||||
return autoConvert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(in *CronJobStatus, out *batch.CronJobStatus, s conversion.Scope) error {
|
||||
out.Active = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Active))
|
||||
out.LastScheduleTime = (*unversioned.Time)(unsafe.Pointer(in.LastScheduleTime))
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(in *CronJobStatus, out *batch.CronJobStatus, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in *batch.CronJobStatus, out *CronJobStatus, s conversion.Scope) error {
|
||||
out.Active = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.Active))
|
||||
out.LastScheduleTime = (*unversioned.Time)(unsafe.Pointer(in.LastScheduleTime))
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in *batch.CronJobStatus, out *CronJobStatus, s conversion.Scope) error {
|
||||
return autoConvert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
@@ -278,129 +404,3 @@ func autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.Job
|
||||
func Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.JobTemplateSpec, out *JobTemplateSpec, s conversion.Scope) error {
|
||||
return autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_ScheduledJob_To_batch_ScheduledJob(in *ScheduledJob, out *batch.ScheduledJob, s conversion.Scope) error {
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v2alpha1_ScheduledJob_To_batch_ScheduledJob(in *ScheduledJob, out *batch.ScheduledJob, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_ScheduledJob_To_batch_ScheduledJob(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_batch_ScheduledJob_To_v2alpha1_ScheduledJob(in *batch.ScheduledJob, out *ScheduledJob, s conversion.Scope) error {
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_batch_ScheduledJob_To_v2alpha1_ScheduledJob(in *batch.ScheduledJob, out *ScheduledJob, s conversion.Scope) error {
|
||||
return autoConvert_batch_ScheduledJob_To_v2alpha1_ScheduledJob(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_ScheduledJobList_To_batch_ScheduledJobList(in *ScheduledJobList, out *batch.ScheduledJobList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]batch.ScheduledJob, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v2alpha1_ScheduledJob_To_batch_ScheduledJob(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v2alpha1_ScheduledJobList_To_batch_ScheduledJobList(in *ScheduledJobList, out *batch.ScheduledJobList, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_ScheduledJobList_To_batch_ScheduledJobList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_batch_ScheduledJobList_To_v2alpha1_ScheduledJobList(in *batch.ScheduledJobList, out *ScheduledJobList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ScheduledJob, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_batch_ScheduledJob_To_v2alpha1_ScheduledJob(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_batch_ScheduledJobList_To_v2alpha1_ScheduledJobList(in *batch.ScheduledJobList, out *ScheduledJobList, s conversion.Scope) error {
|
||||
return autoConvert_batch_ScheduledJobList_To_v2alpha1_ScheduledJobList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec(in *ScheduledJobSpec, out *batch.ScheduledJobSpec, s conversion.Scope) error {
|
||||
out.Schedule = in.Schedule
|
||||
out.StartingDeadlineSeconds = (*int64)(unsafe.Pointer(in.StartingDeadlineSeconds))
|
||||
out.ConcurrencyPolicy = batch.ConcurrencyPolicy(in.ConcurrencyPolicy)
|
||||
out.Suspend = (*bool)(unsafe.Pointer(in.Suspend))
|
||||
if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec(in *ScheduledJobSpec, out *batch.ScheduledJobSpec, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec(in *batch.ScheduledJobSpec, out *ScheduledJobSpec, s conversion.Scope) error {
|
||||
out.Schedule = in.Schedule
|
||||
out.StartingDeadlineSeconds = (*int64)(unsafe.Pointer(in.StartingDeadlineSeconds))
|
||||
out.ConcurrencyPolicy = ConcurrencyPolicy(in.ConcurrencyPolicy)
|
||||
out.Suspend = (*bool)(unsafe.Pointer(in.Suspend))
|
||||
if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec(in *batch.ScheduledJobSpec, out *ScheduledJobSpec, s conversion.Scope) error {
|
||||
return autoConvert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(in *ScheduledJobStatus, out *batch.ScheduledJobStatus, s conversion.Scope) error {
|
||||
out.Active = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Active))
|
||||
out.LastScheduleTime = (*unversioned.Time)(unsafe.Pointer(in.LastScheduleTime))
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(in *ScheduledJobStatus, out *batch.ScheduledJobStatus, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus(in *batch.ScheduledJobStatus, out *ScheduledJobStatus, s conversion.Scope) error {
|
||||
out.Active = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.Active))
|
||||
out.LastScheduleTime = (*unversioned.Time)(unsafe.Pointer(in.LastScheduleTime))
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus(in *batch.ScheduledJobStatus, out *ScheduledJobStatus, s conversion.Scope) error {
|
||||
return autoConvert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus(in, out, s)
|
||||
}
|
||||
|
@@ -36,6 +36,10 @@ func init() {
|
||||
// to allow building arbitrary schemes.
|
||||
func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedDeepCopyFuncs(
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJob, InType: reflect.TypeOf(&CronJob{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJobList, InType: reflect.TypeOf(&CronJobList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJobSpec, InType: reflect.TypeOf(&CronJobSpec{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJobStatus, InType: reflect.TypeOf(&CronJobStatus{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_Job, InType: reflect.TypeOf(&Job{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobCondition, InType: reflect.TypeOf(&JobCondition{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobList, InType: reflect.TypeOf(&JobList{})},
|
||||
@@ -43,13 +47,99 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobStatus, InType: reflect.TypeOf(&JobStatus{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobTemplate, InType: reflect.TypeOf(&JobTemplate{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobTemplateSpec, InType: reflect.TypeOf(&JobTemplateSpec{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJob, InType: reflect.TypeOf(&ScheduledJob{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJobList, InType: reflect.TypeOf(&ScheduledJobList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJobSpec, InType: reflect.TypeOf(&ScheduledJobSpec{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJobStatus, InType: reflect.TypeOf(&ScheduledJobStatus{})},
|
||||
)
|
||||
}
|
||||
|
||||
func DeepCopy_v2alpha1_CronJob(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*CronJob)
|
||||
out := out.(*CronJob)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v2alpha1_CronJobStatus(&in.Status, &out.Status, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v2alpha1_CronJobList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*CronJobList)
|
||||
out := out.(*CronJobList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]CronJob, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_v2alpha1_CronJob(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v2alpha1_CronJobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*CronJobSpec)
|
||||
out := out.(*CronJobSpec)
|
||||
out.Schedule = in.Schedule
|
||||
if in.StartingDeadlineSeconds != nil {
|
||||
in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
} else {
|
||||
out.StartingDeadlineSeconds = nil
|
||||
}
|
||||
out.ConcurrencyPolicy = in.ConcurrencyPolicy
|
||||
if in.Suspend != nil {
|
||||
in, out := &in.Suspend, &out.Suspend
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
} else {
|
||||
out.Suspend = nil
|
||||
}
|
||||
if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v2alpha1_CronJobStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*CronJobStatus)
|
||||
out := out.(*CronJobStatus)
|
||||
if in.Active != nil {
|
||||
in, out := &in.Active, &out.Active
|
||||
*out = make([]v1.ObjectReference, len(*in))
|
||||
for i := range *in {
|
||||
(*out)[i] = (*in)[i]
|
||||
}
|
||||
} else {
|
||||
out.Active = nil
|
||||
}
|
||||
if in.LastScheduleTime != nil {
|
||||
in, out := &in.LastScheduleTime, &out.LastScheduleTime
|
||||
*out = new(unversioned.Time)
|
||||
**out = (*in).DeepCopy()
|
||||
} else {
|
||||
out.LastScheduleTime = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v2alpha1_Job(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*Job)
|
||||
@@ -215,93 +305,3 @@ func DeepCopy_v2alpha1_JobTemplateSpec(in interface{}, out interface{}, c *conve
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v2alpha1_ScheduledJob(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ScheduledJob)
|
||||
out := out.(*ScheduledJob)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v2alpha1_ScheduledJobSpec(&in.Spec, &out.Spec, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v2alpha1_ScheduledJobStatus(&in.Status, &out.Status, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v2alpha1_ScheduledJobList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ScheduledJobList)
|
||||
out := out.(*ScheduledJobList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ScheduledJob, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_v2alpha1_ScheduledJob(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v2alpha1_ScheduledJobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ScheduledJobSpec)
|
||||
out := out.(*ScheduledJobSpec)
|
||||
out.Schedule = in.Schedule
|
||||
if in.StartingDeadlineSeconds != nil {
|
||||
in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
} else {
|
||||
out.StartingDeadlineSeconds = nil
|
||||
}
|
||||
out.ConcurrencyPolicy = in.ConcurrencyPolicy
|
||||
if in.Suspend != nil {
|
||||
in, out := &in.Suspend, &out.Suspend
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
} else {
|
||||
out.Suspend = nil
|
||||
}
|
||||
if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v2alpha1_ScheduledJobStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ScheduledJobStatus)
|
||||
out := out.(*ScheduledJobStatus)
|
||||
if in.Active != nil {
|
||||
in, out := &in.Active, &out.Active
|
||||
*out = make([]v1.ObjectReference, len(*in))
|
||||
for i := range *in {
|
||||
(*out)[i] = (*in)[i]
|
||||
}
|
||||
} else {
|
||||
out.Active = nil
|
||||
}
|
||||
if in.LastScheduleTime != nil {
|
||||
in, out := &in.LastScheduleTime, &out.LastScheduleTime
|
||||
*out = new(unversioned.Time)
|
||||
**out = (*in).DeepCopy()
|
||||
} else {
|
||||
out.LastScheduleTime = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
@@ -29,14 +29,138 @@ import (
|
||||
// Public to allow building arbitrary schemes.
|
||||
// All generated defaulters are covering - they call all nested defaulters.
|
||||
func RegisterDefaults(scheme *runtime.Scheme) error {
|
||||
scheme.AddTypeDefaultingFunc(&CronJob{}, func(obj interface{}) { SetObjectDefaults_CronJob(obj.(*CronJob)) })
|
||||
scheme.AddTypeDefaultingFunc(&CronJobList{}, func(obj interface{}) { SetObjectDefaults_CronJobList(obj.(*CronJobList)) })
|
||||
scheme.AddTypeDefaultingFunc(&Job{}, func(obj interface{}) { SetObjectDefaults_Job(obj.(*Job)) })
|
||||
scheme.AddTypeDefaultingFunc(&JobList{}, func(obj interface{}) { SetObjectDefaults_JobList(obj.(*JobList)) })
|
||||
scheme.AddTypeDefaultingFunc(&JobTemplate{}, func(obj interface{}) { SetObjectDefaults_JobTemplate(obj.(*JobTemplate)) })
|
||||
scheme.AddTypeDefaultingFunc(&ScheduledJob{}, func(obj interface{}) { SetObjectDefaults_ScheduledJob(obj.(*ScheduledJob)) })
|
||||
scheme.AddTypeDefaultingFunc(&ScheduledJobList{}, func(obj interface{}) { SetObjectDefaults_ScheduledJobList(obj.(*ScheduledJobList)) })
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetObjectDefaults_CronJob(in *CronJob) {
|
||||
SetDefaults_CronJob(in)
|
||||
v1.SetDefaults_PodSpec(&in.Spec.JobTemplate.Spec.Template.Spec)
|
||||
for i := range in.Spec.JobTemplate.Spec.Template.Spec.Volumes {
|
||||
a := &in.Spec.JobTemplate.Spec.Template.Spec.Volumes[i]
|
||||
v1.SetDefaults_Volume(a)
|
||||
if a.VolumeSource.Secret != nil {
|
||||
v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
|
||||
}
|
||||
if a.VolumeSource.ISCSI != nil {
|
||||
v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
|
||||
}
|
||||
if a.VolumeSource.RBD != nil {
|
||||
v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
|
||||
}
|
||||
if a.VolumeSource.DownwardAPI != nil {
|
||||
v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
|
||||
for j := range a.VolumeSource.DownwardAPI.Items {
|
||||
b := &a.VolumeSource.DownwardAPI.Items[j]
|
||||
if b.FieldRef != nil {
|
||||
v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
|
||||
}
|
||||
}
|
||||
}
|
||||
if a.VolumeSource.ConfigMap != nil {
|
||||
v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
|
||||
}
|
||||
if a.VolumeSource.AzureDisk != nil {
|
||||
v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
|
||||
}
|
||||
}
|
||||
for i := range in.Spec.JobTemplate.Spec.Template.Spec.InitContainers {
|
||||
a := &in.Spec.JobTemplate.Spec.Template.Spec.InitContainers[i]
|
||||
v1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
v1.SetDefaults_ContainerPort(b)
|
||||
}
|
||||
for j := range a.Env {
|
||||
b := &a.Env[j]
|
||||
if b.ValueFrom != nil {
|
||||
if b.ValueFrom.FieldRef != nil {
|
||||
v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
|
||||
}
|
||||
}
|
||||
}
|
||||
v1.SetDefaults_ResourceList(&a.Resources.Limits)
|
||||
v1.SetDefaults_ResourceList(&a.Resources.Requests)
|
||||
if a.LivenessProbe != nil {
|
||||
v1.SetDefaults_Probe(a.LivenessProbe)
|
||||
if a.LivenessProbe.Handler.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
|
||||
}
|
||||
}
|
||||
if a.ReadinessProbe != nil {
|
||||
v1.SetDefaults_Probe(a.ReadinessProbe)
|
||||
if a.ReadinessProbe.Handler.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
|
||||
}
|
||||
}
|
||||
if a.Lifecycle != nil {
|
||||
if a.Lifecycle.PostStart != nil {
|
||||
if a.Lifecycle.PostStart.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
|
||||
}
|
||||
}
|
||||
if a.Lifecycle.PreStop != nil {
|
||||
if a.Lifecycle.PreStop.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for i := range in.Spec.JobTemplate.Spec.Template.Spec.Containers {
|
||||
a := &in.Spec.JobTemplate.Spec.Template.Spec.Containers[i]
|
||||
v1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
v1.SetDefaults_ContainerPort(b)
|
||||
}
|
||||
for j := range a.Env {
|
||||
b := &a.Env[j]
|
||||
if b.ValueFrom != nil {
|
||||
if b.ValueFrom.FieldRef != nil {
|
||||
v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
|
||||
}
|
||||
}
|
||||
}
|
||||
v1.SetDefaults_ResourceList(&a.Resources.Limits)
|
||||
v1.SetDefaults_ResourceList(&a.Resources.Requests)
|
||||
if a.LivenessProbe != nil {
|
||||
v1.SetDefaults_Probe(a.LivenessProbe)
|
||||
if a.LivenessProbe.Handler.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
|
||||
}
|
||||
}
|
||||
if a.ReadinessProbe != nil {
|
||||
v1.SetDefaults_Probe(a.ReadinessProbe)
|
||||
if a.ReadinessProbe.Handler.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
|
||||
}
|
||||
}
|
||||
if a.Lifecycle != nil {
|
||||
if a.Lifecycle.PostStart != nil {
|
||||
if a.Lifecycle.PostStart.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
|
||||
}
|
||||
}
|
||||
if a.Lifecycle.PreStop != nil {
|
||||
if a.Lifecycle.PreStop.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_CronJobList(in *CronJobList) {
|
||||
for i := range in.Items {
|
||||
a := &in.Items[i]
|
||||
SetObjectDefaults_CronJob(a)
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_Job(in *Job) {
|
||||
SetDefaults_Job(in)
|
||||
v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
|
||||
@@ -276,127 +400,3 @@ func SetObjectDefaults_JobTemplate(in *JobTemplate) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_ScheduledJob(in *ScheduledJob) {
|
||||
SetDefaults_ScheduledJob(in)
|
||||
v1.SetDefaults_PodSpec(&in.Spec.JobTemplate.Spec.Template.Spec)
|
||||
for i := range in.Spec.JobTemplate.Spec.Template.Spec.Volumes {
|
||||
a := &in.Spec.JobTemplate.Spec.Template.Spec.Volumes[i]
|
||||
v1.SetDefaults_Volume(a)
|
||||
if a.VolumeSource.Secret != nil {
|
||||
v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
|
||||
}
|
||||
if a.VolumeSource.ISCSI != nil {
|
||||
v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
|
||||
}
|
||||
if a.VolumeSource.RBD != nil {
|
||||
v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
|
||||
}
|
||||
if a.VolumeSource.DownwardAPI != nil {
|
||||
v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
|
||||
for j := range a.VolumeSource.DownwardAPI.Items {
|
||||
b := &a.VolumeSource.DownwardAPI.Items[j]
|
||||
if b.FieldRef != nil {
|
||||
v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
|
||||
}
|
||||
}
|
||||
}
|
||||
if a.VolumeSource.ConfigMap != nil {
|
||||
v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
|
||||
}
|
||||
if a.VolumeSource.AzureDisk != nil {
|
||||
v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
|
||||
}
|
||||
}
|
||||
for i := range in.Spec.JobTemplate.Spec.Template.Spec.InitContainers {
|
||||
a := &in.Spec.JobTemplate.Spec.Template.Spec.InitContainers[i]
|
||||
v1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
v1.SetDefaults_ContainerPort(b)
|
||||
}
|
||||
for j := range a.Env {
|
||||
b := &a.Env[j]
|
||||
if b.ValueFrom != nil {
|
||||
if b.ValueFrom.FieldRef != nil {
|
||||
v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
|
||||
}
|
||||
}
|
||||
}
|
||||
v1.SetDefaults_ResourceList(&a.Resources.Limits)
|
||||
v1.SetDefaults_ResourceList(&a.Resources.Requests)
|
||||
if a.LivenessProbe != nil {
|
||||
v1.SetDefaults_Probe(a.LivenessProbe)
|
||||
if a.LivenessProbe.Handler.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
|
||||
}
|
||||
}
|
||||
if a.ReadinessProbe != nil {
|
||||
v1.SetDefaults_Probe(a.ReadinessProbe)
|
||||
if a.ReadinessProbe.Handler.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
|
||||
}
|
||||
}
|
||||
if a.Lifecycle != nil {
|
||||
if a.Lifecycle.PostStart != nil {
|
||||
if a.Lifecycle.PostStart.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
|
||||
}
|
||||
}
|
||||
if a.Lifecycle.PreStop != nil {
|
||||
if a.Lifecycle.PreStop.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for i := range in.Spec.JobTemplate.Spec.Template.Spec.Containers {
|
||||
a := &in.Spec.JobTemplate.Spec.Template.Spec.Containers[i]
|
||||
v1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
v1.SetDefaults_ContainerPort(b)
|
||||
}
|
||||
for j := range a.Env {
|
||||
b := &a.Env[j]
|
||||
if b.ValueFrom != nil {
|
||||
if b.ValueFrom.FieldRef != nil {
|
||||
v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
|
||||
}
|
||||
}
|
||||
}
|
||||
v1.SetDefaults_ResourceList(&a.Resources.Limits)
|
||||
v1.SetDefaults_ResourceList(&a.Resources.Requests)
|
||||
if a.LivenessProbe != nil {
|
||||
v1.SetDefaults_Probe(a.LivenessProbe)
|
||||
if a.LivenessProbe.Handler.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
|
||||
}
|
||||
}
|
||||
if a.ReadinessProbe != nil {
|
||||
v1.SetDefaults_Probe(a.ReadinessProbe)
|
||||
if a.ReadinessProbe.Handler.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
|
||||
}
|
||||
}
|
||||
if a.Lifecycle != nil {
|
||||
if a.Lifecycle.PostStart != nil {
|
||||
if a.Lifecycle.PostStart.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
|
||||
}
|
||||
}
|
||||
if a.Lifecycle.PreStop != nil {
|
||||
if a.Lifecycle.PreStop.HTTPGet != nil {
|
||||
v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_ScheduledJobList(in *ScheduledJobList) {
|
||||
for i := range in.Items {
|
||||
a := &in.Items[i]
|
||||
SetObjectDefaults_ScheduledJob(a)
|
||||
}
|
||||
}
|
||||
|
@@ -158,14 +158,14 @@ func ValidateJobStatusUpdate(status, oldStatus batch.JobStatus) field.ErrorList
|
||||
return allErrs
|
||||
}
|
||||
|
||||
func ValidateScheduledJob(scheduledJob *batch.ScheduledJob) field.ErrorList {
|
||||
// ScheduledJobs and rcs have the same name validation
|
||||
func ValidateCronJob(scheduledJob *batch.CronJob) field.ErrorList {
|
||||
// CronJobs and rcs have the same name validation
|
||||
allErrs := apivalidation.ValidateObjectMeta(&scheduledJob.ObjectMeta, true, apivalidation.ValidateReplicationControllerName, field.NewPath("metadata"))
|
||||
allErrs = append(allErrs, ValidateScheduledJobSpec(&scheduledJob.Spec, field.NewPath("spec"))...)
|
||||
allErrs = append(allErrs, ValidateCronJobSpec(&scheduledJob.Spec, field.NewPath("spec"))...)
|
||||
return allErrs
|
||||
}
|
||||
|
||||
func ValidateScheduledJobSpec(spec *batch.ScheduledJobSpec, fldPath *field.Path) field.ErrorList {
|
||||
func ValidateCronJobSpec(spec *batch.CronJobSpec, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
|
||||
if len(spec.Schedule) == 0 {
|
||||
|
@@ -304,19 +304,19 @@ func TestValidateJobUpdateStatus(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidateScheduledJob(t *testing.T) {
|
||||
func TestValidateCronJob(t *testing.T) {
|
||||
validManualSelector := getValidManualSelector()
|
||||
validPodTemplateSpec := getValidPodTemplateSpecForGenerated(getValidGeneratedSelector())
|
||||
validPodTemplateSpec.Labels = map[string]string{}
|
||||
|
||||
successCases := map[string]batch.ScheduledJob{
|
||||
successCases := map[string]batch.CronJob{
|
||||
"basic scheduled job": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "myscheduledjob",
|
||||
Name: "mycronjob",
|
||||
Namespace: api.NamespaceDefault,
|
||||
UID: types.UID("1a2b3c"),
|
||||
},
|
||||
Spec: batch.ScheduledJobSpec{
|
||||
Spec: batch.CronJobSpec{
|
||||
Schedule: "* * * * ?",
|
||||
ConcurrencyPolicy: batch.AllowConcurrent,
|
||||
JobTemplate: batch.JobTemplateSpec{
|
||||
@@ -328,11 +328,11 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
},
|
||||
"non-standard scheduled": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "myscheduledjob",
|
||||
Name: "mycronjob",
|
||||
Namespace: api.NamespaceDefault,
|
||||
UID: types.UID("1a2b3c"),
|
||||
},
|
||||
Spec: batch.ScheduledJobSpec{
|
||||
Spec: batch.CronJobSpec{
|
||||
Schedule: "@hourly",
|
||||
ConcurrencyPolicy: batch.AllowConcurrent,
|
||||
JobTemplate: batch.JobTemplateSpec{
|
||||
@@ -344,7 +344,7 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for k, v := range successCases {
|
||||
if errs := ValidateScheduledJob(&v); len(errs) != 0 {
|
||||
if errs := ValidateCronJob(&v); len(errs) != 0 {
|
||||
t.Errorf("expected success for %s: %v", k, errs)
|
||||
}
|
||||
}
|
||||
@@ -352,14 +352,14 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
negative := int32(-1)
|
||||
negative64 := int64(-1)
|
||||
|
||||
errorCases := map[string]batch.ScheduledJob{
|
||||
errorCases := map[string]batch.CronJob{
|
||||
"spec.schedule: Invalid value": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "myscheduledjob",
|
||||
Name: "mycronjob",
|
||||
Namespace: api.NamespaceDefault,
|
||||
UID: types.UID("1a2b3c"),
|
||||
},
|
||||
Spec: batch.ScheduledJobSpec{
|
||||
Spec: batch.CronJobSpec{
|
||||
Schedule: "error",
|
||||
ConcurrencyPolicy: batch.AllowConcurrent,
|
||||
JobTemplate: batch.JobTemplateSpec{
|
||||
@@ -371,11 +371,11 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
},
|
||||
"spec.schedule: Required value": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "myscheduledjob",
|
||||
Name: "mycronjob",
|
||||
Namespace: api.NamespaceDefault,
|
||||
UID: types.UID("1a2b3c"),
|
||||
},
|
||||
Spec: batch.ScheduledJobSpec{
|
||||
Spec: batch.CronJobSpec{
|
||||
Schedule: "",
|
||||
ConcurrencyPolicy: batch.AllowConcurrent,
|
||||
JobTemplate: batch.JobTemplateSpec{
|
||||
@@ -387,11 +387,11 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
},
|
||||
"spec.startingDeadlineSeconds:must be greater than or equal to 0": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "myscheduledjob",
|
||||
Name: "mycronjob",
|
||||
Namespace: api.NamespaceDefault,
|
||||
UID: types.UID("1a2b3c"),
|
||||
},
|
||||
Spec: batch.ScheduledJobSpec{
|
||||
Spec: batch.CronJobSpec{
|
||||
Schedule: "* * * * ?",
|
||||
ConcurrencyPolicy: batch.AllowConcurrent,
|
||||
StartingDeadlineSeconds: &negative64,
|
||||
@@ -404,11 +404,11 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
},
|
||||
"spec.concurrencyPolicy: Required value": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "myscheduledjob",
|
||||
Name: "mycronjob",
|
||||
Namespace: api.NamespaceDefault,
|
||||
UID: types.UID("1a2b3c"),
|
||||
},
|
||||
Spec: batch.ScheduledJobSpec{
|
||||
Spec: batch.CronJobSpec{
|
||||
Schedule: "* * * * ?",
|
||||
JobTemplate: batch.JobTemplateSpec{
|
||||
Spec: batch.JobSpec{
|
||||
@@ -419,11 +419,11 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
},
|
||||
"spec.jobTemplate.spec.parallelism:must be greater than or equal to 0": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "myscheduledjob",
|
||||
Name: "mycronjob",
|
||||
Namespace: api.NamespaceDefault,
|
||||
UID: types.UID("1a2b3c"),
|
||||
},
|
||||
Spec: batch.ScheduledJobSpec{
|
||||
Spec: batch.CronJobSpec{
|
||||
Schedule: "* * * * ?",
|
||||
ConcurrencyPolicy: batch.AllowConcurrent,
|
||||
JobTemplate: batch.JobTemplateSpec{
|
||||
@@ -436,11 +436,11 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
},
|
||||
"spec.jobTemplate.spec.completions:must be greater than or equal to 0": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "myscheduledjob",
|
||||
Name: "mycronjob",
|
||||
Namespace: api.NamespaceDefault,
|
||||
UID: types.UID("1a2b3c"),
|
||||
},
|
||||
Spec: batch.ScheduledJobSpec{
|
||||
Spec: batch.CronJobSpec{
|
||||
Schedule: "* * * * ?",
|
||||
ConcurrencyPolicy: batch.AllowConcurrent,
|
||||
JobTemplate: batch.JobTemplateSpec{
|
||||
@@ -454,11 +454,11 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
},
|
||||
"spec.jobTemplate.spec.activeDeadlineSeconds:must be greater than or equal to 0": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "myscheduledjob",
|
||||
Name: "mycronjob",
|
||||
Namespace: api.NamespaceDefault,
|
||||
UID: types.UID("1a2b3c"),
|
||||
},
|
||||
Spec: batch.ScheduledJobSpec{
|
||||
Spec: batch.CronJobSpec{
|
||||
Schedule: "* * * * ?",
|
||||
ConcurrencyPolicy: batch.AllowConcurrent,
|
||||
JobTemplate: batch.JobTemplateSpec{
|
||||
@@ -471,11 +471,11 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
},
|
||||
"spec.jobTemplate.spec.selector: Invalid value: {\"matchLabels\":{\"a\":\"b\"}}: `selector` will be auto-generated": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "myscheduledjob",
|
||||
Name: "mycronjob",
|
||||
Namespace: api.NamespaceDefault,
|
||||
UID: types.UID("1a2b3c"),
|
||||
},
|
||||
Spec: batch.ScheduledJobSpec{
|
||||
Spec: batch.CronJobSpec{
|
||||
Schedule: "* * * * ?",
|
||||
ConcurrencyPolicy: batch.AllowConcurrent,
|
||||
JobTemplate: batch.JobTemplateSpec{
|
||||
@@ -488,11 +488,11 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
},
|
||||
"spec.jobTemplate.spec.manualSelector: Unsupported value": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "myscheduledjob",
|
||||
Name: "mycronjob",
|
||||
Namespace: api.NamespaceDefault,
|
||||
UID: types.UID("1a2b3c"),
|
||||
},
|
||||
Spec: batch.ScheduledJobSpec{
|
||||
Spec: batch.CronJobSpec{
|
||||
Schedule: "* * * * ?",
|
||||
ConcurrencyPolicy: batch.AllowConcurrent,
|
||||
JobTemplate: batch.JobTemplateSpec{
|
||||
@@ -505,11 +505,11 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
},
|
||||
"spec.jobTemplate.spec.template.spec.restartPolicy: Unsupported value": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "myscheduledjob",
|
||||
Name: "mycronjob",
|
||||
Namespace: api.NamespaceDefault,
|
||||
UID: types.UID("1a2b3c"),
|
||||
},
|
||||
Spec: batch.ScheduledJobSpec{
|
||||
Spec: batch.CronJobSpec{
|
||||
Schedule: "* * * * ?",
|
||||
ConcurrencyPolicy: batch.AllowConcurrent,
|
||||
JobTemplate: batch.JobTemplateSpec{
|
||||
@@ -528,7 +528,7 @@ func TestValidateScheduledJob(t *testing.T) {
|
||||
}
|
||||
|
||||
for k, v := range errorCases {
|
||||
errs := ValidateScheduledJob(&v)
|
||||
errs := ValidateCronJob(&v)
|
||||
if len(errs) == 0 {
|
||||
t.Errorf("expected failure for %s", k)
|
||||
} else {
|
||||
|
@@ -36,6 +36,10 @@ func init() {
|
||||
// to allow building arbitrary schemes.
|
||||
func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedDeepCopyFuncs(
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJob, InType: reflect.TypeOf(&CronJob{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJobList, InType: reflect.TypeOf(&CronJobList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJobSpec, InType: reflect.TypeOf(&CronJobSpec{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJobStatus, InType: reflect.TypeOf(&CronJobStatus{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_Job, InType: reflect.TypeOf(&Job{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobCondition, InType: reflect.TypeOf(&JobCondition{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobList, InType: reflect.TypeOf(&JobList{})},
|
||||
@@ -43,13 +47,99 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobStatus, InType: reflect.TypeOf(&JobStatus{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobTemplate, InType: reflect.TypeOf(&JobTemplate{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobTemplateSpec, InType: reflect.TypeOf(&JobTemplateSpec{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJob, InType: reflect.TypeOf(&ScheduledJob{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJobList, InType: reflect.TypeOf(&ScheduledJobList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJobSpec, InType: reflect.TypeOf(&ScheduledJobSpec{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJobStatus, InType: reflect.TypeOf(&ScheduledJobStatus{})},
|
||||
)
|
||||
}
|
||||
|
||||
func DeepCopy_batch_CronJob(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*CronJob)
|
||||
out := out.(*CronJob)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_batch_CronJobSpec(&in.Spec, &out.Spec, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_batch_CronJobStatus(&in.Status, &out.Status, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_batch_CronJobList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*CronJobList)
|
||||
out := out.(*CronJobList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]CronJob, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_batch_CronJob(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_batch_CronJobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*CronJobSpec)
|
||||
out := out.(*CronJobSpec)
|
||||
out.Schedule = in.Schedule
|
||||
if in.StartingDeadlineSeconds != nil {
|
||||
in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
} else {
|
||||
out.StartingDeadlineSeconds = nil
|
||||
}
|
||||
out.ConcurrencyPolicy = in.ConcurrencyPolicy
|
||||
if in.Suspend != nil {
|
||||
in, out := &in.Suspend, &out.Suspend
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
} else {
|
||||
out.Suspend = nil
|
||||
}
|
||||
if err := DeepCopy_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_batch_CronJobStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*CronJobStatus)
|
||||
out := out.(*CronJobStatus)
|
||||
if in.Active != nil {
|
||||
in, out := &in.Active, &out.Active
|
||||
*out = make([]api.ObjectReference, len(*in))
|
||||
for i := range *in {
|
||||
(*out)[i] = (*in)[i]
|
||||
}
|
||||
} else {
|
||||
out.Active = nil
|
||||
}
|
||||
if in.LastScheduleTime != nil {
|
||||
in, out := &in.LastScheduleTime, &out.LastScheduleTime
|
||||
*out = new(unversioned.Time)
|
||||
**out = (*in).DeepCopy()
|
||||
} else {
|
||||
out.LastScheduleTime = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_batch_Job(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*Job)
|
||||
@@ -215,93 +305,3 @@ func DeepCopy_batch_JobTemplateSpec(in interface{}, out interface{}, c *conversi
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_batch_ScheduledJob(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ScheduledJob)
|
||||
out := out.(*ScheduledJob)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_batch_ScheduledJobSpec(&in.Spec, &out.Spec, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_batch_ScheduledJobStatus(&in.Status, &out.Status, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_batch_ScheduledJobList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ScheduledJobList)
|
||||
out := out.(*ScheduledJobList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ScheduledJob, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_batch_ScheduledJob(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_batch_ScheduledJobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ScheduledJobSpec)
|
||||
out := out.(*ScheduledJobSpec)
|
||||
out.Schedule = in.Schedule
|
||||
if in.StartingDeadlineSeconds != nil {
|
||||
in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
} else {
|
||||
out.StartingDeadlineSeconds = nil
|
||||
}
|
||||
out.ConcurrencyPolicy = in.ConcurrencyPolicy
|
||||
if in.Suspend != nil {
|
||||
in, out := &in.Suspend, &out.Suspend
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
} else {
|
||||
out.Suspend = nil
|
||||
}
|
||||
if err := DeepCopy_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_batch_ScheduledJobStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ScheduledJobStatus)
|
||||
out := out.(*ScheduledJobStatus)
|
||||
if in.Active != nil {
|
||||
in, out := &in.Active, &out.Active
|
||||
*out = make([]api.ObjectReference, len(*in))
|
||||
for i := range *in {
|
||||
(*out)[i] = (*in)[i]
|
||||
}
|
||||
} else {
|
||||
out.Active = nil
|
||||
}
|
||||
if in.LastScheduleTime != nil {
|
||||
in, out := &in.LastScheduleTime, &out.LastScheduleTime
|
||||
*out = new(unversioned.Time)
|
||||
**out = (*in).DeepCopy()
|
||||
} else {
|
||||
out.LastScheduleTime = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user