Deprecate extensions/v1beta1.Jobs related stuff

pull/6/head
Maciej Szulik 2016-11-07 12:44:51 +01:00
parent 0c7421fb51
commit ed6ede3715
2 changed files with 5 additions and 0 deletions

View File

@ -617,6 +617,7 @@ type ThirdPartyResourceDataList struct {
// +genclient=true
// Job represents the configuration of a single job.
// DEPRECATED: extensions/v1beta1.Job is deprecated, use batch/v1.Job instead.
type Job struct {
unversioned.TypeMeta `json:",inline"`
// Standard object's metadata.
@ -636,6 +637,7 @@ type Job struct {
}
// JobList is a collection of jobs.
// DEPRECATED: extensions/v1beta1.JobList is deprecated, use batch/v1.JobList instead.
type JobList struct {
unversioned.TypeMeta `json:",inline"`
// Standard list metadata

View File

@ -228,6 +228,9 @@ func Run(f cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer, cmd *cobr
generatorName = "run-pod/v1"
}
}
if generatorName == "job/v1beta1" {
fmt.Fprintf(cmdErr, "DEPRECATED: --generator=job/v1beta1 is deprecated, use job/v1 instead.\n")
}
generators := f.Generators("run")
generator, found := generators[generatorName]
if !found {