mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Rename ScheduledJob to CronJob
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user