mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Generated changes for moving job internals from pkg/apis/extensions to pkg/apis/batch
This commit is contained in:
parent
a3b4447305
commit
c470afc206
@ -1,5 +1,7 @@
|
|||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2015 The Kubernetes Authors All rights reserved.
|
Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@ -14,16 +16,156 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// DO NOT EDIT. THIS FILE IS AUTO-GENERATED BY $KUBEROOT/hack/update-generated-deep-copies.sh.
|
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
|
||||||
|
|
||||||
package batch
|
package batch
|
||||||
|
|
||||||
import api "k8s.io/kubernetes/pkg/api"
|
import (
|
||||||
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
|
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||||
|
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||||
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
err := api.Scheme.AddGeneratedDeepCopyFuncs()
|
if err := api.Scheme.AddGeneratedDeepCopyFuncs(
|
||||||
if err != nil {
|
DeepCopy_batch_Job,
|
||||||
|
DeepCopy_batch_JobCondition,
|
||||||
|
DeepCopy_batch_JobList,
|
||||||
|
DeepCopy_batch_JobSpec,
|
||||||
|
DeepCopy_batch_JobStatus,
|
||||||
|
); err != nil {
|
||||||
// if one of the deep copy functions is malformed, detect it immediately.
|
// if one of the deep copy functions is malformed, detect it immediately.
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DeepCopy_batch_Job(in Job, out *Job, c *conversion.Cloner) error {
|
||||||
|
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := DeepCopy_batch_JobSpec(in.Spec, &out.Spec, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := DeepCopy_batch_JobStatus(in.Status, &out.Status, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_batch_JobCondition(in JobCondition, out *JobCondition, c *conversion.Cloner) error {
|
||||||
|
out.Type = in.Type
|
||||||
|
out.Status = in.Status
|
||||||
|
if err := unversioned.DeepCopy_unversioned_Time(in.LastProbeTime, &out.LastProbeTime, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := unversioned.DeepCopy_unversioned_Time(in.LastTransitionTime, &out.LastTransitionTime, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
out.Reason = in.Reason
|
||||||
|
out.Message = in.Message
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_batch_JobList(in JobList, out *JobList, c *conversion.Cloner) error {
|
||||||
|
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if in.Items != nil {
|
||||||
|
in, out := in.Items, &out.Items
|
||||||
|
*out = make([]Job, len(in))
|
||||||
|
for i := range in {
|
||||||
|
if err := DeepCopy_batch_Job(in[i], &(*out)[i], c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Items = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_batch_JobSpec(in JobSpec, out *JobSpec, c *conversion.Cloner) error {
|
||||||
|
if in.Parallelism != nil {
|
||||||
|
in, out := in.Parallelism, &out.Parallelism
|
||||||
|
*out = new(int)
|
||||||
|
**out = *in
|
||||||
|
} else {
|
||||||
|
out.Parallelism = nil
|
||||||
|
}
|
||||||
|
if in.Completions != nil {
|
||||||
|
in, out := in.Completions, &out.Completions
|
||||||
|
*out = new(int)
|
||||||
|
**out = *in
|
||||||
|
} else {
|
||||||
|
out.Completions = nil
|
||||||
|
}
|
||||||
|
if in.ActiveDeadlineSeconds != nil {
|
||||||
|
in, out := in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
|
||||||
|
*out = new(int64)
|
||||||
|
**out = *in
|
||||||
|
} else {
|
||||||
|
out.ActiveDeadlineSeconds = nil
|
||||||
|
}
|
||||||
|
if in.Selector != nil {
|
||||||
|
in, out := in.Selector, &out.Selector
|
||||||
|
*out = new(unversioned.LabelSelector)
|
||||||
|
if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Selector = nil
|
||||||
|
}
|
||||||
|
if in.ManualSelector != nil {
|
||||||
|
in, out := in.ManualSelector, &out.ManualSelector
|
||||||
|
*out = new(bool)
|
||||||
|
**out = *in
|
||||||
|
} else {
|
||||||
|
out.ManualSelector = nil
|
||||||
|
}
|
||||||
|
if err := api.DeepCopy_api_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_batch_JobStatus(in JobStatus, out *JobStatus, c *conversion.Cloner) error {
|
||||||
|
if in.Conditions != nil {
|
||||||
|
in, out := in.Conditions, &out.Conditions
|
||||||
|
*out = make([]JobCondition, len(in))
|
||||||
|
for i := range in {
|
||||||
|
if err := DeepCopy_batch_JobCondition(in[i], &(*out)[i], c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Conditions = nil
|
||||||
|
}
|
||||||
|
if in.StartTime != nil {
|
||||||
|
in, out := in.StartTime, &out.StartTime
|
||||||
|
*out = new(unversioned.Time)
|
||||||
|
if err := unversioned.DeepCopy_unversioned_Time(*in, *out, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.StartTime = nil
|
||||||
|
}
|
||||||
|
if in.CompletionTime != nil {
|
||||||
|
in, out := in.CompletionTime, &out.CompletionTime
|
||||||
|
*out = new(unversioned.Time)
|
||||||
|
if err := unversioned.DeepCopy_unversioned_Time(*in, *out, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.CompletionTime = nil
|
||||||
|
}
|
||||||
|
out.Active = in.Active
|
||||||
|
out.Succeeded = in.Succeeded
|
||||||
|
out.Failed = in.Failed
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
2547
pkg/apis/batch/types.generated.go
Normal file
2547
pkg/apis/batch/types.generated.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -24,23 +24,23 @@ import (
|
|||||||
api "k8s.io/kubernetes/pkg/api"
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||||
api_v1 "k8s.io/kubernetes/pkg/api/v1"
|
api_v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
batch "k8s.io/kubernetes/pkg/apis/batch"
|
||||||
conversion "k8s.io/kubernetes/pkg/conversion"
|
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
if err := api.Scheme.AddGeneratedConversionFuncs(
|
if err := api.Scheme.AddGeneratedConversionFuncs(
|
||||||
Convert_v1_Job_To_extensions_Job,
|
Convert_v1_Job_To_batch_Job,
|
||||||
Convert_extensions_Job_To_v1_Job,
|
Convert_batch_Job_To_v1_Job,
|
||||||
Convert_v1_JobCondition_To_extensions_JobCondition,
|
Convert_v1_JobCondition_To_batch_JobCondition,
|
||||||
Convert_extensions_JobCondition_To_v1_JobCondition,
|
Convert_batch_JobCondition_To_v1_JobCondition,
|
||||||
Convert_v1_JobList_To_extensions_JobList,
|
Convert_v1_JobList_To_batch_JobList,
|
||||||
Convert_extensions_JobList_To_v1_JobList,
|
Convert_batch_JobList_To_v1_JobList,
|
||||||
Convert_v1_JobSpec_To_extensions_JobSpec,
|
Convert_v1_JobSpec_To_batch_JobSpec,
|
||||||
Convert_extensions_JobSpec_To_v1_JobSpec,
|
Convert_batch_JobSpec_To_v1_JobSpec,
|
||||||
Convert_v1_JobStatus_To_extensions_JobStatus,
|
Convert_v1_JobStatus_To_batch_JobStatus,
|
||||||
Convert_extensions_JobStatus_To_v1_JobStatus,
|
Convert_batch_JobStatus_To_v1_JobStatus,
|
||||||
Convert_v1_LabelSelector_To_unversioned_LabelSelector,
|
Convert_v1_LabelSelector_To_unversioned_LabelSelector,
|
||||||
Convert_unversioned_LabelSelector_To_v1_LabelSelector,
|
Convert_unversioned_LabelSelector_To_v1_LabelSelector,
|
||||||
Convert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement,
|
Convert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement,
|
||||||
@ -51,7 +51,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1_Job_To_extensions_Job(in *Job, out *extensions.Job, s conversion.Scope) error {
|
func autoConvert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*Job))(in)
|
defaulting.(func(*Job))(in)
|
||||||
}
|
}
|
||||||
@ -62,22 +62,22 @@ func autoConvert_v1_Job_To_extensions_Job(in *Job, out *extensions.Job, s conver
|
|||||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := Convert_v1_JobSpec_To_extensions_JobSpec(&in.Spec, &out.Spec, s); err != nil {
|
if err := Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := Convert_v1_JobStatus_To_extensions_JobStatus(&in.Status, &out.Status, s); err != nil {
|
if err := Convert_v1_JobStatus_To_batch_JobStatus(&in.Status, &out.Status, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1_Job_To_extensions_Job(in *Job, out *extensions.Job, s conversion.Scope) error {
|
func Convert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
|
||||||
return autoConvert_v1_Job_To_extensions_Job(in, out, s)
|
return autoConvert_v1_Job_To_batch_Job(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_extensions_Job_To_v1_Job(in *extensions.Job, out *Job, s conversion.Scope) error {
|
func autoConvert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*extensions.Job))(in)
|
defaulting.(func(*batch.Job))(in)
|
||||||
}
|
}
|
||||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -86,24 +86,24 @@ func autoConvert_extensions_Job_To_v1_Job(in *extensions.Job, out *Job, s conver
|
|||||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := Convert_extensions_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil {
|
if err := Convert_batch_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := Convert_extensions_JobStatus_To_v1_JobStatus(&in.Status, &out.Status, s); err != nil {
|
if err := Convert_batch_JobStatus_To_v1_JobStatus(&in.Status, &out.Status, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_extensions_Job_To_v1_Job(in *extensions.Job, out *Job, s conversion.Scope) error {
|
func Convert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error {
|
||||||
return autoConvert_extensions_Job_To_v1_Job(in, out, s)
|
return autoConvert_batch_Job_To_v1_Job(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1_JobCondition_To_extensions_JobCondition(in *JobCondition, out *extensions.JobCondition, s conversion.Scope) error {
|
func autoConvert_v1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*JobCondition))(in)
|
defaulting.(func(*JobCondition))(in)
|
||||||
}
|
}
|
||||||
out.Type = extensions.JobConditionType(in.Type)
|
out.Type = batch.JobConditionType(in.Type)
|
||||||
out.Status = api.ConditionStatus(in.Status)
|
out.Status = api.ConditionStatus(in.Status)
|
||||||
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
|
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -116,13 +116,13 @@ func autoConvert_v1_JobCondition_To_extensions_JobCondition(in *JobCondition, ou
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1_JobCondition_To_extensions_JobCondition(in *JobCondition, out *extensions.JobCondition, s conversion.Scope) error {
|
func Convert_v1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error {
|
||||||
return autoConvert_v1_JobCondition_To_extensions_JobCondition(in, out, s)
|
return autoConvert_v1_JobCondition_To_batch_JobCondition(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_extensions_JobCondition_To_v1_JobCondition(in *extensions.JobCondition, out *JobCondition, s conversion.Scope) error {
|
func autoConvert_batch_JobCondition_To_v1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*extensions.JobCondition))(in)
|
defaulting.(func(*batch.JobCondition))(in)
|
||||||
}
|
}
|
||||||
out.Type = JobConditionType(in.Type)
|
out.Type = JobConditionType(in.Type)
|
||||||
out.Status = api_v1.ConditionStatus(in.Status)
|
out.Status = api_v1.ConditionStatus(in.Status)
|
||||||
@ -137,11 +137,11 @@ func autoConvert_extensions_JobCondition_To_v1_JobCondition(in *extensions.JobCo
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_extensions_JobCondition_To_v1_JobCondition(in *extensions.JobCondition, out *JobCondition, s conversion.Scope) error {
|
func Convert_batch_JobCondition_To_v1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error {
|
||||||
return autoConvert_extensions_JobCondition_To_v1_JobCondition(in, out, s)
|
return autoConvert_batch_JobCondition_To_v1_JobCondition(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1_JobList_To_extensions_JobList(in *JobList, out *extensions.JobList, s conversion.Scope) error {
|
func autoConvert_v1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*JobList))(in)
|
defaulting.(func(*JobList))(in)
|
||||||
}
|
}
|
||||||
@ -153,9 +153,9 @@ func autoConvert_v1_JobList_To_extensions_JobList(in *JobList, out *extensions.J
|
|||||||
}
|
}
|
||||||
if in.Items != nil {
|
if in.Items != nil {
|
||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]extensions.Job, len(*in))
|
*out = make([]batch.Job, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
if err := Convert_v1_Job_To_extensions_Job(&(*in)[i], &(*out)[i], s); err != nil {
|
if err := Convert_v1_Job_To_batch_Job(&(*in)[i], &(*out)[i], s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -165,13 +165,13 @@ func autoConvert_v1_JobList_To_extensions_JobList(in *JobList, out *extensions.J
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1_JobList_To_extensions_JobList(in *JobList, out *extensions.JobList, s conversion.Scope) error {
|
func Convert_v1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error {
|
||||||
return autoConvert_v1_JobList_To_extensions_JobList(in, out, s)
|
return autoConvert_v1_JobList_To_batch_JobList(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_extensions_JobList_To_v1_JobList(in *extensions.JobList, out *JobList, s conversion.Scope) error {
|
func autoConvert_batch_JobList_To_v1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*extensions.JobList))(in)
|
defaulting.(func(*batch.JobList))(in)
|
||||||
}
|
}
|
||||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -183,7 +183,7 @@ func autoConvert_extensions_JobList_To_v1_JobList(in *extensions.JobList, out *J
|
|||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]Job, len(*in))
|
*out = make([]Job, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
if err := Convert_extensions_Job_To_v1_Job(&(*in)[i], &(*out)[i], s); err != nil {
|
if err := Convert_batch_Job_To_v1_Job(&(*in)[i], &(*out)[i], s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -193,11 +193,11 @@ func autoConvert_extensions_JobList_To_v1_JobList(in *extensions.JobList, out *J
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_extensions_JobList_To_v1_JobList(in *extensions.JobList, out *JobList, s conversion.Scope) error {
|
func Convert_batch_JobList_To_v1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error {
|
||||||
return autoConvert_extensions_JobList_To_v1_JobList(in, out, s)
|
return autoConvert_batch_JobList_To_v1_JobList(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1_JobSpec_To_extensions_JobSpec(in *JobSpec, out *extensions.JobSpec, s conversion.Scope) error {
|
func autoConvert_v1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*JobSpec))(in)
|
defaulting.(func(*JobSpec))(in)
|
||||||
}
|
}
|
||||||
@ -245,13 +245,9 @@ func autoConvert_v1_JobSpec_To_extensions_JobSpec(in *JobSpec, out *extensions.J
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1_JobSpec_To_extensions_JobSpec(in *JobSpec, out *extensions.JobSpec, s conversion.Scope) error {
|
func autoConvert_batch_JobSpec_To_v1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error {
|
||||||
return autoConvert_v1_JobSpec_To_extensions_JobSpec(in, out, s)
|
|
||||||
}
|
|
||||||
|
|
||||||
func autoConvert_extensions_JobSpec_To_v1_JobSpec(in *extensions.JobSpec, out *JobSpec, s conversion.Scope) error {
|
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*extensions.JobSpec))(in)
|
defaulting.(func(*batch.JobSpec))(in)
|
||||||
}
|
}
|
||||||
if in.Parallelism != nil {
|
if in.Parallelism != nil {
|
||||||
in, out := &in.Parallelism, &out.Parallelism
|
in, out := &in.Parallelism, &out.Parallelism
|
||||||
@ -297,19 +293,15 @@ func autoConvert_extensions_JobSpec_To_v1_JobSpec(in *extensions.JobSpec, out *J
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_extensions_JobSpec_To_v1_JobSpec(in *extensions.JobSpec, out *JobSpec, s conversion.Scope) error {
|
func autoConvert_v1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error {
|
||||||
return autoConvert_extensions_JobSpec_To_v1_JobSpec(in, out, s)
|
|
||||||
}
|
|
||||||
|
|
||||||
func autoConvert_v1_JobStatus_To_extensions_JobStatus(in *JobStatus, out *extensions.JobStatus, s conversion.Scope) error {
|
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*JobStatus))(in)
|
defaulting.(func(*JobStatus))(in)
|
||||||
}
|
}
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]extensions.JobCondition, len(*in))
|
*out = make([]batch.JobCondition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
if err := Convert_v1_JobCondition_To_extensions_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
|
if err := Convert_v1_JobCondition_To_batch_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -340,19 +332,19 @@ func autoConvert_v1_JobStatus_To_extensions_JobStatus(in *JobStatus, out *extens
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1_JobStatus_To_extensions_JobStatus(in *JobStatus, out *extensions.JobStatus, s conversion.Scope) error {
|
func Convert_v1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error {
|
||||||
return autoConvert_v1_JobStatus_To_extensions_JobStatus(in, out, s)
|
return autoConvert_v1_JobStatus_To_batch_JobStatus(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_extensions_JobStatus_To_v1_JobStatus(in *extensions.JobStatus, out *JobStatus, s conversion.Scope) error {
|
func autoConvert_batch_JobStatus_To_v1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*extensions.JobStatus))(in)
|
defaulting.(func(*batch.JobStatus))(in)
|
||||||
}
|
}
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]JobCondition, len(*in))
|
*out = make([]JobCondition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
if err := Convert_extensions_JobCondition_To_v1_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
|
if err := Convert_batch_JobCondition_To_v1_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -383,8 +375,8 @@ func autoConvert_extensions_JobStatus_To_v1_JobStatus(in *extensions.JobStatus,
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_extensions_JobStatus_To_v1_JobStatus(in *extensions.JobStatus, out *JobStatus, s conversion.Scope) error {
|
func Convert_batch_JobStatus_To_v1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
|
||||||
return autoConvert_extensions_JobStatus_To_v1_JobStatus(in, out, s)
|
return autoConvert_batch_JobStatus_To_v1_JobStatus(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error {
|
func autoConvert_v1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error {
|
||||||
|
@ -62,11 +62,6 @@ func init() {
|
|||||||
DeepCopy_extensions_IngressSpec,
|
DeepCopy_extensions_IngressSpec,
|
||||||
DeepCopy_extensions_IngressStatus,
|
DeepCopy_extensions_IngressStatus,
|
||||||
DeepCopy_extensions_IngressTLS,
|
DeepCopy_extensions_IngressTLS,
|
||||||
DeepCopy_extensions_Job,
|
|
||||||
DeepCopy_extensions_JobCondition,
|
|
||||||
DeepCopy_extensions_JobList,
|
|
||||||
DeepCopy_extensions_JobSpec,
|
|
||||||
DeepCopy_extensions_JobStatus,
|
|
||||||
DeepCopy_extensions_PodSecurityPolicy,
|
DeepCopy_extensions_PodSecurityPolicy,
|
||||||
DeepCopy_extensions_PodSecurityPolicyList,
|
DeepCopy_extensions_PodSecurityPolicyList,
|
||||||
DeepCopy_extensions_PodSecurityPolicySpec,
|
DeepCopy_extensions_PodSecurityPolicySpec,
|
||||||
@ -572,137 +567,6 @@ func DeepCopy_extensions_IngressTLS(in IngressTLS, out *IngressTLS, c *conversio
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func DeepCopy_extensions_Job(in Job, out *Job, c *conversion.Cloner) error {
|
|
||||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := DeepCopy_extensions_JobSpec(in.Spec, &out.Spec, c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := DeepCopy_extensions_JobStatus(in.Status, &out.Status, c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeepCopy_extensions_JobCondition(in JobCondition, out *JobCondition, c *conversion.Cloner) error {
|
|
||||||
out.Type = in.Type
|
|
||||||
out.Status = in.Status
|
|
||||||
if err := unversioned.DeepCopy_unversioned_Time(in.LastProbeTime, &out.LastProbeTime, c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := unversioned.DeepCopy_unversioned_Time(in.LastTransitionTime, &out.LastTransitionTime, c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
out.Reason = in.Reason
|
|
||||||
out.Message = in.Message
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeepCopy_extensions_JobList(in JobList, out *JobList, c *conversion.Cloner) error {
|
|
||||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := in.Items, &out.Items
|
|
||||||
*out = make([]Job, len(in))
|
|
||||||
for i := range in {
|
|
||||||
if err := DeepCopy_extensions_Job(in[i], &(*out)[i], c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
out.Items = nil
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeepCopy_extensions_JobSpec(in JobSpec, out *JobSpec, c *conversion.Cloner) error {
|
|
||||||
if in.Parallelism != nil {
|
|
||||||
in, out := in.Parallelism, &out.Parallelism
|
|
||||||
*out = new(int)
|
|
||||||
**out = *in
|
|
||||||
} else {
|
|
||||||
out.Parallelism = nil
|
|
||||||
}
|
|
||||||
if in.Completions != nil {
|
|
||||||
in, out := in.Completions, &out.Completions
|
|
||||||
*out = new(int)
|
|
||||||
**out = *in
|
|
||||||
} else {
|
|
||||||
out.Completions = nil
|
|
||||||
}
|
|
||||||
if in.ActiveDeadlineSeconds != nil {
|
|
||||||
in, out := in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
|
|
||||||
*out = new(int64)
|
|
||||||
**out = *in
|
|
||||||
} else {
|
|
||||||
out.ActiveDeadlineSeconds = nil
|
|
||||||
}
|
|
||||||
if in.Selector != nil {
|
|
||||||
in, out := in.Selector, &out.Selector
|
|
||||||
*out = new(unversioned.LabelSelector)
|
|
||||||
if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
out.Selector = nil
|
|
||||||
}
|
|
||||||
if in.ManualSelector != nil {
|
|
||||||
in, out := in.ManualSelector, &out.ManualSelector
|
|
||||||
*out = new(bool)
|
|
||||||
**out = *in
|
|
||||||
} else {
|
|
||||||
out.ManualSelector = nil
|
|
||||||
}
|
|
||||||
if err := api.DeepCopy_api_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeepCopy_extensions_JobStatus(in JobStatus, out *JobStatus, c *conversion.Cloner) error {
|
|
||||||
if in.Conditions != nil {
|
|
||||||
in, out := in.Conditions, &out.Conditions
|
|
||||||
*out = make([]JobCondition, len(in))
|
|
||||||
for i := range in {
|
|
||||||
if err := DeepCopy_extensions_JobCondition(in[i], &(*out)[i], c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
out.Conditions = nil
|
|
||||||
}
|
|
||||||
if in.StartTime != nil {
|
|
||||||
in, out := in.StartTime, &out.StartTime
|
|
||||||
*out = new(unversioned.Time)
|
|
||||||
if err := unversioned.DeepCopy_unversioned_Time(*in, *out, c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
out.StartTime = nil
|
|
||||||
}
|
|
||||||
if in.CompletionTime != nil {
|
|
||||||
in, out := in.CompletionTime, &out.CompletionTime
|
|
||||||
*out = new(unversioned.Time)
|
|
||||||
if err := unversioned.DeepCopy_unversioned_Time(*in, *out, c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
out.CompletionTime = nil
|
|
||||||
}
|
|
||||||
out.Active = in.Active
|
|
||||||
out.Succeeded = in.Succeeded
|
|
||||||
out.Failed = in.Failed
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeepCopy_extensions_PodSecurityPolicy(in PodSecurityPolicy, out *PodSecurityPolicy, c *conversion.Cloner) error {
|
func DeepCopy_extensions_PodSecurityPolicy(in PodSecurityPolicy, out *PodSecurityPolicy, c *conversion.Cloner) error {
|
||||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||||
return err
|
return err
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -24,6 +24,7 @@ import (
|
|||||||
api "k8s.io/kubernetes/pkg/api"
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||||
|
batch "k8s.io/kubernetes/pkg/apis/batch"
|
||||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||||
conversion "k8s.io/kubernetes/pkg/conversion"
|
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
@ -95,16 +96,16 @@ func init() {
|
|||||||
Convert_extensions_IngressStatus_To_v1beta1_IngressStatus,
|
Convert_extensions_IngressStatus_To_v1beta1_IngressStatus,
|
||||||
Convert_v1beta1_IngressTLS_To_extensions_IngressTLS,
|
Convert_v1beta1_IngressTLS_To_extensions_IngressTLS,
|
||||||
Convert_extensions_IngressTLS_To_v1beta1_IngressTLS,
|
Convert_extensions_IngressTLS_To_v1beta1_IngressTLS,
|
||||||
Convert_v1beta1_Job_To_extensions_Job,
|
Convert_v1beta1_Job_To_batch_Job,
|
||||||
Convert_extensions_Job_To_v1beta1_Job,
|
Convert_batch_Job_To_v1beta1_Job,
|
||||||
Convert_v1beta1_JobCondition_To_extensions_JobCondition,
|
Convert_v1beta1_JobCondition_To_batch_JobCondition,
|
||||||
Convert_extensions_JobCondition_To_v1beta1_JobCondition,
|
Convert_batch_JobCondition_To_v1beta1_JobCondition,
|
||||||
Convert_v1beta1_JobList_To_extensions_JobList,
|
Convert_v1beta1_JobList_To_batch_JobList,
|
||||||
Convert_extensions_JobList_To_v1beta1_JobList,
|
Convert_batch_JobList_To_v1beta1_JobList,
|
||||||
Convert_v1beta1_JobSpec_To_extensions_JobSpec,
|
Convert_v1beta1_JobSpec_To_batch_JobSpec,
|
||||||
Convert_extensions_JobSpec_To_v1beta1_JobSpec,
|
Convert_batch_JobSpec_To_v1beta1_JobSpec,
|
||||||
Convert_v1beta1_JobStatus_To_extensions_JobStatus,
|
Convert_v1beta1_JobStatus_To_batch_JobStatus,
|
||||||
Convert_extensions_JobStatus_To_v1beta1_JobStatus,
|
Convert_batch_JobStatus_To_v1beta1_JobStatus,
|
||||||
Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector,
|
Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector,
|
||||||
Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector,
|
Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector,
|
||||||
Convert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement,
|
Convert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement,
|
||||||
@ -1475,7 +1476,7 @@ func Convert_extensions_IngressTLS_To_v1beta1_IngressTLS(in *extensions.IngressT
|
|||||||
return autoConvert_extensions_IngressTLS_To_v1beta1_IngressTLS(in, out, s)
|
return autoConvert_extensions_IngressTLS_To_v1beta1_IngressTLS(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1beta1_Job_To_extensions_Job(in *Job, out *extensions.Job, s conversion.Scope) error {
|
func autoConvert_v1beta1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*Job))(in)
|
defaulting.(func(*Job))(in)
|
||||||
}
|
}
|
||||||
@ -1486,22 +1487,22 @@ func autoConvert_v1beta1_Job_To_extensions_Job(in *Job, out *extensions.Job, s c
|
|||||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := Convert_v1beta1_JobSpec_To_extensions_JobSpec(&in.Spec, &out.Spec, s); err != nil {
|
if err := Convert_v1beta1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := Convert_v1beta1_JobStatus_To_extensions_JobStatus(&in.Status, &out.Status, s); err != nil {
|
if err := Convert_v1beta1_JobStatus_To_batch_JobStatus(&in.Status, &out.Status, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1beta1_Job_To_extensions_Job(in *Job, out *extensions.Job, s conversion.Scope) error {
|
func Convert_v1beta1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
|
||||||
return autoConvert_v1beta1_Job_To_extensions_Job(in, out, s)
|
return autoConvert_v1beta1_Job_To_batch_Job(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_extensions_Job_To_v1beta1_Job(in *extensions.Job, out *Job, s conversion.Scope) error {
|
func autoConvert_batch_Job_To_v1beta1_Job(in *batch.Job, out *Job, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*extensions.Job))(in)
|
defaulting.(func(*batch.Job))(in)
|
||||||
}
|
}
|
||||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -1510,24 +1511,24 @@ func autoConvert_extensions_Job_To_v1beta1_Job(in *extensions.Job, out *Job, s c
|
|||||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := Convert_extensions_JobSpec_To_v1beta1_JobSpec(&in.Spec, &out.Spec, s); err != nil {
|
if err := Convert_batch_JobSpec_To_v1beta1_JobSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := Convert_extensions_JobStatus_To_v1beta1_JobStatus(&in.Status, &out.Status, s); err != nil {
|
if err := Convert_batch_JobStatus_To_v1beta1_JobStatus(&in.Status, &out.Status, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_extensions_Job_To_v1beta1_Job(in *extensions.Job, out *Job, s conversion.Scope) error {
|
func Convert_batch_Job_To_v1beta1_Job(in *batch.Job, out *Job, s conversion.Scope) error {
|
||||||
return autoConvert_extensions_Job_To_v1beta1_Job(in, out, s)
|
return autoConvert_batch_Job_To_v1beta1_Job(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1beta1_JobCondition_To_extensions_JobCondition(in *JobCondition, out *extensions.JobCondition, s conversion.Scope) error {
|
func autoConvert_v1beta1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*JobCondition))(in)
|
defaulting.(func(*JobCondition))(in)
|
||||||
}
|
}
|
||||||
out.Type = extensions.JobConditionType(in.Type)
|
out.Type = batch.JobConditionType(in.Type)
|
||||||
out.Status = api.ConditionStatus(in.Status)
|
out.Status = api.ConditionStatus(in.Status)
|
||||||
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
|
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -1540,13 +1541,13 @@ func autoConvert_v1beta1_JobCondition_To_extensions_JobCondition(in *JobConditio
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1beta1_JobCondition_To_extensions_JobCondition(in *JobCondition, out *extensions.JobCondition, s conversion.Scope) error {
|
func Convert_v1beta1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error {
|
||||||
return autoConvert_v1beta1_JobCondition_To_extensions_JobCondition(in, out, s)
|
return autoConvert_v1beta1_JobCondition_To_batch_JobCondition(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_extensions_JobCondition_To_v1beta1_JobCondition(in *extensions.JobCondition, out *JobCondition, s conversion.Scope) error {
|
func autoConvert_batch_JobCondition_To_v1beta1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*extensions.JobCondition))(in)
|
defaulting.(func(*batch.JobCondition))(in)
|
||||||
}
|
}
|
||||||
out.Type = JobConditionType(in.Type)
|
out.Type = JobConditionType(in.Type)
|
||||||
out.Status = v1.ConditionStatus(in.Status)
|
out.Status = v1.ConditionStatus(in.Status)
|
||||||
@ -1561,11 +1562,11 @@ func autoConvert_extensions_JobCondition_To_v1beta1_JobCondition(in *extensions.
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_extensions_JobCondition_To_v1beta1_JobCondition(in *extensions.JobCondition, out *JobCondition, s conversion.Scope) error {
|
func Convert_batch_JobCondition_To_v1beta1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error {
|
||||||
return autoConvert_extensions_JobCondition_To_v1beta1_JobCondition(in, out, s)
|
return autoConvert_batch_JobCondition_To_v1beta1_JobCondition(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1beta1_JobList_To_extensions_JobList(in *JobList, out *extensions.JobList, s conversion.Scope) error {
|
func autoConvert_v1beta1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*JobList))(in)
|
defaulting.(func(*JobList))(in)
|
||||||
}
|
}
|
||||||
@ -1577,9 +1578,9 @@ func autoConvert_v1beta1_JobList_To_extensions_JobList(in *JobList, out *extensi
|
|||||||
}
|
}
|
||||||
if in.Items != nil {
|
if in.Items != nil {
|
||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]extensions.Job, len(*in))
|
*out = make([]batch.Job, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
if err := Convert_v1beta1_Job_To_extensions_Job(&(*in)[i], &(*out)[i], s); err != nil {
|
if err := Convert_v1beta1_Job_To_batch_Job(&(*in)[i], &(*out)[i], s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1589,13 +1590,13 @@ func autoConvert_v1beta1_JobList_To_extensions_JobList(in *JobList, out *extensi
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1beta1_JobList_To_extensions_JobList(in *JobList, out *extensions.JobList, s conversion.Scope) error {
|
func Convert_v1beta1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error {
|
||||||
return autoConvert_v1beta1_JobList_To_extensions_JobList(in, out, s)
|
return autoConvert_v1beta1_JobList_To_batch_JobList(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_extensions_JobList_To_v1beta1_JobList(in *extensions.JobList, out *JobList, s conversion.Scope) error {
|
func autoConvert_batch_JobList_To_v1beta1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*extensions.JobList))(in)
|
defaulting.(func(*batch.JobList))(in)
|
||||||
}
|
}
|
||||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -1607,7 +1608,7 @@ func autoConvert_extensions_JobList_To_v1beta1_JobList(in *extensions.JobList, o
|
|||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]Job, len(*in))
|
*out = make([]Job, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
if err := Convert_extensions_Job_To_v1beta1_Job(&(*in)[i], &(*out)[i], s); err != nil {
|
if err := Convert_batch_Job_To_v1beta1_Job(&(*in)[i], &(*out)[i], s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1617,19 +1618,19 @@ func autoConvert_extensions_JobList_To_v1beta1_JobList(in *extensions.JobList, o
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_extensions_JobList_To_v1beta1_JobList(in *extensions.JobList, out *JobList, s conversion.Scope) error {
|
func Convert_batch_JobList_To_v1beta1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error {
|
||||||
return autoConvert_extensions_JobList_To_v1beta1_JobList(in, out, s)
|
return autoConvert_batch_JobList_To_v1beta1_JobList(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1beta1_JobStatus_To_extensions_JobStatus(in *JobStatus, out *extensions.JobStatus, s conversion.Scope) error {
|
func autoConvert_v1beta1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*JobStatus))(in)
|
defaulting.(func(*JobStatus))(in)
|
||||||
}
|
}
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]extensions.JobCondition, len(*in))
|
*out = make([]batch.JobCondition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
if err := Convert_v1beta1_JobCondition_To_extensions_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
|
if err := Convert_v1beta1_JobCondition_To_batch_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1660,19 +1661,19 @@ func autoConvert_v1beta1_JobStatus_To_extensions_JobStatus(in *JobStatus, out *e
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1beta1_JobStatus_To_extensions_JobStatus(in *JobStatus, out *extensions.JobStatus, s conversion.Scope) error {
|
func Convert_v1beta1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error {
|
||||||
return autoConvert_v1beta1_JobStatus_To_extensions_JobStatus(in, out, s)
|
return autoConvert_v1beta1_JobStatus_To_batch_JobStatus(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_extensions_JobStatus_To_v1beta1_JobStatus(in *extensions.JobStatus, out *JobStatus, s conversion.Scope) error {
|
func autoConvert_batch_JobStatus_To_v1beta1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
|
||||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
defaulting.(func(*extensions.JobStatus))(in)
|
defaulting.(func(*batch.JobStatus))(in)
|
||||||
}
|
}
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]JobCondition, len(*in))
|
*out = make([]JobCondition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
if err := Convert_extensions_JobCondition_To_v1beta1_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
|
if err := Convert_batch_JobCondition_To_v1beta1_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1703,8 +1704,8 @@ func autoConvert_extensions_JobStatus_To_v1beta1_JobStatus(in *extensions.JobSta
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_extensions_JobStatus_To_v1beta1_JobStatus(in *extensions.JobStatus, out *JobStatus, s conversion.Scope) error {
|
func Convert_batch_JobStatus_To_v1beta1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
|
||||||
return autoConvert_extensions_JobStatus_To_v1beta1_JobStatus(in, out, s)
|
return autoConvert_batch_JobStatus_To_v1beta1_JobStatus(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error {
|
func autoConvert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error {
|
||||||
|
@ -18,6 +18,7 @@ package internalclientset
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
|
unversionedbatch "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned"
|
||||||
unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
|
unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
|
||||||
unversionedextensions "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned"
|
unversionedextensions "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned"
|
||||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||||
@ -29,6 +30,7 @@ type Interface interface {
|
|||||||
Discovery() discovery.DiscoveryInterface
|
Discovery() discovery.DiscoveryInterface
|
||||||
Core() unversionedcore.CoreInterface
|
Core() unversionedcore.CoreInterface
|
||||||
Extensions() unversionedextensions.ExtensionsInterface
|
Extensions() unversionedextensions.ExtensionsInterface
|
||||||
|
Batch() unversionedbatch.BatchInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clientset contains the clients for groups. Each group has exactly one
|
// Clientset contains the clients for groups. Each group has exactly one
|
||||||
@ -37,6 +39,7 @@ type Clientset struct {
|
|||||||
*discovery.DiscoveryClient
|
*discovery.DiscoveryClient
|
||||||
*unversionedcore.CoreClient
|
*unversionedcore.CoreClient
|
||||||
*unversionedextensions.ExtensionsClient
|
*unversionedextensions.ExtensionsClient
|
||||||
|
*unversionedbatch.BatchClient
|
||||||
}
|
}
|
||||||
|
|
||||||
// Core retrieves the CoreClient
|
// Core retrieves the CoreClient
|
||||||
@ -49,6 +52,11 @@ func (c *Clientset) Extensions() unversionedextensions.ExtensionsInterface {
|
|||||||
return c.ExtensionsClient
|
return c.ExtensionsClient
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Batch retrieves the BatchClient
|
||||||
|
func (c *Clientset) Batch() unversionedbatch.BatchInterface {
|
||||||
|
return c.BatchClient
|
||||||
|
}
|
||||||
|
|
||||||
// Discovery retrieves the DiscoveryClient
|
// Discovery retrieves the DiscoveryClient
|
||||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||||
return c.DiscoveryClient
|
return c.DiscoveryClient
|
||||||
@ -70,6 +78,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return &clientset, err
|
return &clientset, err
|
||||||
}
|
}
|
||||||
|
clientset.BatchClient, err = unversionedbatch.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return &clientset, err
|
||||||
|
}
|
||||||
|
|
||||||
clientset.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
clientset.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -84,6 +96,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset {
|
|||||||
var clientset Clientset
|
var clientset Clientset
|
||||||
clientset.CoreClient = unversionedcore.NewForConfigOrDie(c)
|
clientset.CoreClient = unversionedcore.NewForConfigOrDie(c)
|
||||||
clientset.ExtensionsClient = unversionedextensions.NewForConfigOrDie(c)
|
clientset.ExtensionsClient = unversionedextensions.NewForConfigOrDie(c)
|
||||||
|
clientset.BatchClient = unversionedbatch.NewForConfigOrDie(c)
|
||||||
|
|
||||||
clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||||
return &clientset
|
return &clientset
|
||||||
@ -94,6 +107,7 @@ func New(c *restclient.RESTClient) *Clientset {
|
|||||||
var clientset Clientset
|
var clientset Clientset
|
||||||
clientset.CoreClient = unversionedcore.New(c)
|
clientset.CoreClient = unversionedcore.New(c)
|
||||||
clientset.ExtensionsClient = unversionedextensions.New(c)
|
clientset.ExtensionsClient = unversionedextensions.New(c)
|
||||||
|
clientset.BatchClient = unversionedbatch.New(c)
|
||||||
|
|
||||||
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||||
return &clientset
|
return &clientset
|
||||||
|
@ -20,6 +20,8 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/api"
|
"k8s.io/kubernetes/pkg/api"
|
||||||
"k8s.io/kubernetes/pkg/apimachinery/registered"
|
"k8s.io/kubernetes/pkg/apimachinery/registered"
|
||||||
clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
|
clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
|
||||||
|
unversionedbatch "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned"
|
||||||
|
fakeunversionedbatch "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake"
|
||||||
unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
|
unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
|
||||||
fakeunversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake"
|
fakeunversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake"
|
||||||
unversionedextensions "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned"
|
unversionedextensions "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned"
|
||||||
@ -70,3 +72,8 @@ func (c *Clientset) Core() unversionedcore.CoreInterface {
|
|||||||
func (c *Clientset) Extensions() unversionedextensions.ExtensionsInterface {
|
func (c *Clientset) Extensions() unversionedextensions.ExtensionsInterface {
|
||||||
return &fakeunversionedextensions.FakeExtensions{Fake: &c.Fake}
|
return &fakeunversionedextensions.FakeExtensions{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Batch retrieves the BatchClient
|
||||||
|
func (c *Clientset) Batch() unversionedbatch.BatchInterface {
|
||||||
|
return &fakeunversionedbatch.FakeBatch{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
@ -0,0 +1,90 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package unversioned
|
||||||
|
|
||||||
|
import (
|
||||||
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
|
registered "k8s.io/kubernetes/pkg/apimachinery/registered"
|
||||||
|
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||||
|
)
|
||||||
|
|
||||||
|
type BatchInterface interface {
|
||||||
|
JobsGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// BatchClient is used to interact with features provided by the Batch group.
|
||||||
|
type BatchClient struct {
|
||||||
|
*restclient.RESTClient
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *BatchClient) Jobs(namespace string) JobInterface {
|
||||||
|
return newJobs(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new BatchClient for the given config.
|
||||||
|
func NewForConfig(c *restclient.Config) (*BatchClient, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := restclient.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &BatchClient{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new BatchClient for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *restclient.Config) *BatchClient {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new BatchClient for the given RESTClient.
|
||||||
|
func New(c *restclient.RESTClient) *BatchClient {
|
||||||
|
return &BatchClient{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *restclient.Config) error {
|
||||||
|
// if batch group is not registered, return an error
|
||||||
|
g, err := registered.Group("batch")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
config.APIPath = "/apis"
|
||||||
|
if config.UserAgent == "" {
|
||||||
|
config.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||||
|
}
|
||||||
|
// TODO: Unconditionally set the config.Version, until we fix the config.
|
||||||
|
//if config.Version == "" {
|
||||||
|
copyGroupVersion := g.GroupVersion
|
||||||
|
config.GroupVersion = ©GroupVersion
|
||||||
|
//}
|
||||||
|
|
||||||
|
config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion)
|
||||||
|
if config.QPS == 0 {
|
||||||
|
config.QPS = 5
|
||||||
|
}
|
||||||
|
if config.Burst == 0 {
|
||||||
|
config.Burst = 10
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This package is generated by client-gen with the default arguments.
|
||||||
|
|
||||||
|
// This package has the automatically generated typed clients.
|
||||||
|
package unversioned
|
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This package is generated by client-gen with the default arguments.
|
||||||
|
|
||||||
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
unversioned "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned"
|
||||||
|
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakeBatch struct {
|
||||||
|
*core.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeBatch) Jobs(namespace string) unversioned.JobInterface {
|
||||||
|
return &FakeJobs{c, namespace}
|
||||||
|
}
|
@ -19,7 +19,7 @@ package fake
|
|||||||
import (
|
import (
|
||||||
api "k8s.io/kubernetes/pkg/api"
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
batch "k8s.io/kubernetes/pkg/apis/batch"
|
||||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||||
labels "k8s.io/kubernetes/pkg/labels"
|
labels "k8s.io/kubernetes/pkg/labels"
|
||||||
watch "k8s.io/kubernetes/pkg/watch"
|
watch "k8s.io/kubernetes/pkg/watch"
|
||||||
@ -27,45 +27,45 @@ import (
|
|||||||
|
|
||||||
// FakeJobs implements JobInterface
|
// FakeJobs implements JobInterface
|
||||||
type FakeJobs struct {
|
type FakeJobs struct {
|
||||||
Fake *FakeExtensions
|
Fake *FakeBatch
|
||||||
ns string
|
ns string
|
||||||
}
|
}
|
||||||
|
|
||||||
var jobsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "", Resource: "jobs"}
|
var jobsResource = unversioned.GroupVersionResource{Group: "batch", Version: "", Resource: "jobs"}
|
||||||
|
|
||||||
func (c *FakeJobs) Create(job *extensions.Job) (result *extensions.Job, err error) {
|
func (c *FakeJobs) Create(job *batch.Job) (result *batch.Job, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(core.NewCreateAction(jobsResource, c.ns, job), &extensions.Job{})
|
Invokes(core.NewCreateAction(jobsResource, c.ns, job), &batch.Job{})
|
||||||
|
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*extensions.Job), err
|
return obj.(*batch.Job), err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeJobs) Update(job *extensions.Job) (result *extensions.Job, err error) {
|
func (c *FakeJobs) Update(job *batch.Job) (result *batch.Job, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(core.NewUpdateAction(jobsResource, c.ns, job), &extensions.Job{})
|
Invokes(core.NewUpdateAction(jobsResource, c.ns, job), &batch.Job{})
|
||||||
|
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*extensions.Job), err
|
return obj.(*batch.Job), err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeJobs) UpdateStatus(job *extensions.Job) (*extensions.Job, error) {
|
func (c *FakeJobs) UpdateStatus(job *batch.Job) (*batch.Job, error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(core.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &extensions.Job{})
|
Invokes(core.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &batch.Job{})
|
||||||
|
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*extensions.Job), err
|
return obj.(*batch.Job), err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
|
func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
|
||||||
_, err := c.Fake.
|
_, err := c.Fake.
|
||||||
Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &extensions.Job{})
|
Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &batch.Job{})
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -73,23 +73,23 @@ func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
|
|||||||
func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||||
action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
|
action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &extensions.JobList{})
|
_, err := c.Fake.Invokes(action, &batch.JobList{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeJobs) Get(name string) (result *extensions.Job, err error) {
|
func (c *FakeJobs) Get(name string) (result *batch.Job, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(core.NewGetAction(jobsResource, c.ns, name), &extensions.Job{})
|
Invokes(core.NewGetAction(jobsResource, c.ns, name), &batch.Job{})
|
||||||
|
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*extensions.Job), err
|
return obj.(*batch.Job), err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeJobs) List(opts api.ListOptions) (result *extensions.JobList, err error) {
|
func (c *FakeJobs) List(opts api.ListOptions) (result *batch.JobList, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(core.NewListAction(jobsResource, c.ns, opts), &extensions.JobList{})
|
Invokes(core.NewListAction(jobsResource, c.ns, opts), &batch.JobList{})
|
||||||
|
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -99,8 +99,8 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *extensions.JobList, err e
|
|||||||
if label == nil {
|
if label == nil {
|
||||||
label = labels.Everything()
|
label = labels.Everything()
|
||||||
}
|
}
|
||||||
list := &extensions.JobList{}
|
list := &batch.JobList{}
|
||||||
for _, item := range obj.(*extensions.JobList).Items {
|
for _, item := range obj.(*batch.JobList).Items {
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
list.Items = append(list.Items, item)
|
list.Items = append(list.Items, item)
|
||||||
}
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package unversioned
|
||||||
|
|
||||||
|
type JobExpansion interface{}
|
@ -0,0 +1,150 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package unversioned
|
||||||
|
|
||||||
|
import (
|
||||||
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
|
batch "k8s.io/kubernetes/pkg/apis/batch"
|
||||||
|
watch "k8s.io/kubernetes/pkg/watch"
|
||||||
|
)
|
||||||
|
|
||||||
|
// JobsGetter has a method to return a JobInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type JobsGetter interface {
|
||||||
|
Jobs(namespace string) JobInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// JobInterface has methods to work with Job resources.
|
||||||
|
type JobInterface interface {
|
||||||
|
Create(*batch.Job) (*batch.Job, error)
|
||||||
|
Update(*batch.Job) (*batch.Job, error)
|
||||||
|
UpdateStatus(*batch.Job) (*batch.Job, error)
|
||||||
|
Delete(name string, options *api.DeleteOptions) error
|
||||||
|
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
|
||||||
|
Get(name string) (*batch.Job, error)
|
||||||
|
List(opts api.ListOptions) (*batch.JobList, error)
|
||||||
|
Watch(opts api.ListOptions) (watch.Interface, error)
|
||||||
|
JobExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// jobs implements JobInterface
|
||||||
|
type jobs struct {
|
||||||
|
client *BatchClient
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newJobs returns a Jobs
|
||||||
|
func newJobs(c *BatchClient, namespace string) *jobs {
|
||||||
|
return &jobs{
|
||||||
|
client: c,
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any.
|
||||||
|
func (c *jobs) Create(job *batch.Job) (result *batch.Job, err error) {
|
||||||
|
result = &batch.Job{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("jobs").
|
||||||
|
Body(job).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
|
||||||
|
func (c *jobs) Update(job *batch.Job) (result *batch.Job, err error) {
|
||||||
|
result = &batch.Job{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("jobs").
|
||||||
|
Name(job.Name).
|
||||||
|
Body(job).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *jobs) UpdateStatus(job *batch.Job) (result *batch.Job, err error) {
|
||||||
|
result = &batch.Job{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("jobs").
|
||||||
|
Name(job.Name).
|
||||||
|
SubResource("status").
|
||||||
|
Body(job).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the job and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *jobs) Delete(name string, options *api.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("jobs").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *jobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("jobs").
|
||||||
|
VersionedParams(&listOptions, api.ParameterCodec).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
|
||||||
|
func (c *jobs) Get(name string) (result *batch.Job, err error) {
|
||||||
|
result = &batch.Job{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("jobs").
|
||||||
|
Name(name).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
|
||||||
|
func (c *jobs) List(opts api.ListOptions) (result *batch.JobList, err error) {
|
||||||
|
result = &batch.JobList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("jobs").
|
||||||
|
VersionedParams(&opts, api.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested jobs.
|
||||||
|
func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.client.Get().
|
||||||
|
Prefix("watch").
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("jobs").
|
||||||
|
VersionedParams(&opts, api.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
@ -27,7 +27,6 @@ type ExtensionsInterface interface {
|
|||||||
DeploymentsGetter
|
DeploymentsGetter
|
||||||
HorizontalPodAutoscalersGetter
|
HorizontalPodAutoscalersGetter
|
||||||
IngressesGetter
|
IngressesGetter
|
||||||
JobsGetter
|
|
||||||
ReplicaSetsGetter
|
ReplicaSetsGetter
|
||||||
ScalesGetter
|
ScalesGetter
|
||||||
ThirdPartyResourcesGetter
|
ThirdPartyResourcesGetter
|
||||||
@ -54,10 +53,6 @@ func (c *ExtensionsClient) Ingresses(namespace string) IngressInterface {
|
|||||||
return newIngresses(c, namespace)
|
return newIngresses(c, namespace)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ExtensionsClient) Jobs(namespace string) JobInterface {
|
|
||||||
return newJobs(c, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface {
|
func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface {
|
||||||
return newReplicaSets(c, namespace)
|
return newReplicaSets(c, namespace)
|
||||||
}
|
}
|
||||||
|
@ -41,10 +41,6 @@ func (c *FakeExtensions) Ingresses(namespace string) unversioned.IngressInterfac
|
|||||||
return &FakeIngresses{c, namespace}
|
return &FakeIngresses{c, namespace}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeExtensions) Jobs(namespace string) unversioned.JobInterface {
|
|
||||||
return &FakeJobs{c, namespace}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeExtensions) ReplicaSets(namespace string) unversioned.ReplicaSetInterface {
|
func (c *FakeExtensions) ReplicaSets(namespace string) unversioned.ReplicaSetInterface {
|
||||||
return &FakeReplicaSets{c, namespace}
|
return &FakeReplicaSets{c, namespace}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ package unversioned
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
api "k8s.io/kubernetes/pkg/api"
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
batch "k8s.io/kubernetes/pkg/apis/batch"
|
||||||
watch "k8s.io/kubernetes/pkg/watch"
|
watch "k8s.io/kubernetes/pkg/watch"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,13 +30,13 @@ type JobsGetter interface {
|
|||||||
|
|
||||||
// JobInterface has methods to work with Job resources.
|
// JobInterface has methods to work with Job resources.
|
||||||
type JobInterface interface {
|
type JobInterface interface {
|
||||||
Create(*extensions.Job) (*extensions.Job, error)
|
Create(*batch.Job) (*batch.Job, error)
|
||||||
Update(*extensions.Job) (*extensions.Job, error)
|
Update(*batch.Job) (*batch.Job, error)
|
||||||
UpdateStatus(*extensions.Job) (*extensions.Job, error)
|
UpdateStatus(*batch.Job) (*batch.Job, error)
|
||||||
Delete(name string, options *api.DeleteOptions) error
|
Delete(name string, options *api.DeleteOptions) error
|
||||||
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
|
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
|
||||||
Get(name string) (*extensions.Job, error)
|
Get(name string) (*batch.Job, error)
|
||||||
List(opts api.ListOptions) (*extensions.JobList, error)
|
List(opts api.ListOptions) (*batch.JobList, error)
|
||||||
Watch(opts api.ListOptions) (watch.Interface, error)
|
Watch(opts api.ListOptions) (watch.Interface, error)
|
||||||
JobExpansion
|
JobExpansion
|
||||||
}
|
}
|
||||||
@ -56,8 +56,8 @@ func newJobs(c *ExtensionsClient, namespace string) *jobs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any.
|
// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any.
|
||||||
func (c *jobs) Create(job *extensions.Job) (result *extensions.Job, err error) {
|
func (c *jobs) Create(job *batch.Job) (result *batch.Job, err error) {
|
||||||
result = &extensions.Job{}
|
result = &batch.Job{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
@ -68,8 +68,8 @@ func (c *jobs) Create(job *extensions.Job) (result *extensions.Job, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
|
// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
|
||||||
func (c *jobs) Update(job *extensions.Job) (result *extensions.Job, err error) {
|
func (c *jobs) Update(job *batch.Job) (result *batch.Job, err error) {
|
||||||
result = &extensions.Job{}
|
result = &batch.Job{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
@ -80,8 +80,8 @@ func (c *jobs) Update(job *extensions.Job) (result *extensions.Job, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *jobs) UpdateStatus(job *extensions.Job) (result *extensions.Job, err error) {
|
func (c *jobs) UpdateStatus(job *batch.Job) (result *batch.Job, err error) {
|
||||||
result = &extensions.Job{}
|
result = &batch.Job{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
@ -116,8 +116,8 @@ func (c *jobs) DeleteCollection(options *api.DeleteOptions, listOptions api.List
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
|
// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
|
||||||
func (c *jobs) Get(name string) (result *extensions.Job, err error) {
|
func (c *jobs) Get(name string) (result *batch.Job, err error) {
|
||||||
result = &extensions.Job{}
|
result = &batch.Job{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
@ -128,8 +128,8 @@ func (c *jobs) Get(name string) (result *extensions.Job, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
|
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
|
||||||
func (c *jobs) List(opts api.ListOptions) (result *extensions.JobList, err error) {
|
func (c *jobs) List(opts api.ListOptions) (result *batch.JobList, err error) {
|
||||||
result = &extensions.JobList{}
|
result = &batch.JobList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
|
@ -29,7 +29,6 @@ type ExtensionsInterface interface {
|
|||||||
DeploymentsGetter
|
DeploymentsGetter
|
||||||
HorizontalPodAutoscalersGetter
|
HorizontalPodAutoscalersGetter
|
||||||
IngressesGetter
|
IngressesGetter
|
||||||
JobsGetter
|
|
||||||
ReplicaSetsGetter
|
ReplicaSetsGetter
|
||||||
ScalesGetter
|
ScalesGetter
|
||||||
ThirdPartyResourcesGetter
|
ThirdPartyResourcesGetter
|
||||||
@ -56,10 +55,6 @@ func (c *ExtensionsClient) Ingresses(namespace string) IngressInterface {
|
|||||||
return newIngresses(c, namespace)
|
return newIngresses(c, namespace)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ExtensionsClient) Jobs(namespace string) JobInterface {
|
|
||||||
return newJobs(c, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface {
|
func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface {
|
||||||
return newReplicaSets(c, namespace)
|
return newReplicaSets(c, namespace)
|
||||||
}
|
}
|
||||||
|
@ -41,10 +41,6 @@ func (c *FakeExtensions) Ingresses(namespace string) unversioned.IngressInterfac
|
|||||||
return &FakeIngresses{c, namespace}
|
return &FakeIngresses{c, namespace}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeExtensions) Jobs(namespace string) unversioned.JobInterface {
|
|
||||||
return &FakeJobs{c, namespace}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeExtensions) ReplicaSets(namespace string) unversioned.ReplicaSetInterface {
|
func (c *FakeExtensions) ReplicaSets(namespace string) unversioned.ReplicaSetInterface {
|
||||||
return &FakeReplicaSets{c, namespace}
|
return &FakeReplicaSets{c, namespace}
|
||||||
}
|
}
|
||||||
|
@ -1,116 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016 The Kubernetes Authors All rights reserved.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
api "k8s.io/kubernetes/pkg/api"
|
|
||||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
|
||||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
|
||||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
|
||||||
labels "k8s.io/kubernetes/pkg/labels"
|
|
||||||
watch "k8s.io/kubernetes/pkg/watch"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakeJobs implements JobInterface
|
|
||||||
type FakeJobs struct {
|
|
||||||
Fake *FakeExtensions
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
var jobsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "", Resource: "jobs"}
|
|
||||||
|
|
||||||
func (c *FakeJobs) Create(job *extensions.Job) (result *extensions.Job, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(core.NewCreateAction(jobsResource, c.ns, job), &extensions.Job{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*extensions.Job), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeJobs) Update(job *extensions.Job) (result *extensions.Job, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(core.NewUpdateAction(jobsResource, c.ns, job), &extensions.Job{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*extensions.Job), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeJobs) UpdateStatus(job *extensions.Job) (*extensions.Job, error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(core.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &extensions.Job{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*extensions.Job), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &extensions.Job{})
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
|
||||||
action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &extensions.JobList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeJobs) Get(name string) (result *extensions.Job, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(core.NewGetAction(jobsResource, c.ns, name), &extensions.Job{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*extensions.Job), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeJobs) List(opts api.ListOptions) (result *extensions.JobList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(core.NewListAction(jobsResource, c.ns, opts), &extensions.JobList{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label := opts.LabelSelector
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &extensions.JobList{}
|
|
||||||
for _, item := range obj.(*extensions.JobList).Items {
|
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
|
||||||
list.Items = append(list.Items, item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested jobs.
|
|
||||||
func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts))
|
|
||||||
|
|
||||||
}
|
|
@ -20,7 +20,7 @@ package unversioned
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
api "k8s.io/kubernetes/pkg/api"
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
batch "k8s.io/kubernetes/pkg/apis/batch"
|
||||||
watch "k8s.io/kubernetes/pkg/watch"
|
watch "k8s.io/kubernetes/pkg/watch"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -32,13 +32,13 @@ type JobsGetter interface {
|
|||||||
|
|
||||||
// JobInterface has methods to work with Job resources.
|
// JobInterface has methods to work with Job resources.
|
||||||
type JobInterface interface {
|
type JobInterface interface {
|
||||||
Create(*extensions.Job) (*extensions.Job, error)
|
Create(*batch.Job) (*batch.Job, error)
|
||||||
Update(*extensions.Job) (*extensions.Job, error)
|
Update(*batch.Job) (*batch.Job, error)
|
||||||
UpdateStatus(*extensions.Job) (*extensions.Job, error)
|
UpdateStatus(*batch.Job) (*batch.Job, error)
|
||||||
Delete(name string, options *api.DeleteOptions) error
|
Delete(name string, options *api.DeleteOptions) error
|
||||||
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
|
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
|
||||||
Get(name string) (*extensions.Job, error)
|
Get(name string) (*batch.Job, error)
|
||||||
List(opts api.ListOptions) (*extensions.JobList, error)
|
List(opts api.ListOptions) (*batch.JobList, error)
|
||||||
Watch(opts api.ListOptions) (watch.Interface, error)
|
Watch(opts api.ListOptions) (watch.Interface, error)
|
||||||
JobExpansion
|
JobExpansion
|
||||||
}
|
}
|
||||||
@ -58,8 +58,8 @@ func newJobs(c *ExtensionsClient, namespace string) *jobs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any.
|
// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any.
|
||||||
func (c *jobs) Create(job *extensions.Job) (result *extensions.Job, err error) {
|
func (c *jobs) Create(job *batch.Job) (result *batch.Job, err error) {
|
||||||
result = &extensions.Job{}
|
result = &batch.Job{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
@ -70,8 +70,8 @@ func (c *jobs) Create(job *extensions.Job) (result *extensions.Job, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
|
// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
|
||||||
func (c *jobs) Update(job *extensions.Job) (result *extensions.Job, err error) {
|
func (c *jobs) Update(job *batch.Job) (result *batch.Job, err error) {
|
||||||
result = &extensions.Job{}
|
result = &batch.Job{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
@ -82,8 +82,8 @@ func (c *jobs) Update(job *extensions.Job) (result *extensions.Job, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *jobs) UpdateStatus(job *extensions.Job) (result *extensions.Job, err error) {
|
func (c *jobs) UpdateStatus(job *batch.Job) (result *batch.Job, err error) {
|
||||||
result = &extensions.Job{}
|
result = &batch.Job{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
@ -118,8 +118,8 @@ func (c *jobs) DeleteCollection(options *api.DeleteOptions, listOptions api.List
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
|
// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
|
||||||
func (c *jobs) Get(name string) (result *extensions.Job, err error) {
|
func (c *jobs) Get(name string) (result *batch.Job, err error) {
|
||||||
result = &extensions.Job{}
|
result = &batch.Job{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
@ -130,8 +130,8 @@ func (c *jobs) Get(name string) (result *extensions.Job, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
|
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
|
||||||
func (c *jobs) List(opts api.ListOptions) (result *extensions.JobList, err error) {
|
func (c *jobs) List(opts api.ListOptions) (result *batch.JobList, err error) {
|
||||||
result = &extensions.JobList{}
|
result = &batch.JobList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
|
Loading…
Reference in New Issue
Block a user