From 70e5456118ae36025bb79904a4c3a48fcef48a3b Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Thu, 12 May 2016 12:32:41 +0200 Subject: [PATCH] ScheduledJob api leftovers --- pkg/apis/batch/register.go | 10 +++++++--- pkg/apis/batch/v2alpha1/register.go | 10 +++++++--- pkg/apis/batch/v2alpha1/types.go | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/pkg/apis/batch/register.go b/pkg/apis/batch/register.go index a3dc9b4de9e..8406f9ffbae 100644 --- a/pkg/apis/batch/register.go +++ b/pkg/apis/batch/register.go @@ -49,10 +49,14 @@ func addKnownTypes(scheme *runtime.Scheme) { &Job{}, &JobList{}, &JobTemplate{}, + &ScheduledJob{}, + &ScheduledJobList{}, &api.ListOptions{}, ) } -func (obj *Job) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } -func (obj *JobList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } -func (obj *JobTemplate) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *Job) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *JobList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *JobTemplate) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ScheduledJob) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ScheduledJobList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/apis/batch/v2alpha1/register.go b/pkg/apis/batch/v2alpha1/register.go index f887d716564..3d9dcb83f6c 100644 --- a/pkg/apis/batch/v2alpha1/register.go +++ b/pkg/apis/batch/v2alpha1/register.go @@ -41,11 +41,15 @@ func addKnownTypes(scheme *runtime.Scheme) { &Job{}, &JobList{}, &JobTemplate{}, + &ScheduledJob{}, + &ScheduledJobList{}, &v1.ListOptions{}, ) versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) } -func (obj *JobTemplate) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } -func (obj *Job) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } -func (obj *JobList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *Job) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *JobList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *JobTemplate) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ScheduledJob) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ScheduledJobList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/apis/batch/v2alpha1/types.go b/pkg/apis/batch/v2alpha1/types.go index f6615f1ef65..f33dfc1ed6d 100644 --- a/pkg/apis/batch/v2alpha1/types.go +++ b/pkg/apis/batch/v2alpha1/types.go @@ -215,7 +215,7 @@ type ScheduledJobSpec struct { // JobTemplate is the object that describes the job that will be created when // executing a ScheduledJob. - JobTemplate *JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"` + JobTemplate JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"` } // ConcurrencyPolicy describes how the job will be handled.