diff --git a/PROJECT b/PROJECT index fcb810b6..0f4e193d 100644 --- a/PROJECT +++ b/PROJECT @@ -1,16 +1,26 @@ -version: "2" domain: kubedl.io +multigroup: true repo: github.com/alibaba/kubedl resources: -- group: kubeflow.org - version: v1 +- group: training + kind: MarsJob + version: v1alpha1 +- group: training + kind: MPIJob + version: v1alpha1 +- group: training + kind: PyTorchJob + version: v1alpha1 +- group: training kind: TFJob -- group: xdl.kubedl.io version: v1alpha1 +- group: training kind: XDLJob -- group: kubeflow.org - version: v1 - kind: PytorchJob -- group: xgboostjob.kubeflow.org version: v1alpha1 +- group: training kind: XGBoostJob + version: v1alpha1 +- group: training + kind: ElasticDLJob + version: v1alpha1 +version: "2" diff --git a/apis/addtoscheme_tensorflow_v1.go b/apis/addtoscheme_tensorflow_v1.go deleted file mode 100644 index 2adc4e6a..00000000 --- a/apis/addtoscheme_tensorflow_v1.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2019 The Alibaba Authors. - -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 apis - -import ( - "github.com/alibaba/kubedl/apis/tensorflow/v1" -) - -func init() { - AddToSchemes = append(AddToSchemes, v1.SchemeBuilder.AddToScheme) -} diff --git a/apis/addtoscheme_xdl_v1alpha1.go b/apis/addtoscheme_training_v1alpha1.go similarity index 92% rename from apis/addtoscheme_xdl_v1alpha1.go rename to apis/addtoscheme_training_v1alpha1.go index 80d921be..37ed3a53 100644 --- a/apis/addtoscheme_xdl_v1alpha1.go +++ b/apis/addtoscheme_training_v1alpha1.go @@ -17,7 +17,7 @@ limitations under the License. package apis import ( - "github.com/alibaba/kubedl/apis/xdl/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" ) func init() { diff --git a/apis/addtoscheme_xgboostjob_v1alpha1.go b/apis/addtoscheme_xgboostjob_v1alpha1.go deleted file mode 100644 index 5dc89a95..00000000 --- a/apis/addtoscheme_xgboostjob_v1alpha1.go +++ /dev/null @@ -1,25 +0,0 @@ -/* - -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 apis - -import ( - "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" -) - -func init() { - // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back - AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme) -} diff --git a/apis/apis.go b/apis/apis.go index 46797cb5..84eda0de 100644 --- a/apis/apis.go +++ b/apis/apis.go @@ -14,36 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Generate deepcopy for xdl apis. -//go:generate go run $GOPATH/src/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i ./xdl/... -h ../hack/boilerplate.go.txt -// Generate default for xdl apis. -//go:generate go run $GOPATH/src/k8s.io/code-generator/cmd/defaulter-gen/main.go -O zz_generated.defaults -i ./xdl/... -h ../hack/boilerplate.go.txt - -// Generate deepcopy for tensorflow apis. -//go:generate go run $GOPATH/src/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i ./tensorflow/... -h ../hack/boilerplate.go.txt -// Generate default for tensorflow apis. -//go:generate go run $GOPATH/src/k8s.io/code-generator/cmd/defaulter-gen/main.go -O zz_generated.defaults -i ./tensorflow/... -h ../hack/boilerplate.go.txt - -// Generate deepcopy for pytorch apis. -//go:generate go run $GOPATH/src/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i ./pytorch/... -h ../hack/boilerplate.go.txt -// Generate default for pytorch apis. -//go:generate go run $GOPATH/src/k8s.io/code-generator/cmd/defaulter-gen/main.go -O zz_generated.defaults -i ./pytorch/... -h ../hack/boilerplate.go.txt - -// Generate deepcopy for xgboost apis. -//go:generate go run $GOPATH/src/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i ./xgboost/... -h ../hack/boilerplate.go.txt -// Generate default for xgboost apis. -//go:generate go run $GOPATH/src/k8s.io/code-generator/cmd/defaulter-gen/main.go -O zz_generated.defaults -i ./xgboost/... -h ../hack/boilerplate.go.txt - -// Generate deepcopy for marsjob apis. -//go:generate go run $GOPATH/src/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i ./marsjob/... -h ../hack/boilerplate.go.txt -// Generate default for elasticdljob apis. -//go:generate go run $GOPATH/src/k8s.io/code-generator/cmd/defaulter-gen/main.go -O zz_generated.defaults -i ./marsjob/... -h ../hack/boilerplate.go.txt - -// Generate deepcopy for elasticdljob apis. -//go:generate go run $GOPATH/src/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i ./elasticdljob/... -h ../hack/boilerplate.go.txt -// Generate default for elasticdljob apis. -//go:generate go run $GOPATH/src/k8s.io/code-generator/cmd/defaulter-gen/main.go -O zz_generated.defaults -i ./elasticdljob/... -h ../hack/boilerplate.go.txt - package apis import ( diff --git a/apis/elasticdl/v1alpha1/constant.go b/apis/elasticdl/v1alpha1/constant.go deleted file mode 100644 index c2a91a0a..00000000 --- a/apis/elasticdl/v1alpha1/constant.go +++ /dev/null @@ -1,7 +0,0 @@ -package v1alpha1 - -const ( - DefaultContainerName = "elasticdl" - DefaultPortName = "elasticdl-port" - DefaultPort = 11111 -) diff --git a/apis/elasticdl/v1alpha1/zz_generated.deepcopy.go b/apis/elasticdl/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 25639e12..00000000 --- a/apis/elasticdl/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,116 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2021 The Alibaba Authors. - -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. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/alibaba/kubedl/pkg/job_controller/api/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ElasticDLJob) DeepCopyInto(out *ElasticDLJob) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticDLJob. -func (in *ElasticDLJob) DeepCopy() *ElasticDLJob { - if in == nil { - return nil - } - out := new(ElasticDLJob) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ElasticDLJob) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ElasticDLJobList) DeepCopyInto(out *ElasticDLJobList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ElasticDLJob, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticDLJobList. -func (in *ElasticDLJobList) DeepCopy() *ElasticDLJobList { - if in == nil { - return nil - } - out := new(ElasticDLJobList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ElasticDLJobList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ElasticDLJobSpec) DeepCopyInto(out *ElasticDLJobSpec) { - *out = *in - in.RunPolicy.DeepCopyInto(&out.RunPolicy) - if in.ElasticDLReplicaSpecs != nil { - in, out := &in.ElasticDLReplicaSpecs, &out.ElasticDLReplicaSpecs - *out = make(map[v1.ReplicaType]*v1.ReplicaSpec, len(*in)) - for key, val := range *in { - var outVal *v1.ReplicaSpec - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(v1.ReplicaSpec) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticDLJobSpec. -func (in *ElasticDLJobSpec) DeepCopy() *ElasticDLJobSpec { - if in == nil { - return nil - } - out := new(ElasticDLJobSpec) - in.DeepCopyInto(out) - return out -} diff --git a/apis/mars/v1alpha1/groupversion_info.go b/apis/mars/v1alpha1/groupversion_info.go deleted file mode 100644 index 4b38a51e..00000000 --- a/apis/mars/v1alpha1/groupversion_info.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2020 The Alibaba Authors. - -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 v1beta1 contains API Schema definitions for the kubedl.io v1alpha1 API group -// +kubebuilder:object:generate=true -// +groupName=kubedl.io -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -const ( - Kind = "MarsJob" - GroupName = "kubedl.io" - GroupVersion = "v1alpha1" -) - -var ( - // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion} - - GroupVersionKind = SchemeGroupVersion.WithKind(Kind) - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - SchemeBuilder.SchemeBuilder.Register(addDefaultingFuncs) -} - -// Resource takes an unqualified resource and returns a Group-qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/apis/mars/v1alpha1/zz_generated.deepcopy.go b/apis/mars/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 0ffacf09..00000000 --- a/apis/mars/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,187 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2021 The Alibaba Authors. - -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. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/alibaba/kubedl/pkg/job_controller/api/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MarsJob) DeepCopyInto(out *MarsJob) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsJob. -func (in *MarsJob) DeepCopy() *MarsJob { - if in == nil { - return nil - } - out := new(MarsJob) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MarsJob) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MarsJobList) DeepCopyInto(out *MarsJobList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]MarsJob, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsJobList. -func (in *MarsJobList) DeepCopy() *MarsJobList { - if in == nil { - return nil - } - out := new(MarsJobList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MarsJobList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MarsJobSpec) DeepCopyInto(out *MarsJobSpec) { - *out = *in - in.RunPolicy.DeepCopyInto(&out.RunPolicy) - if in.WorkerMemoryTuningPolicy != nil { - in, out := &in.WorkerMemoryTuningPolicy, &out.WorkerMemoryTuningPolicy - *out = new(MarsWorkerMemoryTuningPolicy) - (*in).DeepCopyInto(*out) - } - if in.WebHost != nil { - in, out := &in.WebHost, &out.WebHost - *out = new(string) - **out = **in - } - if in.MarsReplicaSpecs != nil { - in, out := &in.MarsReplicaSpecs, &out.MarsReplicaSpecs - *out = make(map[v1.ReplicaType]*v1.ReplicaSpec, len(*in)) - for key, val := range *in { - var outVal *v1.ReplicaSpec - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(v1.ReplicaSpec) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsJobSpec. -func (in *MarsJobSpec) DeepCopy() *MarsJobSpec { - if in == nil { - return nil - } - out := new(MarsJobSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MarsJobStatus) DeepCopyInto(out *MarsJobStatus) { - *out = *in - in.JobStatus.DeepCopyInto(&out.JobStatus) - if in.WebServiceAddresses != nil { - in, out := &in.WebServiceAddresses, &out.WebServiceAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsJobStatus. -func (in *MarsJobStatus) DeepCopy() *MarsJobStatus { - if in == nil { - return nil - } - out := new(MarsJobStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MarsWorkerMemoryTuningPolicy) DeepCopyInto(out *MarsWorkerMemoryTuningPolicy) { - *out = *in - if in.PlasmaStore != nil { - in, out := &in.PlasmaStore, &out.PlasmaStore - *out = new(string) - **out = **in - } - if in.LockFreeFileIO != nil { - in, out := &in.LockFreeFileIO, &out.LockFreeFileIO - *out = new(bool) - **out = **in - } - if in.SpillDirs != nil { - in, out := &in.SpillDirs, &out.SpillDirs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.WorkerCachePercentage != nil { - in, out := &in.WorkerCachePercentage, &out.WorkerCachePercentage - *out = new(int32) - **out = **in - } - if in.WorkerCacheSize != nil { - in, out := &in.WorkerCacheSize, &out.WorkerCacheSize - x := (*in).DeepCopy() - *out = &x - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsWorkerMemoryTuningPolicy. -func (in *MarsWorkerMemoryTuningPolicy) DeepCopy() *MarsWorkerMemoryTuningPolicy { - if in == nil { - return nil - } - out := new(MarsWorkerMemoryTuningPolicy) - in.DeepCopyInto(out) - return out -} diff --git a/apis/mars/v1alpha1/zz_generated.defaults.go b/apis/mars/v1alpha1/zz_generated.defaults.go deleted file mode 100644 index eb63cc97..00000000 --- a/apis/mars/v1alpha1/zz_generated.defaults.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2020 The Alibaba Authors. - -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. -*/ -// Code generated by main. DO NOT EDIT. - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&MarsJob{}, func(obj interface{}) { SetObjectDefaults_MarsJob(obj.(*MarsJob)) }) - scheme.AddTypeDefaultingFunc(&MarsJobList{}, func(obj interface{}) { SetObjectDefaults_MarsJobList(obj.(*MarsJobList)) }) - return nil -} - -func SetObjectDefaults_MarsJob(in *MarsJob) { - SetDefaults_MarsJob(in) -} - -func SetObjectDefaults_MarsJobList(in *MarsJobList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_MarsJob(a) - } -} diff --git a/apis/mpi/v1/register.go b/apis/mpi/v1/register.go deleted file mode 100644 index 81e809a8..00000000 --- a/apis/mpi/v1/register.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2021 The Alibaba Authors. - -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 v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const ( - // GroupName is the group name use in this package. - GroupName = "kubeflow.org" - // Kind is the kind name. - Kind = "MPIJob" - // GroupVersion is the version. - GroupVersion = "v1" -) - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) - AddToScheme = SchemeBuilder.AddToScheme - SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion} - SchemeGroupVersionKind = schema.GroupVersionKind{Group: GroupName, Version: GroupVersion, Kind: Kind} -) - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -// addKnownTypes adds the set of types defined in this package to the supplied scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &MPIJob{}, - &MPIJobList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/mpi/v1/zz_generated.deepcopy.go b/apis/mpi/v1/zz_generated.deepcopy.go deleted file mode 100644 index ba7951ba..00000000 --- a/apis/mpi/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,217 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2021 The Alibaba Authors. - -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. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1 - -import ( - apiv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LegacyV1Alpha1) DeepCopyInto(out *LegacyV1Alpha1) { - *out = *in - if in.DeprecatedGPUs != nil { - in, out := &in.DeprecatedGPUs, &out.DeprecatedGPUs - *out = new(int32) - **out = **in - } - if in.GPUsPerNode != nil { - in, out := &in.GPUsPerNode, &out.GPUsPerNode - *out = new(int32) - **out = **in - } - if in.ProcessingUnits != nil { - in, out := &in.ProcessingUnits, &out.ProcessingUnits - *out = new(int32) - **out = **in - } - if in.ProcessingUnitsPerNode != nil { - in, out := &in.ProcessingUnitsPerNode, &out.ProcessingUnitsPerNode - *out = new(int32) - **out = **in - } - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - in.Template.DeepCopyInto(&out.Template) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LegacyV1Alpha1. -func (in *LegacyV1Alpha1) DeepCopy() *LegacyV1Alpha1 { - if in == nil { - return nil - } - out := new(LegacyV1Alpha1) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LegacyV1Alpha2) DeepCopyInto(out *LegacyV1Alpha2) { - *out = *in - if in.MPIDistribution != nil { - in, out := &in.MPIDistribution, &out.MPIDistribution - *out = new(MPIDistributionType) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LegacyV1Alpha2. -func (in *LegacyV1Alpha2) DeepCopy() *LegacyV1Alpha2 { - if in == nil { - return nil - } - out := new(LegacyV1Alpha2) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MPIJob) DeepCopyInto(out *MPIJob) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MPIJob. -func (in *MPIJob) DeepCopy() *MPIJob { - if in == nil { - return nil - } - out := new(MPIJob) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MPIJob) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MPIJobLegacySpec) DeepCopyInto(out *MPIJobLegacySpec) { - *out = *in - if in.RunPolicy != nil { - in, out := &in.RunPolicy, &out.RunPolicy - *out = new(apiv1.RunPolicy) - (*in).DeepCopyInto(*out) - } - if in.LegacyV1Alpha1 != nil { - in, out := &in.LegacyV1Alpha1, &out.LegacyV1Alpha1 - *out = new(LegacyV1Alpha1) - (*in).DeepCopyInto(*out) - } - if in.LegacyV1Alpha2 != nil { - in, out := &in.LegacyV1Alpha2, &out.LegacyV1Alpha2 - *out = new(LegacyV1Alpha2) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MPIJobLegacySpec. -func (in *MPIJobLegacySpec) DeepCopy() *MPIJobLegacySpec { - if in == nil { - return nil - } - out := new(MPIJobLegacySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MPIJobList) DeepCopyInto(out *MPIJobList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]MPIJob, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MPIJobList. -func (in *MPIJobList) DeepCopy() *MPIJobList { - if in == nil { - return nil - } - out := new(MPIJobList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MPIJobList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MPIJobSpec) DeepCopyInto(out *MPIJobSpec) { - *out = *in - if in.SlotsPerWorker != nil { - in, out := &in.SlotsPerWorker, &out.SlotsPerWorker - *out = new(int32) - **out = **in - } - if in.MPIReplicaSpecs != nil { - in, out := &in.MPIReplicaSpecs, &out.MPIReplicaSpecs - *out = make(map[apiv1.ReplicaType]*apiv1.ReplicaSpec, len(*in)) - for key, val := range *in { - var outVal *apiv1.ReplicaSpec - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(apiv1.ReplicaSpec) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } - in.RunPolicy.DeepCopyInto(&out.RunPolicy) - if in.MPIJobLegacySpec != nil { - in, out := &in.MPIJobLegacySpec, &out.MPIJobLegacySpec - *out = new(MPIJobLegacySpec) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MPIJobSpec. -func (in *MPIJobSpec) DeepCopy() *MPIJobSpec { - if in == nil { - return nil - } - out := new(MPIJobSpec) - in.DeepCopyInto(out) - return out -} diff --git a/apis/mpi/v1/zz_generated.defaults.go b/apis/mpi/v1/zz_generated.defaults.go deleted file mode 100644 index cfcb2db8..00000000 --- a/apis/mpi/v1/zz_generated.defaults.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2021 The Alibaba Authors. - -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. -*/ - -// Code generated by defaulter-gen. DO NOT EDIT. - -package v1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&MPIJob{}, func(obj interface{}) { SetObjectDefaults_MPIJob(obj.(*MPIJob)) }) - scheme.AddTypeDefaultingFunc(&MPIJobList{}, func(obj interface{}) { SetObjectDefaults_MPIJobList(obj.(*MPIJobList)) }) - return nil -} - -func SetObjectDefaults_MPIJob(in *MPIJob) { - SetDefaults_MPIJob(in) -} - -func SetObjectDefaults_MPIJobList(in *MPIJobList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_MPIJob(a) - } -} diff --git a/apis/pytorch/v1/constants.go b/apis/pytorch/v1/constants.go deleted file mode 100644 index ae5636c3..00000000 --- a/apis/pytorch/v1/constants.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2018 The Kubeflow Authors -// -// 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 v1 - -import ( - common "github.com/alibaba/kubedl/pkg/job_controller/api/v1" -) - -const ( - // EnvKubeflowNamespace is ENV for kubeflow namespace specified by user. - EnvKubeflowNamespace = "KUBEFLOW_NAMESPACE" - - // DefaultPortName is name of the port used to communicate between Master and - // workers. - DefaultPortName = "pytorchjob-port" - // DefaultContainerName is the name of the PyTorchJob container. - DefaultContainerName = "pytorch" - // DefaultPort is default value of the port. - DefaultPort = 23456 - // DefaultMasterRestartPolicy is default RestartPolicy for Master PyTorchReplicaSpec. - DefaultMasterRestartPolicy = common.RestartPolicyExitCode - // DefaultWorkerRestartPolicy is default RestartPolicy for Worker PyTorchReplicaSpec, - DefaultWorkerRestartPolicy = common.RestartPolicyOnFailure -) diff --git a/apis/pytorch/v1/doc.go b/apis/pytorch/v1/doc.go deleted file mode 100644 index 9649a4e7..00000000 --- a/apis/pytorch/v1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2018 The Kubeflow Authors -// -// 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. - -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta - -// Package v1 is the v1 version of the API. -// +groupName=kubeflow.org -package v1 diff --git a/apis/pytorch/v1/register.go b/apis/pytorch/v1/register.go deleted file mode 100644 index 1da5903a..00000000 --- a/apis/pytorch/v1/register.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2018 The Kubeflow Authors -// -// 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 v1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/runtime/scheme" -) - -const ( - // GroupName is the group name use in this package. - GroupName = "kubeflow.org" - // Kind is the kind name. - Kind = "PyTorchJob" - // GroupVersion is the version. - GroupVersion = "v1" - // Plural is the Plural for pytorchJob. - Plural = "pytorchjobs" - // Singular is the singular for pytorchJob. - Singular = "pytorchjob" - // PytorchCRD is the CRD name for PytorchJob. - PytorchCRD = "pytorchjobs.kubeflow.org" -) - -var ( - // SchemeGroupVersion is the group version used to register these objects. - SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion} - - SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} - // SchemeGroupVersionKind is the GroupVersionKind of the resource. - SchemeGroupVersionKind = SchemeGroupVersion.WithKind(Kind) -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - SchemeBuilder.SchemeBuilder.Register(addDefaultingFuncs) -} - -// Resource takes an unqualified resource and returns a Group-qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/apis/pytorch/v1/v1_suite_test.go b/apis/pytorch/v1/v1_suite_test.go deleted file mode 100644 index c21384bd..00000000 --- a/apis/pytorch/v1/v1_suite_test.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2019 The Alibaba Authors. - -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 v1 - -import ( - "log" - "os" - "testing" - - "k8s.io/client-go/kubernetes/scheme" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/fake" -) - -var c client.Client - -func TestMain(m *testing.M) { - err := SchemeBuilder.AddToScheme(scheme.Scheme) - if err != nil { - log.Fatal(err) - } - - c = fake.NewFakeClientWithScheme(scheme.Scheme) - - code := m.Run() - os.Exit(code) -} diff --git a/apis/pytorch/v1/zz_generated.deepcopy.go b/apis/pytorch/v1/zz_generated.deepcopy.go deleted file mode 100644 index a90cbea2..00000000 --- a/apis/pytorch/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,116 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2021 The Alibaba Authors. - -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. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1 - -import ( - apiv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PyTorchJob) DeepCopyInto(out *PyTorchJob) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PyTorchJob. -func (in *PyTorchJob) DeepCopy() *PyTorchJob { - if in == nil { - return nil - } - out := new(PyTorchJob) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PyTorchJob) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PyTorchJobList) DeepCopyInto(out *PyTorchJobList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PyTorchJob, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PyTorchJobList. -func (in *PyTorchJobList) DeepCopy() *PyTorchJobList { - if in == nil { - return nil - } - out := new(PyTorchJobList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PyTorchJobList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PyTorchJobSpec) DeepCopyInto(out *PyTorchJobSpec) { - *out = *in - in.RunPolicy.DeepCopyInto(&out.RunPolicy) - if in.PyTorchReplicaSpecs != nil { - in, out := &in.PyTorchReplicaSpecs, &out.PyTorchReplicaSpecs - *out = make(map[apiv1.ReplicaType]*apiv1.ReplicaSpec, len(*in)) - for key, val := range *in { - var outVal *apiv1.ReplicaSpec - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(apiv1.ReplicaSpec) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PyTorchJobSpec. -func (in *PyTorchJobSpec) DeepCopy() *PyTorchJobSpec { - if in == nil { - return nil - } - out := new(PyTorchJobSpec) - in.DeepCopyInto(out) - return out -} diff --git a/apis/pytorch/v1/zz_generated.defaults.go b/apis/pytorch/v1/zz_generated.defaults.go deleted file mode 100644 index 1bd5617f..00000000 --- a/apis/pytorch/v1/zz_generated.defaults.go +++ /dev/null @@ -1,44 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2019 The Alibaba Authors. - -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. -*/ -// Code generated by main. DO NOT EDIT. - -package v1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&PyTorchJob{}, func(obj interface{}) { SetObjectDefaults_PyTorchJob(obj.(*PyTorchJob)) }) - scheme.AddTypeDefaultingFunc(&PyTorchJobList{}, func(obj interface{}) { SetObjectDefaults_PyTorchJobList(obj.(*PyTorchJobList)) }) - return nil -} - -func SetObjectDefaults_PyTorchJob(in *PyTorchJob) { - SetDefaults_PyTorchJob(in) -} - -func SetObjectDefaults_PyTorchJobList(in *PyTorchJobList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_PyTorchJob(a) - } -} diff --git a/apis/tensorflow/v1/doc.go b/apis/tensorflow/v1/doc.go deleted file mode 100644 index 48b85e8c..00000000 --- a/apis/tensorflow/v1/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2018 The Kubeflow Authors -// -// 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. - -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true - -// Package v1 is the v1 version of the API. -// +groupName=kubeflow.org -package v1 diff --git a/apis/tensorflow/v1/openapi_generated.go b/apis/tensorflow/v1/openapi_generated.go deleted file mode 100644 index b79fc809..00000000 --- a/apis/tensorflow/v1/openapi_generated.go +++ /dev/null @@ -1,10873 +0,0 @@ -// +build !ignore_autogenerated - -// Copyright 2019 The Kubeflow Authors -// -// 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. - -// Code generated by openapi-gen. DO NOT EDIT. - -// This file was autogenerated by openapi-gen. Do not edit it manually! - -package v1 - -import ( - spec "github.com/go-openapi/spec" - resource "k8s.io/apimachinery/pkg/api/resource" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - intstr "k8s.io/apimachinery/pkg/util/intstr" - common "k8s.io/kube-openapi/pkg/common" -) - -func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { - return map[string]common.OpenAPIDefinition{ - "github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1.TFJob": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a TFJob resource.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard Kubernetes object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired state of the TFJob.", - Ref: ref("github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1.TFJobSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the TFJob. Read-only (modified by the system).", - Ref: ref("github.com/kubeflow/tf-operator/pkg/apis/pkg/v1.JobStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/tf-operator/pkg/apis/pkg/v1.JobStatus", "github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1.TFJobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1.TFJobList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TFJobList is a list of TFJobs.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of TFJobs.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1.TFJob"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1.TFJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1.TFJobSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TFJobSpec is a desired state description of the TFJob.", - Properties: map[string]spec.Schema{ - "activeDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the duration (in seconds) since startTime during which the job can remain active before it is terminated. Must be a positive integer. This setting applies only to pods where restartPolicy is OnFailure or Always.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "backoffLimit": { - SchemaProps: spec.SchemaProps{ - Description: "Number of retries before marking this job as failed.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "cleanPodPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Defines the policy for cleaning up pods after the TFJob completes. Defaults to Running.", - Type: []string{"string"}, - Format: "", - }, - }, - "ttlSecondsAfterFinished": { - SchemaProps: spec.SchemaProps{ - Description: "Defines the TTL for cleaning up finished TFJobs (temporary before kubernetes adds the cleanup controller). It may take extra ReconcilePeriod seconds for the cleanup, since reconcile gets called periodically. Defaults to infinite.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "tfReplicaSpecs": { - SchemaProps: spec.SchemaProps{ - Description: "A map of TFReplicaType (type) to ReplicaSpec (value). Specifies the TF cluster configuration. For example,\n {\n \"PS\": ReplicaSpec,\n \"Worker\": ReplicaSpec,\n }", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubeflow/tf-operator/pkg/apis/pkg/v1.ReplicaSpec"), - }, - }, - }, - }, - }, - }, - Required: []string{"tfReplicaSpecs"}, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/tf-operator/pkg/apis/pkg/v1.ReplicaSpec"}, - }, - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "volumeID": { - SchemaProps: spec.SchemaProps{ - Description: "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Type: []string{"string"}, - Format: "", - }, - }, - "partition": { - SchemaProps: spec.SchemaProps{ - Description: "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"volumeID"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Affinity": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Affinity is a group of affinity scheduling rules.", - Properties: map[string]spec.Schema{ - "nodeAffinity": { - SchemaProps: spec.SchemaProps{ - Description: "Describes node affinity scheduling rules for the pod.", - Ref: ref("k8s.io/api/core/v1.NodeAffinity"), - }, - }, - "podAffinity": { - SchemaProps: spec.SchemaProps{ - Description: "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAffinity"), - }, - }, - "podAntiAffinity": { - SchemaProps: spec.SchemaProps{ - Description: "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAntiAffinity"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeAffinity", "k8s.io/api/core/v1.PodAffinity", "k8s.io/api/core/v1.PodAntiAffinity"}, - }, - "k8s.io/api/core/v1.AttachedVolume": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AttachedVolume describes a volume attached to a node", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the attached volume", - Type: []string{"string"}, - Format: "", - }, - }, - "devicePath": { - SchemaProps: spec.SchemaProps{ - Description: "DevicePath represents the device path where the volume should be available", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "devicePath"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.AvoidPods": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AvoidPods describes pods that should avoid this node. This is the value for a Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and will eventually become a field of NodeStatus.", - Properties: map[string]spec.Schema{ - "preferAvoidPods": { - SchemaProps: spec.SchemaProps{ - Description: "Bounded-sized list of signatures of pods that should avoid this node, sorted in timestamp order from oldest to newest. Size of the slice is unspecified.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PreferAvoidPodsEntry"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PreferAvoidPodsEntry"}, - }, - "k8s.io/api/core/v1.AzureDiskVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Properties: map[string]spec.Schema{ - "diskName": { - SchemaProps: spec.SchemaProps{ - Description: "The Name of the data disk in the blob storage", - Type: []string{"string"}, - Format: "", - }, - }, - "diskURI": { - SchemaProps: spec.SchemaProps{ - Description: "The URI the data disk in the blob storage", - Type: []string{"string"}, - Format: "", - }, - }, - "cachingMode": { - SchemaProps: spec.SchemaProps{ - Description: "Host Caching mode: None, Read Only, Read Write.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"diskName", "diskURI"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.AzureFilePersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Properties: map[string]spec.Schema{ - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "the name of secret that contains Azure Storage Account Name and Key", - Type: []string{"string"}, - Format: "", - }, - }, - "shareName": { - SchemaProps: spec.SchemaProps{ - Description: "Share Name", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretNamespace": { - SchemaProps: spec.SchemaProps{ - Description: "the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"secretName", "shareName"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.AzureFileVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Properties: map[string]spec.Schema{ - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "the name of secret that contains Azure Storage Account Name and Key", - Type: []string{"string"}, - Format: "", - }, - }, - "shareName": { - SchemaProps: spec.SchemaProps{ - Description: "Share Name", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"secretName", "shareName"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Binding": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "target": { - SchemaProps: spec.SchemaProps{ - Description: "The target object that you want to bind to the standard object.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - Required: []string{"target"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.CSIPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents storage that is managed by an external CSI volume driver (Beta feature)", - Properties: map[string]spec.Schema{ - "driver": { - SchemaProps: spec.SchemaProps{ - Description: "Driver is the name of the driver to use for this volume. Required.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeHandle": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", - Type: []string{"boolean"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeAttributes": { - SchemaProps: spec.SchemaProps{ - Description: "Attributes of the volume to publish.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "controllerPublishSecretRef": { - SchemaProps: spec.SchemaProps{ - Description: "ControllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "nodeStageSecretRef": { - SchemaProps: spec.SchemaProps{ - Description: "NodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "nodePublishSecretRef": { - SchemaProps: spec.SchemaProps{ - Description: "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - }, - Required: []string{"driver", "volumeHandle"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - }, - "k8s.io/api/core/v1.Capabilities": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Adds and removes POSIX capabilities from running containers.", - Properties: map[string]spec.Schema{ - "add": { - SchemaProps: spec.SchemaProps{ - Description: "Added capabilities", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "drop": { - SchemaProps: spec.SchemaProps{ - Description: "Removed capabilities", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.CephFSPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "secretFile": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"monitors"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - }, - "k8s.io/api/core/v1.CephFSVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "secretFile": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"monitors"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.CinderPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "volumeID": { - SchemaProps: spec.SchemaProps{ - Description: "volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: points to a secret object containing parameters used to connect to OpenStack.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - }, - Required: []string{"volumeID"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - }, - "k8s.io/api/core/v1.CinderVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "volumeID": { - SchemaProps: spec.SchemaProps{ - Description: "volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: points to a secret object containing parameters used to connect to OpenStack.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - Required: []string{"volumeID"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.ClientIPConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClientIPConfig represents the configurations of Client IP based session affinity.", - Properties: map[string]spec.Schema{ - "timeoutSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ComponentCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Information about the condition of a component.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of condition for a component. Valid value: \"Healthy\"", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Message about the condition for a component. For example, information about a health check.", - Type: []string{"string"}, - Format: "", - }, - }, - "error": { - SchemaProps: spec.SchemaProps{ - Description: "Condition error code for a component. For example, a health check error code.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ComponentStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ComponentStatus (and ComponentStatusList) holds the cluster validation info.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of component conditions observed", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ComponentCondition"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ComponentCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ComponentStatusList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Status of all the conditions for the component as a list of ComponentStatus objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of ComponentStatus objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ComponentStatus"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ComponentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.ConfigMap": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap holds configuration data for pods to consume.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "data": { - SchemaProps: spec.SchemaProps{ - Description: "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "binaryData": { - SchemaProps: spec.SchemaProps{ - Description: "BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ConfigMapEnvSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ConfigMapKeySelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Selects a key from a ConfigMap.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The key to select.", - Type: []string{"string"}, - Format: "", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap or it's key must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"key"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ConfigMapList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConfigMapList is a resource containing a list of ConfigMap objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of ConfigMaps.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ConfigMap"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMap", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.ConfigMapNodeConfigSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node.", - Properties: map[string]spec.Schema{ - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", - Type: []string{"string"}, - Format: "", - }, - }, - "kubeletConfigKey": { - SchemaProps: spec.SchemaProps{ - Description: "KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"namespace", "name", "kubeletConfigKey"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ConfigMapProjection": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap or it's keys must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, - }, - "k8s.io/api/core/v1.ConfigMapVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, - }, - }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap or it's keys must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, - }, - "k8s.io/api/core/v1.Container": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A single application container that you want to run within a pod.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", - Type: []string{"string"}, - Format: "", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.", - Type: []string{"string"}, - Format: "", - }, - }, - "command": { - SchemaProps: spec.SchemaProps{ - Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "args": { - SchemaProps: spec.SchemaProps{ - Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "workingDir": { - SchemaProps: spec.SchemaProps{ - Description: "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", - Type: []string{"string"}, - Format: "", - }, - }, - "ports": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "containerPort", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerPort"), - }, - }, - }, - }, - }, - "envFrom": { - SchemaProps: spec.SchemaProps{ - Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), - }, - }, - }, - }, - }, - "env": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of environment variables to set in the container. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvVar"), - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), - }, - }, - "volumeMounts": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "mountPath", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Pod volumes to mount into the container's filesystem. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeMount"), - }, - }, - }, - }, - }, - "volumeDevices": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "devicePath", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), - }, - }, - }, - }, - }, - "livenessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "readinessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "lifecycle": { - SchemaProps: spec.SchemaProps{ - Description: "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), - }, - }, - "terminationMessagePath": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", - Type: []string{"string"}, - Format: "", - }, - }, - "terminationMessagePolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", - Type: []string{"string"}, - Format: "", - }, - }, - "imagePullPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", - Type: []string{"string"}, - Format: "", - }, - }, - "securityContext": { - SchemaProps: spec.SchemaProps{ - Description: "Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), - }, - }, - "stdin": { - SchemaProps: spec.SchemaProps{ - Description: "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stdinOnce": { - SchemaProps: spec.SchemaProps{ - Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tty": { - SchemaProps: spec.SchemaProps{ - Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, - }, - "k8s.io/api/core/v1.ContainerImage": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Describe a container image", - Properties: map[string]spec.Schema{ - "names": { - SchemaProps: spec.SchemaProps{ - Description: "Names by which this image is known. e.g. [\"k8s.gcr.io/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "sizeBytes": { - SchemaProps: spec.SchemaProps{ - Description: "The size of the image in bytes.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - Required: []string{"names"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ContainerPort": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerPort represents a network port in a single container.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", - Type: []string{"string"}, - Format: "", - }, - }, - "hostPort": { - SchemaProps: spec.SchemaProps{ - Description: "Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "containerPort": { - SchemaProps: spec.SchemaProps{ - Description: "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "protocol": { - SchemaProps: spec.SchemaProps{ - Description: "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".", - Type: []string{"string"}, - Format: "", - }, - }, - "hostIP": { - SchemaProps: spec.SchemaProps{ - Description: "What host IP to bind the external port to.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"containerPort"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ContainerState": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.", - Properties: map[string]spec.Schema{ - "waiting": { - SchemaProps: spec.SchemaProps{ - Description: "Details about a waiting container", - Ref: ref("k8s.io/api/core/v1.ContainerStateWaiting"), - }, - }, - "running": { - SchemaProps: spec.SchemaProps{ - Description: "Details about a running container", - Ref: ref("k8s.io/api/core/v1.ContainerStateRunning"), - }, - }, - "terminated": { - SchemaProps: spec.SchemaProps{ - Description: "Details about a terminated container", - Ref: ref("k8s.io/api/core/v1.ContainerStateTerminated"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStateRunning", "k8s.io/api/core/v1.ContainerStateTerminated", "k8s.io/api/core/v1.ContainerStateWaiting"}, - }, - "k8s.io/api/core/v1.ContainerStateRunning": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerStateRunning is a running state of a container.", - Properties: map[string]spec.Schema{ - "startedAt": { - SchemaProps: spec.SchemaProps{ - Description: "Time at which the container was last (re-)started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.ContainerStateTerminated": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerStateTerminated is a terminated state of a container.", - Properties: map[string]spec.Schema{ - "exitCode": { - SchemaProps: spec.SchemaProps{ - Description: "Exit status from the last termination of the container", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "signal": { - SchemaProps: spec.SchemaProps{ - Description: "Signal from the last termination of the container", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason from the last termination of the container", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Message regarding the last termination of the container", - Type: []string{"string"}, - Format: "", - }, - }, - "startedAt": { - SchemaProps: spec.SchemaProps{ - Description: "Time at which previous execution of the container started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "finishedAt": { - SchemaProps: spec.SchemaProps{ - Description: "Time at which the container last terminated", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "containerID": { - SchemaProps: spec.SchemaProps{ - Description: "Container's ID in the format 'docker://'", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"exitCode"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.ContainerStateWaiting": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerStateWaiting is a waiting state of a container.", - Properties: map[string]spec.Schema{ - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason the container is not yet running.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Message regarding why the container is not yet running.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ContainerStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerStatus contains details for the current status of this container.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.", - Type: []string{"string"}, - Format: "", - }, - }, - "state": { - SchemaProps: spec.SchemaProps{ - Description: "Details about the container's current condition.", - Ref: ref("k8s.io/api/core/v1.ContainerState"), - }, - }, - "lastState": { - SchemaProps: spec.SchemaProps{ - Description: "Details about the container's last termination condition.", - Ref: ref("k8s.io/api/core/v1.ContainerState"), - }, - }, - "ready": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies whether the container has passed its readiness probe.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "restartCount": { - SchemaProps: spec.SchemaProps{ - Description: "The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images", - Type: []string{"string"}, - Format: "", - }, - }, - "imageID": { - SchemaProps: spec.SchemaProps{ - Description: "ImageID of the container's image.", - Type: []string{"string"}, - Format: "", - }, - }, - "containerID": { - SchemaProps: spec.SchemaProps{ - Description: "Container's ID in the format 'docker://'.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "ready", "restartCount", "image", "imageID"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerState"}, - }, - "k8s.io/api/core/v1.DaemonEndpoint": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonEndpoint contains information about a single Daemon endpoint.", - Properties: map[string]spec.Schema{ - "Port": { - SchemaProps: spec.SchemaProps{ - Description: "Port number of the given endpoint.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"Port"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.DownwardAPIProjection": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", - Properties: map[string]spec.Schema{ - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of DownwardAPIVolume file", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, - }, - "k8s.io/api/core/v1.DownwardAPIVolumeFile": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DownwardAPIVolumeFile represents information to create the file containing the pod field", - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldRef": { - SchemaProps: spec.SchemaProps{ - Description: "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), - }, - }, - "resourceFieldRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", - Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), - }, - }, - "mode": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"path"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector"}, - }, - "k8s.io/api/core/v1.DownwardAPIVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of downward API volume file", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), - }, - }, - }, - }, - }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, - }, - "k8s.io/api/core/v1.EmptyDirVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "medium": { - SchemaProps: spec.SchemaProps{ - Description: "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Type: []string{"string"}, - Format: "", - }, - }, - "sizeLimit": { - SchemaProps: spec.SchemaProps{ - Description: "Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.EndpointAddress": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointAddress is a tuple that describes single IP address.", - Properties: map[string]spec.Schema{ - "ip": { - SchemaProps: spec.SchemaProps{ - Description: "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.", - Type: []string{"string"}, - Format: "", - }, - }, - "hostname": { - SchemaProps: spec.SchemaProps{ - Description: "The Hostname of this endpoint", - Type: []string{"string"}, - Format: "", - }, - }, - "nodeName": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", - Type: []string{"string"}, - Format: "", - }, - }, - "targetRef": { - SchemaProps: spec.SchemaProps{ - Description: "Reference to object providing the endpoint.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - Required: []string{"ip"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, - }, - "k8s.io/api/core/v1.EndpointPort": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointPort is a tuple that describes a single port.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "The port number of the endpoint.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "protocol": { - SchemaProps: spec.SchemaProps{ - Description: "The IP protocol for this port. Must be UDP or TCP. Default is TCP.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.EndpointSubset": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointSubset is a group of addresses with a pkg set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]", - Properties: map[string]spec.Schema{ - "addresses": { - SchemaProps: spec.SchemaProps{ - Description: "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), - }, - }, - }, - }, - }, - "notReadyAddresses": { - SchemaProps: spec.SchemaProps{ - Description: "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), - }, - }, - }, - }, - }, - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "Port numbers available on the related IP addresses.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EndpointPort"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EndpointAddress", "k8s.io/api/core/v1.EndpointPort"}, - }, - "k8s.io/api/core/v1.Endpoints": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "subsets": { - SchemaProps: spec.SchemaProps{ - Description: "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EndpointSubset"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EndpointSubset", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.EndpointsList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointsList is a list of endpoints.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of endpoints.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Endpoints"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Endpoints", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.EnvFromSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EnvFromSource represents the source of a set of ConfigMaps", - Properties: map[string]spec.Schema{ - "prefix": { - SchemaProps: spec.SchemaProps{ - Description: "An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", - Type: []string{"string"}, - Format: "", - }, - }, - "configMapRef": { - SchemaProps: spec.SchemaProps{ - Description: "The ConfigMap to select from", - Ref: ref("k8s.io/api/core/v1.ConfigMapEnvSource"), - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "The Secret to select from", - Ref: ref("k8s.io/api/core/v1.SecretEnvSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapEnvSource", "k8s.io/api/core/v1.SecretEnvSource"}, - }, - "k8s.io/api/core/v1.EnvVar": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EnvVar represents an environment variable present in a Container.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the environment variable. Must be a C_IDENTIFIER.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", - Type: []string{"string"}, - Format: "", - }, - }, - "valueFrom": { - SchemaProps: spec.SchemaProps{ - Description: "Source for the environment variable's value. Cannot be used if value is not empty.", - Ref: ref("k8s.io/api/core/v1.EnvVarSource"), - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EnvVarSource"}, - }, - "k8s.io/api/core/v1.EnvVarSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EnvVarSource represents a source for the value of an EnvVar.", - Properties: map[string]spec.Schema{ - "fieldRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), - }, - }, - "resourceFieldRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.", - Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), - }, - }, - "configMapKeyRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a key of a ConfigMap.", - Ref: ref("k8s.io/api/core/v1.ConfigMapKeySelector"), - }, - }, - "secretKeyRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a key of a secret in the pod's namespace", - Ref: ref("k8s.io/api/core/v1.SecretKeySelector"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapKeySelector", "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector", "k8s.io/api/core/v1.SecretKeySelector"}, - }, - "k8s.io/api/core/v1.Event": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Event is a report of an event somewhere in the cluster.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "involvedObject": { - SchemaProps: spec.SchemaProps{ - Description: "The object that this event is about.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the status of this operation.", - Type: []string{"string"}, - Format: "", - }, - }, - "source": { - SchemaProps: spec.SchemaProps{ - Description: "The component reporting this event. Should be a short machine understandable string.", - Ref: ref("k8s.io/api/core/v1.EventSource"), - }, - }, - "firstTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "The time at which the most recent occurrence of this event was recorded.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "count": { - SchemaProps: spec.SchemaProps{ - Description: "The number of times this event has occurred.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of this event (Normal, Warning), new types could be added in the future", - Type: []string{"string"}, - Format: "", - }, - }, - "eventTime": { - SchemaProps: spec.SchemaProps{ - Description: "Time when this Event was first observed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - "series": { - SchemaProps: spec.SchemaProps{ - Description: "Data about the Event series this event represents or nil if it's a singleton Event.", - Ref: ref("k8s.io/api/core/v1.EventSeries"), - }, - }, - "action": { - SchemaProps: spec.SchemaProps{ - Description: "What action was taken/failed regarding to the Regarding object.", - Type: []string{"string"}, - Format: "", - }, - }, - "related": { - SchemaProps: spec.SchemaProps{ - Description: "Optional secondary object for more complex actions.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "reportingComponent": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", - Type: []string{"string"}, - Format: "", - }, - }, - "reportingInstance": { - SchemaProps: spec.SchemaProps{ - Description: "ID of the controller instance, e.g. `kubelet-xyzf`.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"metadata", "involvedObject"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EventSeries", "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.EventList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventList is a list of events.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of events", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Event"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.EventSeries": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.", - Properties: map[string]spec.Schema{ - "count": { - SchemaProps: spec.SchemaProps{ - Description: "Number of occurrences in this series up to the last heartbeat time", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "lastObservedTime": { - SchemaProps: spec.SchemaProps{ - Description: "Time of the last occurrence observed", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - "state": { - SchemaProps: spec.SchemaProps{ - Description: "State of this Series: Ongoing or Finished", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, - }, - "k8s.io/api/core/v1.EventSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventSource contains information for an event.", - Properties: map[string]spec.Schema{ - "component": { - SchemaProps: spec.SchemaProps{ - Description: "Component from which the event is generated.", - Type: []string{"string"}, - Format: "", - }, - }, - "host": { - SchemaProps: spec.SchemaProps{ - Description: "Node name on which the event is generated.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ExecAction": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExecAction describes a \"run in container\" action.", - Properties: map[string]spec.Schema{ - "command": { - SchemaProps: spec.SchemaProps{ - Description: "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.FCVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "targetWWNs": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: FC target worldwide names (WWNs)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "lun": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: FC target lun number", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "wwids": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.FlexPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.", - Properties: map[string]spec.Schema{ - "driver": { - SchemaProps: spec.SchemaProps{ - Description: "Driver is the name of the driver to use for this volume.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "options": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Extra command options if any.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"driver"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - }, - "k8s.io/api/core/v1.FlexVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Properties: map[string]spec.Schema{ - "driver": { - SchemaProps: spec.SchemaProps{ - Description: "Driver is the name of the driver to use for this volume.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "options": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Extra command options if any.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"driver"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.FlockerVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "datasetName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated", - Type: []string{"string"}, - Format: "", - }, - }, - "datasetUUID": { - SchemaProps: spec.SchemaProps{ - Description: "UUID of the dataset. This is unique identifier of a Flocker dataset", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "pdName": { - SchemaProps: spec.SchemaProps{ - Description: "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Type: []string{"string"}, - Format: "", - }, - }, - "partition": { - SchemaProps: spec.SchemaProps{ - Description: "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"pdName"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.GitRepoVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.\n\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", - Properties: map[string]spec.Schema{ - "repository": { - SchemaProps: spec.SchemaProps{ - Description: "Repository URL", - Type: []string{"string"}, - Format: "", - }, - }, - "revision": { - SchemaProps: spec.SchemaProps{ - Description: "Commit hash for the specified revision.", - Type: []string{"string"}, - Format: "", - }, - }, - "directory": { - SchemaProps: spec.SchemaProps{ - Description: "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"repository"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.GlusterfsVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "endpoints": { - SchemaProps: spec.SchemaProps{ - Description: "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"endpoints", "path"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.HTTPGetAction": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HTTPGetAction describes an action based on HTTP Get requests.", - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path to access on the HTTP server.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "host": { - SchemaProps: spec.SchemaProps{ - Description: "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", - Type: []string{"string"}, - Format: "", - }, - }, - "scheme": { - SchemaProps: spec.SchemaProps{ - Description: "Scheme to use for connecting to the host. Defaults to HTTP.", - Type: []string{"string"}, - Format: "", - }, - }, - "httpHeaders": { - SchemaProps: spec.SchemaProps{ - Description: "Custom headers to set in the request. HTTP allows repeated headers.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.HTTPHeader"), - }, - }, - }, - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.HTTPHeader", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/core/v1.HTTPHeader": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HTTPHeader describes a custom header to be used in HTTP probes", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The header field name", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "The header field value", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "value"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Handler": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Handler defines a specific action that should be taken", - Properties: map[string]spec.Schema{ - "exec": { - SchemaProps: spec.SchemaProps{ - Description: "One and only one of the following should be specified. Exec specifies the action to take.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), - }, - }, - "httpGet": { - SchemaProps: spec.SchemaProps{ - Description: "HTTPGet specifies the http request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), - }, - }, - "tcpSocket": { - SchemaProps: spec.SchemaProps{ - Description: "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, - }, - "k8s.io/api/core/v1.HostAlias": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.", - Properties: map[string]spec.Schema{ - "ip": { - SchemaProps: spec.SchemaProps{ - Description: "IP address of the host file entry.", - Type: []string{"string"}, - Format: "", - }, - }, - "hostnames": { - SchemaProps: spec.SchemaProps{ - Description: "Hostnames for the above IP address.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.HostPathVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"path"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "targetPortal": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", - Type: []string{"string"}, - Format: "", - }, - }, - "iqn": { - SchemaProps: spec.SchemaProps{ - Description: "Target iSCSI Qualified Name.", - Type: []string{"string"}, - Format: "", - }, - }, - "lun": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Target Lun number.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "iscsiInterface": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "portals": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "chapAuthDiscovery": { - SchemaProps: spec.SchemaProps{ - Description: "whether support iSCSI Discovery CHAP authentication", - Type: []string{"boolean"}, - Format: "", - }, - }, - "chapAuthSession": { - SchemaProps: spec.SchemaProps{ - Description: "whether support iSCSI Session CHAP authentication", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "CHAP Secret for iSCSI target and initiator authentication", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "initiatorName": { - SchemaProps: spec.SchemaProps{ - Description: "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"targetPortal", "iqn", "lun"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - }, - "k8s.io/api/core/v1.ISCSIVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "targetPortal": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", - Type: []string{"string"}, - Format: "", - }, - }, - "iqn": { - SchemaProps: spec.SchemaProps{ - Description: "Target iSCSI Qualified Name.", - Type: []string{"string"}, - Format: "", - }, - }, - "lun": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Target Lun number.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "iscsiInterface": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "portals": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "chapAuthDiscovery": { - SchemaProps: spec.SchemaProps{ - Description: "whether support iSCSI Discovery CHAP authentication", - Type: []string{"boolean"}, - Format: "", - }, - }, - "chapAuthSession": { - SchemaProps: spec.SchemaProps{ - Description: "whether support iSCSI Session CHAP authentication", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "CHAP Secret for iSCSI target and initiator authentication", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "initiatorName": { - SchemaProps: spec.SchemaProps{ - Description: "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"targetPortal", "iqn", "lun"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.KeyToPath": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Maps a string key to a path within a volume.", - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The key to project.", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", - Type: []string{"string"}, - Format: "", - }, - }, - "mode": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"key", "path"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Lifecycle": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", - Properties: map[string]spec.Schema{ - "postStart": { - SchemaProps: spec.SchemaProps{ - Description: "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - Ref: ref("k8s.io/api/core/v1.Handler"), - }, - }, - "preStop": { - SchemaProps: spec.SchemaProps{ - Description: "PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - Ref: ref("k8s.io/api/core/v1.Handler"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Handler"}, - }, - "k8s.io/api/core/v1.LimitRange": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LimitRange sets resource usage limits for each kind of resource in a Namespace.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.LimitRangeSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LimitRangeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.LimitRangeItem": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of resource that this limit applies to.", - Type: []string{"string"}, - Format: "", - }, - }, - "max": { - SchemaProps: spec.SchemaProps{ - Description: "Max usage constraints on this kind by resource name.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "min": { - SchemaProps: spec.SchemaProps{ - Description: "Min usage constraints on this kind by resource name.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "default": { - SchemaProps: spec.SchemaProps{ - Description: "Default resource requirement limit value by resource name if resource limit is omitted.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "defaultRequest": { - SchemaProps: spec.SchemaProps{ - Description: "DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "maxLimitRequestRatio": { - SchemaProps: spec.SchemaProps{ - Description: "MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.LimitRangeList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LimitRangeList is a list of LimitRange items.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LimitRange"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LimitRange", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.LimitRangeSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LimitRangeSpec defines a min/max usage limit for resources that match on kind.", - Properties: map[string]spec.Schema{ - "limits": { - SchemaProps: spec.SchemaProps{ - Description: "Limits is the list of LimitRangeItem objects that are enforced.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LimitRangeItem"), - }, - }, - }, - }, - }, - }, - Required: []string{"limits"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LimitRangeItem"}, - }, - "k8s.io/api/core/v1.List": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "List holds a list of objects, which may not be known by the server.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of objects", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - }, - "k8s.io/api/core/v1.LoadBalancerIngress": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.", - Properties: map[string]spec.Schema{ - "ip": { - SchemaProps: spec.SchemaProps{ - Description: "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)", - Type: []string{"string"}, - Format: "", - }, - }, - "hostname": { - SchemaProps: spec.SchemaProps{ - Description: "Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.LoadBalancerStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LoadBalancerStatus represents the status of a load-balancer.", - Properties: map[string]spec.Schema{ - "ingress": { - SchemaProps: spec.SchemaProps{ - Description: "Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LoadBalancerIngress"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerIngress"}, - }, - "k8s.io/api/core/v1.LocalObjectReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.LocalVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Local represents directly-attached storage with node affinity (Beta feature)", - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...). Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. Block devices can be represented only by VolumeMode=Block, which also requires the BlockVolume alpha feature gate to be enabled.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"path"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.NFSVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "server": { - SchemaProps: spec.SchemaProps{ - Description: "Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"server", "path"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Namespace": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Namespace provides a scope for Names. Use of multiple namespaces is optional.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.NamespaceSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.NamespaceStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NamespaceSpec", "k8s.io/api/core/v1.NamespaceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.NamespaceList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamespaceList is a list of Namespaces.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Namespace"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Namespace", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.NamespaceSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamespaceSpec describes the attributes on a Namespace.", - Properties: map[string]spec.Schema{ - "finalizers": { - SchemaProps: spec.SchemaProps{ - Description: "Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.NamespaceStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamespaceStatus is information about the current status of a Namespace.", - Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Node": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.NodeSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.NodeStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSpec", "k8s.io/api/core/v1.NodeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.NodeAddress": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeAddress contains information for the node's address.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Node address type, one of Hostname, ExternalIP or InternalIP.", - Type: []string{"string"}, - Format: "", - }, - }, - "address": { - SchemaProps: spec.SchemaProps{ - Description: "The node address.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "address"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.NodeAffinity": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Node affinity is a group of node affinity scheduling rules.", - Properties: map[string]spec.Schema{ - "requiredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - Description: "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), - }, - }, - "preferredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - Description: "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PreferredSchedulingTerm"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/core/v1.PreferredSchedulingTerm"}, - }, - "k8s.io/api/core/v1.NodeCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeCondition contains condition information for a node.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of node condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastHeartbeatTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time we got an update on a given condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transit from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.NodeConfigSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.", - Properties: map[string]spec.Schema{ - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap is a reference to a Node's ConfigMap", - Ref: ref("k8s.io/api/core/v1.ConfigMapNodeConfigSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapNodeConfigSource"}, - }, - "k8s.io/api/core/v1.NodeConfigStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.", - Properties: map[string]spec.Schema{ - "assigned": { - SchemaProps: spec.SchemaProps{ - Description: "Assigned reports the checkpointed config the node will try to use. When Node.Spec.ConfigSource is updated, the node checkpoints the associated config payload to local disk, along with a record indicating intended config. The node refers to this record to choose its config checkpoint, and reports this record in Assigned. Assigned only updates in the status after the record has been checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned config the Active config by loading and validating the checkpointed payload identified by Assigned.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), - }, - }, - "active": { - SchemaProps: spec.SchemaProps{ - Description: "Active reports the checkpointed config the node is actively using. Active will represent either the current version of the Assigned config, or the current LastKnownGood config, depending on whether attempting to use the Assigned config results in an error.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), - }, - }, - "lastKnownGood": { - SchemaProps: spec.SchemaProps{ - Description: "LastKnownGood reports the checkpointed config the node will fall back to when it encounters an error attempting to use the Assigned config. The Assigned config becomes the LastKnownGood config when the node determines that the Assigned config is stable and correct. This is currently implemented as a 10-minute soak period starting when the local record of Assigned config is updated. If the Assigned config is Active at the end of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, because the local default config is always assumed good. You should not make assumptions about the node's method of determining config stability and correctness, as this may change or become configurable in the future.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), - }, - }, - "error": { - SchemaProps: spec.SchemaProps{ - Description: "Error describes any problems reconciling the Spec.ConfigSource to the Active config. Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting to load or validate the Assigned config, etc. Errors may occur at different points while syncing config. Earlier errors (e.g. download or checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error by fixing the config assigned in Spec.ConfigSource. You can find additional information for debugging by searching the error message in the Kubelet log. Error is a human-readable description of the error state; machines can check whether or not Error is empty, but should not rely on the stability of the Error text across Kubelet versions.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource"}, - }, - "k8s.io/api/core/v1.NodeDaemonEndpoints": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeDaemonEndpoints lists ports opened by daemons running on the Node.", - Properties: map[string]spec.Schema{ - "kubeletEndpoint": { - SchemaProps: spec.SchemaProps{ - Description: "Endpoint on which Kubelet is listening.", - Ref: ref("k8s.io/api/core/v1.DaemonEndpoint"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.DaemonEndpoint"}, - }, - "k8s.io/api/core/v1.NodeList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeList is the whole list of all Nodes which have been registered with master.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of nodes", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Node"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Node", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.NodeProxyOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeProxyOptions is the query options to a Node's proxy call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the URL path to use for the current proxy request to node.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.NodeResources": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeResources is an object for conveying resource information about a node. see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.", - Properties: map[string]spec.Schema{ - "Capacity": { - SchemaProps: spec.SchemaProps{ - Description: "Capacity represents the available resources of a node", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - }, - Required: []string{"Capacity"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.NodeSelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", - Properties: map[string]spec.Schema{ - "nodeSelectorTerms": { - SchemaProps: spec.SchemaProps{ - Description: "Required. A list of node selector terms. The terms are ORed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), - }, - }, - }, - }, - }, - }, - Required: []string{"nodeSelectorTerms"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorTerm"}, - }, - "k8s.io/api/core/v1.NodeSelectorRequirement": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The label key that the selector applies to.", - Type: []string{"string"}, - Format: "", - }, - }, - "operator": { - SchemaProps: spec.SchemaProps{ - Description: "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", - Type: []string{"string"}, - Format: "", - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - Description: "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"key", "operator"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.NodeSelectorTerm": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.", - Properties: map[string]spec.Schema{ - "matchExpressions": { - SchemaProps: spec.SchemaProps{ - Description: "A list of node selector requirements by node's labels.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), - }, - }, - }, - }, - }, - "matchFields": { - SchemaProps: spec.SchemaProps{ - Description: "A list of node selector requirements by node's fields.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorRequirement"}, - }, - "k8s.io/api/core/v1.NodeSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeSpec describes the attributes that a node is created with.", - Properties: map[string]spec.Schema{ - "podCIDR": { - SchemaProps: spec.SchemaProps{ - Description: "PodCIDR represents the pod IP range assigned to the node.", - Type: []string{"string"}, - Format: "", - }, - }, - "providerID": { - SchemaProps: spec.SchemaProps{ - Description: "ID of the node assigned by the cloud provider in the format: ://", - Type: []string{"string"}, - Format: "", - }, - }, - "unschedulable": { - SchemaProps: spec.SchemaProps{ - Description: "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration", - Type: []string{"boolean"}, - Format: "", - }, - }, - "taints": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the node's taints.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Taint"), - }, - }, - }, - }, - }, - "configSource": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), - }, - }, - "externalID": { - SchemaProps: spec.SchemaProps{ - Description: "Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource", "k8s.io/api/core/v1.Taint"}, - }, - "k8s.io/api/core/v1.NodeStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeStatus is information about the current status of a node.", - Properties: map[string]spec.Schema{ - "capacity": { - SchemaProps: spec.SchemaProps{ - Description: "Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "allocatable": { - SchemaProps: spec.SchemaProps{ - Description: "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.", - Type: []string{"string"}, - Format: "", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeCondition"), - }, - }, - }, - }, - }, - "addresses": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeAddress"), - }, - }, - }, - }, - }, - "daemonEndpoints": { - SchemaProps: spec.SchemaProps{ - Description: "Endpoints of daemons running on the Node.", - Ref: ref("k8s.io/api/core/v1.NodeDaemonEndpoints"), - }, - }, - "nodeInfo": { - SchemaProps: spec.SchemaProps{ - Description: "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", - Ref: ref("k8s.io/api/core/v1.NodeSystemInfo"), - }, - }, - "images": { - SchemaProps: spec.SchemaProps{ - Description: "List of container images on this node", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerImage"), - }, - }, - }, - }, - }, - "volumesInUse": { - SchemaProps: spec.SchemaProps{ - Description: "List of attachable volumes in use (mounted) by the node.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "volumesAttached": { - SchemaProps: spec.SchemaProps{ - Description: "List of volumes that are attached to the node.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.AttachedVolume"), - }, - }, - }, - }, - }, - "config": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the config assigned to the node via the dynamic Kubelet config feature.", - Ref: ref("k8s.io/api/core/v1.NodeConfigStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AttachedVolume", "k8s.io/api/core/v1.ContainerImage", "k8s.io/api/core/v1.NodeAddress", "k8s.io/api/core/v1.NodeCondition", "k8s.io/api/core/v1.NodeConfigStatus", "k8s.io/api/core/v1.NodeDaemonEndpoints", "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.NodeSystemInfo": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", - Properties: map[string]spec.Schema{ - "machineID": { - SchemaProps: spec.SchemaProps{ - Description: "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", - Type: []string{"string"}, - Format: "", - }, - }, - "systemUUID": { - SchemaProps: spec.SchemaProps{ - Description: "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html", - Type: []string{"string"}, - Format: "", - }, - }, - "bootID": { - SchemaProps: spec.SchemaProps{ - Description: "Boot ID reported by the node.", - Type: []string{"string"}, - Format: "", - }, - }, - "kernelVersion": { - SchemaProps: spec.SchemaProps{ - Description: "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", - Type: []string{"string"}, - Format: "", - }, - }, - "osImage": { - SchemaProps: spec.SchemaProps{ - Description: "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", - Type: []string{"string"}, - Format: "", - }, - }, - "containerRuntimeVersion": { - SchemaProps: spec.SchemaProps{ - Description: "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).", - Type: []string{"string"}, - Format: "", - }, - }, - "kubeletVersion": { - SchemaProps: spec.SchemaProps{ - Description: "Kubelet Version reported by the node.", - Type: []string{"string"}, - Format: "", - }, - }, - "kubeProxyVersion": { - SchemaProps: spec.SchemaProps{ - Description: "KubeProxy Version reported by the node.", - Type: []string{"string"}, - Format: "", - }, - }, - "operatingSystem": { - SchemaProps: spec.SchemaProps{ - Description: "The Operating System reported by the node", - Type: []string{"string"}, - Format: "", - }, - }, - "architecture": { - SchemaProps: spec.SchemaProps{ - Description: "The Architecture reported by the node", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"machineID", "systemUUID", "bootID", "kernelVersion", "osImage", "containerRuntimeVersion", "kubeletVersion", "kubeProxyVersion", "operatingSystem", "architecture"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ObjectFieldSelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectFieldSelector selects an APIVersioned field of an object.", - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldPath": { - SchemaProps: spec.SchemaProps{ - Description: "Path of the field to select in the specified API version.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"fieldPath"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ObjectReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "API version of the referent.", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldPath": { - SchemaProps: spec.SchemaProps{ - Description: "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PersistentVolume": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec", "k8s.io/api/core/v1.PersistentVolumeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.PersistentVolumeClaim": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaim is a user's request for and claim to a persistent volume", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/api/core/v1.PersistentVolumeClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.PersistentVolumeClaimCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimCondition contails details about state of pvc", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "lastProbeTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human-readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.PersistentVolumeClaimList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.PersistentVolumeClaimSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimSpec describes the pkg attributes of storage devices and allows a Source for provider-specific attributes", - Properties: map[string]spec.Schema{ - "accessModes": { - SchemaProps: spec.SchemaProps{ - Description: "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "A label query over volumes to consider for binding.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), - }, - }, - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeName is the binding reference to the PersistentVolume backing this claim.", - Type: []string{"string"}, - Format: "", - }, - }, - "storageClassName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeMode": { - SchemaProps: spec.SchemaProps{ - Description: "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/core/v1.PersistentVolumeClaimStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", - Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "Phase represents the current phase of PersistentVolumeClaim.", - Type: []string{"string"}, - Format: "", - }, - }, - "accessModes": { - SchemaProps: spec.SchemaProps{ - Description: "AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "capacity": { - SchemaProps: spec.SchemaProps{ - Description: "Represents the actual resources of the underlying volume.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimCondition"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimCondition", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).", - Properties: map[string]spec.Schema{ - "claimName": { - SchemaProps: spec.SchemaProps{ - Description: "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Will force the ReadOnly setting in VolumeMounts. Default false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"claimName"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PersistentVolumeList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeList is a list of PersistentVolume items.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolume"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolume", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.PersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeSource is similar to VolumeSource but meant for the administrator who creates PVs. Exactly one of its members must be set.", - Properties: map[string]spec.Schema{ - "gcePersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), - }, - }, - "awsElasticBlockStore": { - SchemaProps: spec.SchemaProps{ - Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), - }, - }, - "hostPath": { - SchemaProps: spec.SchemaProps{ - Description: "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), - }, - }, - "glusterfs": { - SchemaProps: spec.SchemaProps{ - Description: "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), - }, - }, - "nfs": { - SchemaProps: spec.SchemaProps{ - Description: "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), - }, - }, - "rbd": { - SchemaProps: spec.SchemaProps{ - Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), - }, - }, - "iscsi": { - SchemaProps: spec.SchemaProps{ - Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", - Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), - }, - }, - "cinder": { - SchemaProps: spec.SchemaProps{ - Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), - }, - }, - "cephfs": { - SchemaProps: spec.SchemaProps{ - Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), - }, - }, - "fc": { - SchemaProps: spec.SchemaProps{ - Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), - }, - }, - "flocker": { - SchemaProps: spec.SchemaProps{ - Description: "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), - }, - }, - "flexVolume": { - SchemaProps: spec.SchemaProps{ - Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), - }, - }, - "azureFile": { - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), - }, - }, - "vsphereVolume": { - SchemaProps: spec.SchemaProps{ - Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), - }, - }, - "quobyte": { - SchemaProps: spec.SchemaProps{ - Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), - }, - }, - "azureDisk": { - SchemaProps: spec.SchemaProps{ - Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), - }, - }, - "photonPersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), - }, - }, - "portworxVolume": { - SchemaProps: spec.SchemaProps{ - Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), - }, - }, - "scaleIO": { - SchemaProps: spec.SchemaProps{ - Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), - }, - }, - "local": { - SchemaProps: spec.SchemaProps{ - Description: "Local represents directly-attached storage with node affinity", - Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), - }, - }, - "storageos": { - SchemaProps: spec.SchemaProps{ - Description: "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md", - Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), - }, - }, - "csi": { - SchemaProps: spec.SchemaProps{ - Description: "CSI represents storage that handled by an external CSI driver (Beta feature).", - Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, - }, - "k8s.io/api/core/v1.PersistentVolumeSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeSpec is the specification of a persistent volume.", - Properties: map[string]spec.Schema{ - "capacity": { - SchemaProps: spec.SchemaProps{ - Description: "A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "gcePersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), - }, - }, - "awsElasticBlockStore": { - SchemaProps: spec.SchemaProps{ - Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), - }, - }, - "hostPath": { - SchemaProps: spec.SchemaProps{ - Description: "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), - }, - }, - "glusterfs": { - SchemaProps: spec.SchemaProps{ - Description: "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), - }, - }, - "nfs": { - SchemaProps: spec.SchemaProps{ - Description: "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), - }, - }, - "rbd": { - SchemaProps: spec.SchemaProps{ - Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), - }, - }, - "iscsi": { - SchemaProps: spec.SchemaProps{ - Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", - Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), - }, - }, - "cinder": { - SchemaProps: spec.SchemaProps{ - Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), - }, - }, - "cephfs": { - SchemaProps: spec.SchemaProps{ - Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), - }, - }, - "fc": { - SchemaProps: spec.SchemaProps{ - Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), - }, - }, - "flocker": { - SchemaProps: spec.SchemaProps{ - Description: "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), - }, - }, - "flexVolume": { - SchemaProps: spec.SchemaProps{ - Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), - }, - }, - "azureFile": { - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), - }, - }, - "vsphereVolume": { - SchemaProps: spec.SchemaProps{ - Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), - }, - }, - "quobyte": { - SchemaProps: spec.SchemaProps{ - Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), - }, - }, - "azureDisk": { - SchemaProps: spec.SchemaProps{ - Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), - }, - }, - "photonPersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), - }, - }, - "portworxVolume": { - SchemaProps: spec.SchemaProps{ - Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), - }, - }, - "scaleIO": { - SchemaProps: spec.SchemaProps{ - Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), - }, - }, - "local": { - SchemaProps: spec.SchemaProps{ - Description: "Local represents directly-attached storage with node affinity", - Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), - }, - }, - "storageos": { - SchemaProps: spec.SchemaProps{ - Description: "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md", - Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), - }, - }, - "csi": { - SchemaProps: spec.SchemaProps{ - Description: "CSI represents storage that handled by an external CSI driver (Beta feature).", - Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), - }, - }, - "accessModes": { - SchemaProps: spec.SchemaProps{ - Description: "AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "claimRef": { - SchemaProps: spec.SchemaProps{ - Description: "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "persistentVolumeReclaimPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "What happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", - Type: []string{"string"}, - Format: "", - }, - }, - "storageClassName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", - Type: []string{"string"}, - Format: "", - }, - }, - "mountOptions": { - SchemaProps: spec.SchemaProps{ - Description: "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "volumeMode": { - SchemaProps: spec.SchemaProps{ - Description: "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec. This is an alpha feature and may change in the future.", - Type: []string{"string"}, - Format: "", - }, - }, - "nodeAffinity": { - SchemaProps: spec.SchemaProps{ - Description: "NodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.", - Ref: ref("k8s.io/api/core/v1.VolumeNodeAffinity"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VolumeNodeAffinity", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.PersistentVolumeStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeStatus is the current status of a persistent volume.", - Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human-readable message indicating details about why the volume is in this state.", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Photon Controller persistent disk resource.", - Properties: map[string]spec.Schema{ - "pdID": { - SchemaProps: spec.SchemaProps{ - Description: "ID that identifies Photon Controller persistent disk", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"pdID"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Pod": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.PodSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.PodStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodSpec", "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.PodAffinity": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Pod affinity is a group of inter pod affinity scheduling rules.", - Properties: map[string]spec.Schema{ - "requiredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - Description: "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), - }, - }, - }, - }, - }, - "preferredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - Description: "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, - }, - "k8s.io/api/core/v1.PodAffinityTerm": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running", - Properties: map[string]spec.Schema{ - "labelSelector": { - SchemaProps: spec.SchemaProps{ - Description: "A label query over a set of resources, in this case pods.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "namespaces": { - SchemaProps: spec.SchemaProps{ - Description: "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "topologyKey": { - SchemaProps: spec.SchemaProps{ - Description: "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"topologyKey"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/core/v1.PodAntiAffinity": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", - Properties: map[string]spec.Schema{ - "requiredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - Description: "If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), - }, - }, - }, - }, - }, - "preferredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - Description: "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, - }, - "k8s.io/api/core/v1.PodAttachOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodAttachOptions is the query options to a Pod's remote attach call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "stdin": { - SchemaProps: spec.SchemaProps{ - Description: "Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stdout": { - SchemaProps: spec.SchemaProps{ - Description: "Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stderr": { - SchemaProps: spec.SchemaProps{ - Description: "Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tty": { - SchemaProps: spec.SchemaProps{ - Description: "TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "container": { - SchemaProps: spec.SchemaProps{ - Description: "The container in which to execute the command. Defaults to only container if there is only one container in the pod.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PodCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodCondition contains details for the current condition of this pod.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - Type: []string{"string"}, - Format: "", - }, - }, - "lastProbeTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "Unique, one-word, CamelCase reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human-readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.PodDNSConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.", - Properties: map[string]spec.Schema{ - "nameservers": { - SchemaProps: spec.SchemaProps{ - Description: "A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "searches": { - SchemaProps: spec.SchemaProps{ - Description: "A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "options": { - SchemaProps: spec.SchemaProps{ - Description: "A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodDNSConfigOption"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodDNSConfigOption"}, - }, - "k8s.io/api/core/v1.PodDNSConfigOption": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodDNSConfigOption defines DNS resolver options of a pod.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Required.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PodExecOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodExecOptions is the query options to a Pod's remote exec call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "stdin": { - SchemaProps: spec.SchemaProps{ - Description: "Redirect the standard input stream of the pod for this call. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stdout": { - SchemaProps: spec.SchemaProps{ - Description: "Redirect the standard output stream of the pod for this call. Defaults to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stderr": { - SchemaProps: spec.SchemaProps{ - Description: "Redirect the standard error stream of the pod for this call. Defaults to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tty": { - SchemaProps: spec.SchemaProps{ - Description: "TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "container": { - SchemaProps: spec.SchemaProps{ - Description: "Container in which to execute the command. Defaults to only container if there is only one container in the pod.", - Type: []string{"string"}, - Format: "", - }, - }, - "command": { - SchemaProps: spec.SchemaProps{ - Description: "Command is the remote command to execute. argv array. Not executed within a shell.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"command"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PodList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodList is a list of Pods.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Pod"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Pod", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.PodLogOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodLogOptions is the query options for a Pod's logs REST call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "container": { - SchemaProps: spec.SchemaProps{ - Description: "The container for which to stream logs. Defaults to only container if there is one container in the pod.", - Type: []string{"string"}, - Format: "", - }, - }, - "follow": { - SchemaProps: spec.SchemaProps{ - Description: "Follow the log stream of the pod. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "previous": { - SchemaProps: spec.SchemaProps{ - Description: "Return previous terminated container logs. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "sinceSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "sinceTime": { - SchemaProps: spec.SchemaProps{ - Description: "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "timestamps": { - SchemaProps: spec.SchemaProps{ - Description: "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tailLines": { - SchemaProps: spec.SchemaProps{ - Description: "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "limitBytes": { - SchemaProps: spec.SchemaProps{ - Description: "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.PodPortForwardOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodPortForwardOptions is the query options to a Pod's port forward call when using WebSockets. The `port` query parameter must specify the port or ports (comma separated) to forward over. Port forwarding over SPDY does not use these options. It requires the port to be passed in the `port` header as part of request.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "List of ports to forward Required when using WebSockets", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PodProxyOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodProxyOptions is the query options to a Pod's proxy call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the URL path to use for the current proxy request to pod.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PodReadinessGate": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodReadinessGate contains the reference to a pod condition", - Properties: map[string]spec.Schema{ - "conditionType": { - SchemaProps: spec.SchemaProps{ - Description: "ConditionType refers to a condition in the pod's condition list with matching type.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"conditionType"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PodSecurityContext": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodSecurityContext holds pod-level security attributes and pkg container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.", - Properties: map[string]spec.Schema{ - "seLinuxOptions": { - SchemaProps: spec.SchemaProps{ - Description: "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), - }, - }, - "runAsUser": { - SchemaProps: spec.SchemaProps{ - Description: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "runAsGroup": { - SchemaProps: spec.SchemaProps{ - Description: "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "runAsNonRoot": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "supplementalGroups": { - SchemaProps: spec.SchemaProps{ - Description: "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - "fsGroup": { - SchemaProps: spec.SchemaProps{ - Description: "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "sysctls": { - SchemaProps: spec.SchemaProps{ - Description: "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Sysctl"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.Sysctl"}, - }, - "k8s.io/api/core/v1.PodSignature": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Describes the class of pods that should avoid this node. Exactly one field should be set.", - Properties: map[string]spec.Schema{ - "podController": { - SchemaProps: spec.SchemaProps{ - Description: "Reference to controller whose pods should avoid this node.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"}, - }, - "k8s.io/api/core/v1.PodSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodSpec is a description of a pod.", - Properties: map[string]spec.Schema{ - "volumes": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge,retainKeys", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Volume"), - }, - }, - }, - }, - }, - "initContainers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Container"), - }, - }, - }, - }, - }, - "containers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Container"), - }, - }, - }, - }, - }, - "restartPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", - Type: []string{"string"}, - Format: "", - }, - }, - "terminationGracePeriodSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "activeDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "dnsPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", - Type: []string{"string"}, - Format: "", - }, - }, - "nodeSelector": { - SchemaProps: spec.SchemaProps{ - Description: "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "serviceAccountName": { - SchemaProps: spec.SchemaProps{ - Description: "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", - Type: []string{"string"}, - Format: "", - }, - }, - "serviceAccount": { - SchemaProps: spec.SchemaProps{ - Description: "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", - Type: []string{"string"}, - Format: "", - }, - }, - "automountServiceAccountToken": { - SchemaProps: spec.SchemaProps{ - Description: "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "nodeName": { - SchemaProps: spec.SchemaProps{ - Description: "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.", - Type: []string{"string"}, - Format: "", - }, - }, - "hostNetwork": { - SchemaProps: spec.SchemaProps{ - Description: "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "hostPID": { - SchemaProps: spec.SchemaProps{ - Description: "Use the host's pid namespace. Optional: Default to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "hostIPC": { - SchemaProps: spec.SchemaProps{ - Description: "Use the host's ipc namespace. Optional: Default to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "shareProcessNamespace": { - SchemaProps: spec.SchemaProps{ - Description: "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. This field is alpha-level and is honored only by servers that enable the PodShareProcessNamespace feature.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "securityContext": { - SchemaProps: spec.SchemaProps{ - Description: "SecurityContext holds pod-level security attributes and pkg container settings. Optional: Defaults to empty. See type description for default values of each field.", - Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), - }, - }, - "imagePullSecrets": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - }, - }, - "hostname": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", - Type: []string{"string"}, - Format: "", - }, - }, - "subdomain": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", - Type: []string{"string"}, - Format: "", - }, - }, - "affinity": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the pod's scheduling constraints", - Ref: ref("k8s.io/api/core/v1.Affinity"), - }, - }, - "schedulerName": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", - Type: []string{"string"}, - Format: "", - }, - }, - "tolerations": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the pod's tolerations.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Toleration"), - }, - }, - }, - }, - }, - "hostAliases": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "ip", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.HostAlias"), - }, - }, - }, - }, - }, - "priorityClassName": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.", - Type: []string{"string"}, - Format: "", - }, - }, - "priority": { - SchemaProps: spec.SchemaProps{ - Description: "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "dnsConfig": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", - Ref: ref("k8s.io/api/core/v1.PodDNSConfig"), - }, - }, - "readinessGates": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://github.com/kubernetes/community/blob/master/keps/sig-network/0007-pod-ready%2B%2B.md", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodReadinessGate"), - }, - }, - }, - }, - }, - }, - Required: []string{"containers"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.HostAlias", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodReadinessGate", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume"}, - }, - "k8s.io/api/core/v1.PodStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.", - Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values:\n\nPending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase", - Type: []string{"string"}, - Format: "", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodCondition"), - }, - }, - }, - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about why the pod is in this condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'", - Type: []string{"string"}, - Format: "", - }, - }, - "nominatedNodeName": { - SchemaProps: spec.SchemaProps{ - Description: "nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled.", - Type: []string{"string"}, - Format: "", - }, - }, - "hostIP": { - SchemaProps: spec.SchemaProps{ - Description: "IP address of the host to which the pod is assigned. Empty if not yet scheduled.", - Type: []string{"string"}, - Format: "", - }, - }, - "podIP": { - SchemaProps: spec.SchemaProps{ - Description: "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", - Type: []string{"string"}, - Format: "", - }, - }, - "startTime": { - SchemaProps: spec.SchemaProps{ - Description: "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "initContainerStatuses": { - SchemaProps: spec.SchemaProps{ - Description: "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), - }, - }, - }, - }, - }, - "containerStatuses": { - SchemaProps: spec.SchemaProps{ - Description: "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), - }, - }, - }, - }, - }, - "qosClass": { - SchemaProps: spec.SchemaProps{ - Description: "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStatus", "k8s.io/api/core/v1.PodCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.PodStatusResult": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.PodStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.PodTemplate": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodTemplate describes a template for creating copies of a predefined pod.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.PodTemplateList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodTemplateList is a list of PodTemplates.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of pod templates", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodTemplate"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.PodTemplateSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodTemplateSpec describes the data a pod should have when created from a template", - Properties: map[string]spec.Schema{ - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.PodSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.PortworxVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PortworxVolumeSource represents a Portworx volume resource.", - Properties: map[string]spec.Schema{ - "volumeID": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeID uniquely identifies a Portworx volume", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"volumeID"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PreferAvoidPodsEntry": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Describes a class of pods that should avoid this node.", - Properties: map[string]spec.Schema{ - "podSignature": { - SchemaProps: spec.SchemaProps{ - Description: "The class of pods.", - Ref: ref("k8s.io/api/core/v1.PodSignature"), - }, - }, - "evictionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Time at which this entry was added to the list.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason why this entry was added to the list.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human readable message indicating why this entry was added to the list.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"podSignature"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodSignature", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.PreferredSchedulingTerm": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", - Properties: map[string]spec.Schema{ - "weight": { - SchemaProps: spec.SchemaProps{ - Description: "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "preference": { - SchemaProps: spec.SchemaProps{ - Description: "A node selector term, associated with the corresponding weight.", - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), - }, - }, - }, - Required: []string{"weight", "preference"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorTerm"}, - }, - "k8s.io/api/core/v1.Probe": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", - Properties: map[string]spec.Schema{ - "exec": { - SchemaProps: spec.SchemaProps{ - Description: "One and only one of the following should be specified. Exec specifies the action to take.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), - }, - }, - "httpGet": { - SchemaProps: spec.SchemaProps{ - Description: "HTTPGet specifies the http request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), - }, - }, - "tcpSocket": { - SchemaProps: spec.SchemaProps{ - Description: "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), - }, - }, - "initialDelaySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "timeoutSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "periodSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "successThreshold": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "failureThreshold": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, - }, - "k8s.io/api/core/v1.ProjectedVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a projected volume source", - Properties: map[string]spec.Schema{ - "sources": { - SchemaProps: spec.SchemaProps{ - Description: "list of volume projections", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeProjection"), - }, - }, - }, - }, - }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - Description: "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"sources"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.VolumeProjection"}, - }, - "k8s.io/api/core/v1.QuobyteVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "registry": { - SchemaProps: spec.SchemaProps{ - Description: "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes", - Type: []string{"string"}, - Format: "", - }, - }, - "volume": { - SchemaProps: spec.SchemaProps{ - Description: "Volume is a string that references an already created Quobyte volume by name.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "User to map volume access to Defaults to serivceaccount user", - Type: []string{"string"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "Group to map volume access to Default is no group", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"registry", "volume"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.RBDPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", - Type: []string{"string"}, - Format: "", - }, - }, - "pool": { - SchemaProps: spec.SchemaProps{ - Description: "The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "keyring": { - SchemaProps: spec.SchemaProps{ - Description: "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"monitors", "image"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - }, - "k8s.io/api/core/v1.RBDVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", - Type: []string{"string"}, - Format: "", - }, - }, - "pool": { - SchemaProps: spec.SchemaProps{ - Description: "The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "keyring": { - SchemaProps: spec.SchemaProps{ - Description: "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"monitors", "image"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.RangeAllocation": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RangeAllocation is not a public type.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "range": { - SchemaProps: spec.SchemaProps{ - Description: "Range is string that identifies the range represented by 'data'.", - Type: []string{"string"}, - Format: "", - }, - }, - "data": { - SchemaProps: spec.SchemaProps{ - Description: "Data is a bit array containing all allocated addresses in the previous segment.", - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - Required: []string{"range", "data"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ReplicationController": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationController represents the configuration of a replication controller.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.ReplicationControllerSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.ReplicationControllerStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationControllerSpec", "k8s.io/api/core/v1.ReplicationControllerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ReplicationControllerCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerCondition describes the state of a replication controller at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of replication controller condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.ReplicationControllerList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerList is a collection of replication controllers.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ReplicationController"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationController", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.ReplicationControllerSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerSpec is the specification of a replication controller.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec"}, - }, - "k8s.io/api/core/v1.ReplicationControllerStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerStatus represents the current status of a replication controller.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "fullyLabeledReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of pods that have labels matching the labels of the pod template of the replication controller.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of ready replicas for this replication controller.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "availableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of available replicas (ready for at least minReadySeconds) for this replication controller.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "ObservedGeneration reflects the generation of the most recently observed replication controller.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a replication controller's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ReplicationControllerCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationControllerCondition"}, - }, - "k8s.io/api/core/v1.ResourceFieldSelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceFieldSelector represents container resources (cpu, memory) and their output format", - Properties: map[string]spec.Schema{ - "containerName": { - SchemaProps: spec.SchemaProps{ - Description: "Container name: required for volumes, optional for env vars", - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Description: "Required: resource to select", - Type: []string{"string"}, - Format: "", - }, - }, - "divisor": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the output format of the exposed resources, defaults to \"1\"", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"resource"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.ResourceQuota": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuota sets aggregate quota restrictions enforced per namespace", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.ResourceQuotaSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.ResourceQuotaStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ResourceQuotaSpec", "k8s.io/api/core/v1.ResourceQuotaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ResourceQuotaList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaList is a list of ResourceQuota items.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ResourceQuota"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ResourceQuota", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.ResourceQuotaSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.", - Properties: map[string]spec.Schema{ - "hard": { - SchemaProps: spec.SchemaProps{ - Description: "hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "scopes": { - SchemaProps: spec.SchemaProps{ - Description: "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "scopeSelector": { - SchemaProps: spec.SchemaProps{ - Description: "scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.", - Ref: ref("k8s.io/api/core/v1.ScopeSelector"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ScopeSelector", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.ResourceQuotaStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaStatus defines the enforced hard limits and observed use.", - Properties: map[string]spec.Schema{ - "hard": { - SchemaProps: spec.SchemaProps{ - Description: "Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "used": { - SchemaProps: spec.SchemaProps{ - Description: "Used is the current observed total usage of the resource in the namespace.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.ResourceRequirements": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceRequirements describes the compute resource requirements.", - Properties: map[string]spec.Schema{ - "limits": { - SchemaProps: spec.SchemaProps{ - Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "requests": { - SchemaProps: spec.SchemaProps{ - Description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.SELinuxOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SELinuxOptions are the labels to be applied to the container", - Properties: map[string]spec.Schema{ - "user": { - SchemaProps: spec.SchemaProps{ - Description: "User is a SELinux user label that applies to the container.", - Type: []string{"string"}, - Format: "", - }, - }, - "role": { - SchemaProps: spec.SchemaProps{ - Description: "Role is a SELinux role label that applies to the container.", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type is a SELinux type label that applies to the container.", - Type: []string{"string"}, - Format: "", - }, - }, - "level": { - SchemaProps: spec.SchemaProps{ - Description: "Level is SELinux level label that applies to the container.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume", - Properties: map[string]spec.Schema{ - "gateway": { - SchemaProps: spec.SchemaProps{ - Description: "The host address of the ScaleIO API Gateway.", - Type: []string{"string"}, - Format: "", - }, - }, - "system": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the storage system as configured in ScaleIO.", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "sslEnabled": { - SchemaProps: spec.SchemaProps{ - Description: "Flag to enable/disable SSL communication with Gateway, default false", - Type: []string{"boolean"}, - Format: "", - }, - }, - "protectionDomain": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the ScaleIO Protection Domain for the configured storage.", - Type: []string{"string"}, - Format: "", - }, - }, - "storagePool": { - SchemaProps: spec.SchemaProps{ - Description: "The ScaleIO Storage Pool associated with the protection domain.", - Type: []string{"string"}, - Format: "", - }, - }, - "storageMode": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "The name of a volume already created in the ScaleIO system that is associated with this volume source.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"gateway", "system", "secretRef"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - }, - "k8s.io/api/core/v1.ScaleIOVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ScaleIOVolumeSource represents a persistent ScaleIO volume", - Properties: map[string]spec.Schema{ - "gateway": { - SchemaProps: spec.SchemaProps{ - Description: "The host address of the ScaleIO API Gateway.", - Type: []string{"string"}, - Format: "", - }, - }, - "system": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the storage system as configured in ScaleIO.", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "sslEnabled": { - SchemaProps: spec.SchemaProps{ - Description: "Flag to enable/disable SSL communication with Gateway, default false", - Type: []string{"boolean"}, - Format: "", - }, - }, - "protectionDomain": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the ScaleIO Protection Domain for the configured storage.", - Type: []string{"string"}, - Format: "", - }, - }, - "storagePool": { - SchemaProps: spec.SchemaProps{ - Description: "The ScaleIO Storage Pool associated with the protection domain.", - Type: []string{"string"}, - Format: "", - }, - }, - "storageMode": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "The name of a volume already created in the ScaleIO system that is associated with this volume source.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"gateway", "system", "secretRef"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.ScopeSelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.", - Properties: map[string]spec.Schema{ - "matchExpressions": { - SchemaProps: spec.SchemaProps{ - Description: "A list of scope selector requirements by scope of the resources.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ScopedResourceSelectorRequirement"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ScopedResourceSelectorRequirement"}, - }, - "k8s.io/api/core/v1.ScopedResourceSelectorRequirement": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.", - Properties: map[string]spec.Schema{ - "scopeName": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the scope that the selector applies to.", - Type: []string{"string"}, - Format: "", - }, - }, - "operator": { - SchemaProps: spec.SchemaProps{ - Description: "Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.", - Type: []string{"string"}, - Format: "", - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - Description: "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"scopeName", "operator"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Secret": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "data": { - SchemaProps: spec.SchemaProps{ - Description: "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - }, - }, - "stringData": { - SchemaProps: spec.SchemaProps{ - Description: "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Used to facilitate programmatic handling of secret data.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.SecretEnvSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the Secret must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.SecretKeySelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecretKeySelector selects a key of a Secret.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The key of the secret to select from. Must be a valid secret key.", - Type: []string{"string"}, - Format: "", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the Secret or it's key must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"key"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.SecretList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecretList is a list of Secret.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Secret"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Secret", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.SecretProjection": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the Secret or its key must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, - }, - "k8s.io/api/core/v1.SecretReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is unique within a namespace to reference a secret resource.", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace defines the space within which the secret name must be unique.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.SecretVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, - }, - }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the Secret or it's keys must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, - }, - "k8s.io/api/core/v1.SecurityContext": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.", - Properties: map[string]spec.Schema{ - "capabilities": { - SchemaProps: spec.SchemaProps{ - Description: "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.", - Ref: ref("k8s.io/api/core/v1.Capabilities"), - }, - }, - "privileged": { - SchemaProps: spec.SchemaProps{ - Description: "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "seLinuxOptions": { - SchemaProps: spec.SchemaProps{ - Description: "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), - }, - }, - "runAsUser": { - SchemaProps: spec.SchemaProps{ - Description: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "runAsGroup": { - SchemaProps: spec.SchemaProps{ - Description: "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "runAsNonRoot": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "readOnlyRootFilesystem": { - SchemaProps: spec.SchemaProps{ - Description: "Whether this container has a read-only root filesystem. Default is false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "allowPrivilegeEscalation": { - SchemaProps: spec.SchemaProps{ - Description: "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Capabilities", "k8s.io/api/core/v1.SELinuxOptions"}, - }, - "k8s.io/api/core/v1.SerializedReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SerializedReference is a reference to serialized object.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "reference": { - SchemaProps: spec.SchemaProps{ - Description: "The reference to an object in the system.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, - }, - "k8s.io/api/core/v1.Service": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.ServiceSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.ServiceStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ServiceSpec", "k8s.io/api/core/v1.ServiceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ServiceAccount": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "secrets": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - }, - }, - "imagePullSecrets": { - SchemaProps: spec.SchemaProps{ - Description: "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - }, - }, - "automountServiceAccountToken": { - SchemaProps: spec.SchemaProps{ - Description: "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ServiceAccountList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceAccountList is a list of ServiceAccount objects", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ServiceAccount"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ServiceAccount", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.ServiceAccountTokenProjection": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).", - Properties: map[string]spec.Schema{ - "audience": { - SchemaProps: spec.SchemaProps{ - Description: "Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.", - Type: []string{"string"}, - Format: "", - }, - }, - "expirationSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the path relative to the mount point of the file to project the token into.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"path"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ServiceList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceList holds a list of services.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of services", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Service"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Service", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.ServicePort": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServicePort contains information on service's port.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service.", - Type: []string{"string"}, - Format: "", - }, - }, - "protocol": { - SchemaProps: spec.SchemaProps{ - Description: "The IP protocol for this port. Supports \"TCP\" and \"UDP\". Default is TCP.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "The port that will be exposed by this service.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "targetPort": { - SchemaProps: spec.SchemaProps{ - Description: "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "nodePort": { - SchemaProps: spec.SchemaProps{ - Description: "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/core/v1.ServiceProxyOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceProxyOptions is the query options to a Service's proxy call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ServiceSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceSpec describes the attributes that a user creates on a service.", - Properties: map[string]spec.Schema{ - "ports": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "port", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ServicePort"), - }, - }, - }, - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "clusterIP": { - SchemaProps: spec.SchemaProps{ - Description: "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types", - Type: []string{"string"}, - Format: "", - }, - }, - "externalIPs": { - SchemaProps: spec.SchemaProps{ - Description: "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A pkg example is external load-balancers that are not part of the Kubernetes system.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "sessionAffinity": { - SchemaProps: spec.SchemaProps{ - Description: "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", - Type: []string{"string"}, - Format: "", - }, - }, - "loadBalancerIP": { - SchemaProps: spec.SchemaProps{ - Description: "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.", - Type: []string{"string"}, - Format: "", - }, - }, - "loadBalancerSourceRanges": { - SchemaProps: spec.SchemaProps{ - Description: "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "externalName": { - SchemaProps: spec.SchemaProps{ - Description: "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName.", - Type: []string{"string"}, - Format: "", - }, - }, - "externalTrafficPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.", - Type: []string{"string"}, - Format: "", - }, - }, - "healthCheckNodePort": { - SchemaProps: spec.SchemaProps{ - Description: "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "publishNotReadyAddresses": { - SchemaProps: spec.SchemaProps{ - Description: "publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "sessionAffinityConfig": { - SchemaProps: spec.SchemaProps{ - Description: "sessionAffinityConfig contains the configurations of session affinity.", - Ref: ref("k8s.io/api/core/v1.SessionAffinityConfig"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ServicePort", "k8s.io/api/core/v1.SessionAffinityConfig"}, - }, - "k8s.io/api/core/v1.ServiceStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceStatus represents the current status of a service.", - Properties: map[string]spec.Schema{ - "loadBalancer": { - SchemaProps: spec.SchemaProps{ - Description: "LoadBalancer contains the current status of the load-balancer, if one is present.", - Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerStatus"}, - }, - "k8s.io/api/core/v1.SessionAffinityConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SessionAffinityConfig represents the configurations of session affinity.", - Properties: map[string]spec.Schema{ - "clientIP": { - SchemaProps: spec.SchemaProps{ - Description: "clientIP contains the configurations of Client IP based session affinity.", - Ref: ref("k8s.io/api/core/v1.ClientIPConfig"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ClientIPConfig"}, - }, - "k8s.io/api/core/v1.StorageOSPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a StorageOS persistent volume resource.", - Properties: map[string]spec.Schema{ - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeNamespace": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, - }, - "k8s.io/api/core/v1.StorageOSVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a StorageOS persistent volume resource.", - Properties: map[string]spec.Schema{ - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeNamespace": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.Sysctl": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Sysctl defines a kernel parameter to be set", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of a property to set", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value of a property to set", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "value"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.TCPSocketAction": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TCPSocketAction describes an action based on opening a socket", - Properties: map[string]spec.Schema{ - "port": { - SchemaProps: spec.SchemaProps{ - Description: "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "host": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Host name to connect to, defaults to the pod IP.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/core/v1.Taint": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.", - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "Required. The taint key to be applied to a node.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Required. The taint value corresponding to the taint key.", - Type: []string{"string"}, - Format: "", - }, - }, - "effect": { - SchemaProps: spec.SchemaProps{ - Description: "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.", - Type: []string{"string"}, - Format: "", - }, - }, - "timeAdded": { - SchemaProps: spec.SchemaProps{ - Description: "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - Required: []string{"key", "effect"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.Toleration": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .", - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", - Type: []string{"string"}, - Format: "", - }, - }, - "operator": { - SchemaProps: spec.SchemaProps{ - Description: "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", - Type: []string{"string"}, - Format: "", - }, - }, - "effect": { - SchemaProps: spec.SchemaProps{ - Description: "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", - Type: []string{"string"}, - Format: "", - }, - }, - "tolerationSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.TopologySelectorLabelRequirement": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.", - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The label key that the selector applies to.", - Type: []string{"string"}, - Format: "", - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - Description: "An array of string values. One value must match the label to be selected. Each entry in Values is ORed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"key", "values"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.TopologySelectorTerm": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.", - Properties: map[string]spec.Schema{ - "matchLabelExpressions": { - SchemaProps: spec.SchemaProps{ - Description: "A list of topology selector requirements by labels.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.TopologySelectorLabelRequirement"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.TopologySelectorLabelRequirement"}, - }, - "k8s.io/api/core/v1.Volume": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Volume represents a named volume in a pod that may be accessed by any container in the pod.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "hostPath": { - SchemaProps: spec.SchemaProps{ - Description: "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), - }, - }, - "emptyDir": { - SchemaProps: spec.SchemaProps{ - Description: "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), - }, - }, - "gcePersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), - }, - }, - "awsElasticBlockStore": { - SchemaProps: spec.SchemaProps{ - Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), - }, - }, - "gitRepo": { - SchemaProps: spec.SchemaProps{ - Description: "GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", - Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), - }, - }, - "secret": { - SchemaProps: spec.SchemaProps{ - Description: "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), - }, - }, - "nfs": { - SchemaProps: spec.SchemaProps{ - Description: "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), - }, - }, - "iscsi": { - SchemaProps: spec.SchemaProps{ - Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md", - Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), - }, - }, - "glusterfs": { - SchemaProps: spec.SchemaProps{ - Description: "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), - }, - }, - "persistentVolumeClaim": { - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), - }, - }, - "rbd": { - SchemaProps: spec.SchemaProps{ - Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), - }, - }, - "flexVolume": { - SchemaProps: spec.SchemaProps{ - Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), - }, - }, - "cinder": { - SchemaProps: spec.SchemaProps{ - Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), - }, - }, - "cephfs": { - SchemaProps: spec.SchemaProps{ - Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), - }, - }, - "flocker": { - SchemaProps: spec.SchemaProps{ - Description: "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), - }, - }, - "downwardAPI": { - SchemaProps: spec.SchemaProps{ - Description: "DownwardAPI represents downward API about the pod that should populate this volume", - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), - }, - }, - "fc": { - SchemaProps: spec.SchemaProps{ - Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), - }, - }, - "azureFile": { - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap represents a configMap that should populate this volume", - Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), - }, - }, - "vsphereVolume": { - SchemaProps: spec.SchemaProps{ - Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), - }, - }, - "quobyte": { - SchemaProps: spec.SchemaProps{ - Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), - }, - }, - "azureDisk": { - SchemaProps: spec.SchemaProps{ - Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), - }, - }, - "photonPersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), - }, - }, - "projected": { - SchemaProps: spec.SchemaProps{ - Description: "Items for all in one resources secrets, configmaps, and downward API", - Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), - }, - }, - "portworxVolume": { - SchemaProps: spec.SchemaProps{ - Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), - }, - }, - "scaleIO": { - SchemaProps: spec.SchemaProps{ - Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), - }, - }, - "storageos": { - SchemaProps: spec.SchemaProps{ - Description: "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, - }, - "k8s.io/api/core/v1.VolumeDevice": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "volumeDevice describes a mapping of a raw block device within a container.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name must match the name of a persistentVolumeClaim in the pod", - Type: []string{"string"}, - Format: "", - }, - }, - "devicePath": { - SchemaProps: spec.SchemaProps{ - Description: "devicePath is the path inside of the container that the device will be mapped to.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "devicePath"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.VolumeMount": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeMount describes a mounting of a Volume within a container.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "This must match the Name of a Volume.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "mountPath": { - SchemaProps: spec.SchemaProps{ - Description: "Path within the container at which the volume should be mounted. Must not contain ':'.", - Type: []string{"string"}, - Format: "", - }, - }, - "subPath": { - SchemaProps: spec.SchemaProps{ - Description: "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", - Type: []string{"string"}, - Format: "", - }, - }, - "mountPropagation": { - SchemaProps: spec.SchemaProps{ - Description: "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "mountPath"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.VolumeNodeAffinity": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.", - Properties: map[string]spec.Schema{ - "required": { - SchemaProps: spec.SchemaProps{ - Description: "Required specifies hard node constraints that must be met.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector"}, - }, - "k8s.io/api/core/v1.VolumeProjection": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Projection that may be projected along with other supported volume types", - Properties: map[string]spec.Schema{ - "secret": { - SchemaProps: spec.SchemaProps{ - Description: "information about the secret data to project", - Ref: ref("k8s.io/api/core/v1.SecretProjection"), - }, - }, - "downwardAPI": { - SchemaProps: spec.SchemaProps{ - Description: "information about the downwardAPI data to project", - Ref: ref("k8s.io/api/core/v1.DownwardAPIProjection"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "information about the configMap data to project", - Ref: ref("k8s.io/api/core/v1.ConfigMapProjection"), - }, - }, - "serviceAccountToken": { - SchemaProps: spec.SchemaProps{ - Description: "information about the serviceAccountToken data to project", - Ref: ref("k8s.io/api/core/v1.ServiceAccountTokenProjection"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapProjection", "k8s.io/api/core/v1.DownwardAPIProjection", "k8s.io/api/core/v1.SecretProjection", "k8s.io/api/core/v1.ServiceAccountTokenProjection"}, - }, - "k8s.io/api/core/v1.VolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents the source of a volume to mount. Only one of its members may be specified.", - Properties: map[string]spec.Schema{ - "hostPath": { - SchemaProps: spec.SchemaProps{ - Description: "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), - }, - }, - "emptyDir": { - SchemaProps: spec.SchemaProps{ - Description: "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), - }, - }, - "gcePersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), - }, - }, - "awsElasticBlockStore": { - SchemaProps: spec.SchemaProps{ - Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), - }, - }, - "gitRepo": { - SchemaProps: spec.SchemaProps{ - Description: "GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", - Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), - }, - }, - "secret": { - SchemaProps: spec.SchemaProps{ - Description: "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), - }, - }, - "nfs": { - SchemaProps: spec.SchemaProps{ - Description: "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), - }, - }, - "iscsi": { - SchemaProps: spec.SchemaProps{ - Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md", - Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), - }, - }, - "glusterfs": { - SchemaProps: spec.SchemaProps{ - Description: "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), - }, - }, - "persistentVolumeClaim": { - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), - }, - }, - "rbd": { - SchemaProps: spec.SchemaProps{ - Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), - }, - }, - "flexVolume": { - SchemaProps: spec.SchemaProps{ - Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), - }, - }, - "cinder": { - SchemaProps: spec.SchemaProps{ - Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), - }, - }, - "cephfs": { - SchemaProps: spec.SchemaProps{ - Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), - }, - }, - "flocker": { - SchemaProps: spec.SchemaProps{ - Description: "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), - }, - }, - "downwardAPI": { - SchemaProps: spec.SchemaProps{ - Description: "DownwardAPI represents downward API about the pod that should populate this volume", - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), - }, - }, - "fc": { - SchemaProps: spec.SchemaProps{ - Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), - }, - }, - "azureFile": { - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap represents a configMap that should populate this volume", - Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), - }, - }, - "vsphereVolume": { - SchemaProps: spec.SchemaProps{ - Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), - }, - }, - "quobyte": { - SchemaProps: spec.SchemaProps{ - Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), - }, - }, - "azureDisk": { - SchemaProps: spec.SchemaProps{ - Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), - }, - }, - "photonPersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), - }, - }, - "projected": { - SchemaProps: spec.SchemaProps{ - Description: "Items for all in one resources secrets, configmaps, and downward API", - Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), - }, - }, - "portworxVolume": { - SchemaProps: spec.SchemaProps{ - Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), - }, - }, - "scaleIO": { - SchemaProps: spec.SchemaProps{ - Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), - }, - }, - "storageos": { - SchemaProps: spec.SchemaProps{ - Description: "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, - }, - "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a vSphere volume resource.", - Properties: map[string]spec.Schema{ - "volumePath": { - SchemaProps: spec.SchemaProps{ - Description: "Path that identifies vSphere volume vmdk", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "storagePolicyName": { - SchemaProps: spec.SchemaProps{ - Description: "Storage Policy Based Management (SPBM) profile name.", - Type: []string{"string"}, - Format: "", - }, - }, - "storagePolicyID": { - SchemaProps: spec.SchemaProps{ - Description: "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"volumePath"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.WeightedPodAffinityTerm": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", - Properties: map[string]spec.Schema{ - "weight": { - SchemaProps: spec.SchemaProps{ - Description: "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "podAffinityTerm": { - SchemaProps: spec.SchemaProps{ - Description: "Required. A pod affinity term, associated with the corresponding weight.", - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), - }, - }, - }, - Required: []string{"weight", "podAffinityTerm"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm"}, - }, - "k8s.io/apimachinery/pkg/api/resource.Quantity": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: resource.Quantity{}.OpenAPISchemaType(), - Format: resource.Quantity{}.OpenAPISchemaFormat(), - }, - }, - }, - "k8s.io/apimachinery/pkg/api/resource.int64Amount": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster than operations on inf.Dec for values that can be represented as int64.", - Properties: map[string]spec.Schema{ - "value": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "scale": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"value", "scale"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIGroup contains the name, the supported versions, and the preferred version of a group.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is the name of the group.", - Type: []string{"string"}, - Format: "", - }, - }, - "versions": { - SchemaProps: spec.SchemaProps{ - Description: "versions are the versions supported in this group.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), - }, - }, - }, - }, - }, - "preferredVersion": { - SchemaProps: spec.SchemaProps{ - Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), - }, - }, - "serverAddressByClientCIDRs": { - SchemaProps: spec.SchemaProps{ - Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), - }, - }, - }, - }, - }, - }, - Required: []string{"name", "versions"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "groups": { - SchemaProps: spec.SchemaProps{ - Description: "groups is a list of APIGroup.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), - }, - }, - }, - }, - }, - }, - Required: []string{"groups"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIResource specifies the name of a resource and whether it is namespaced.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is the plural name of the resource.", - Type: []string{"string"}, - Format: "", - }, - }, - "singularName": { - SchemaProps: spec.SchemaProps{ - Description: "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", - Type: []string{"string"}, - Format: "", - }, - }, - "namespaced": { - SchemaProps: spec.SchemaProps{ - Description: "namespaced indicates if a resource is namespaced or not.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Description: "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", - Type: []string{"string"}, - Format: "", - }, - }, - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "shortNames": { - SchemaProps: spec.SchemaProps{ - Description: "shortNames is a list of suggested short names of the resource.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "categories": { - SchemaProps: spec.SchemaProps{ - Description: "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"name", "singularName", "namespaced", "kind", "verbs"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "groupVersion": { - SchemaProps: spec.SchemaProps{ - Description: "groupVersion is the group and version this APIResourceList is for.", - Type: []string{"string"}, - Format: "", - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "resources contains the name of the resources and if they are namespaced.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), - }, - }, - }, - }, - }, - }, - Required: []string{"groupVersion", "resources"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "versions": { - SchemaProps: spec.SchemaProps{ - Description: "versions are the api versions that are available.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "serverAddressByClientCIDRs": { - SchemaProps: spec.SchemaProps{ - Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), - }, - }, - }, - }, - }, - }, - Required: []string{"versions", "serverAddressByClientCIDRs"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeleteOptions may be provided when deleting an API object.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "gracePeriodSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "preconditions": { - SchemaProps: spec.SchemaProps{ - Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), - }, - }, - "orphanDependents": { - SchemaProps: spec.SchemaProps{ - Description: "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "propagationPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.", - Properties: map[string]spec.Schema{ - "Duration": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - Required: []string{"Duration"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.ExportOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExportOptions is the query options to the standard REST get call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "export": { - SchemaProps: spec.SchemaProps{ - Description: "Should this value be exported. Export strips fields that a user can not specify.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "exact": { - SchemaProps: spec.SchemaProps{ - Description: "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"export", "exact"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GetOptions is the standard query options to the standard REST get call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - Type: []string{"string"}, - Format: "", - }, - }, - "includeUninitialized": { - SchemaProps: spec.SchemaProps{ - Description: "If true, partially initialized resources are included in the response.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "kind"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "resource"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersion contains the \"group\" and the \"version\", which uniquely identifies the API.", - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", - Properties: map[string]spec.Schema{ - "groupVersion": { - SchemaProps: spec.SchemaProps{ - Description: "groupVersion specifies the API group and version in the form \"group/version\"", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Description: "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"groupVersion", "version"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version", "kind"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version", "resource"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Initializer": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Initializer is information about an initializer that has not yet completed.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name of the process that is responsible for initializing this object.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Initializers": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Initializers tracks the progress of initialization.", - Properties: map[string]spec.Schema{ - "pending": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Initializer"), - }, - }, - }, - }, - }, - "result": { - SchemaProps: spec.SchemaProps{ - Description: "If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), - }, - }, - }, - Required: []string{"pending"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Initializer", "k8s.io/apimachinery/pkg/apis/meta/v1.Status"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "InternalEvent makes watch.Event versioned", - Properties: map[string]spec.Schema{ - "Type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "Object": { - SchemaProps: spec.SchemaProps{ - Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), - }, - }, - }, - Required: []string{"Type", "Object"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.Object"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", - Properties: map[string]spec.Schema{ - "matchLabels": { - SchemaProps: spec.SchemaProps{ - Description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "matchExpressions": { - SchemaProps: spec.SchemaProps{ - Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", - Properties: map[string]spec.Schema{ - "key": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "key", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "key is the label key that the selector applies to.", - Type: []string{"string"}, - Format: "", - }, - }, - "operator": { - SchemaProps: spec.SchemaProps{ - Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", - Type: []string{"string"}, - Format: "", - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - Description: "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"key", "operator"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.List": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "List holds a list of objects, which may not be known by the server.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of objects", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", - Properties: map[string]spec.Schema{ - "selfLink": { - SchemaProps: spec.SchemaProps{ - Description: "selfLink is a URL representing this object. Populated by the system. Read-only.", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", - Type: []string{"string"}, - Format: "", - }, - }, - "continue": { - SchemaProps: spec.SchemaProps{ - Description: "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ListOptions is the query options to a standard REST list call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "labelSelector": { - SchemaProps: spec.SchemaProps{ - Description: "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldSelector": { - SchemaProps: spec.SchemaProps{ - Description: "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - Type: []string{"string"}, - Format: "", - }, - }, - "includeUninitialized": { - SchemaProps: spec.SchemaProps{ - Description: "If true, partially initialized resources are included in the response.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "watch": { - SchemaProps: spec.SchemaProps{ - Description: "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - Type: []string{"string"}, - Format: "", - }, - }, - "timeoutSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "limit": { - SchemaProps: spec.SchemaProps{ - Description: "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "continue": { - SchemaProps: spec.SchemaProps{ - Description: "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: v1.MicroTime{}.OpenAPISchemaType(), - Format: v1.MicroTime{}.OpenAPISchemaFormat(), - }, - }, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", - Type: []string{"string"}, - Format: "", - }, - }, - "generateName": { - SchemaProps: spec.SchemaProps{ - Description: "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", - Type: []string{"string"}, - Format: "", - }, - }, - "selfLink": { - SchemaProps: spec.SchemaProps{ - Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", - Type: []string{"string"}, - Format: "", - }, - }, - "generation": { - SchemaProps: spec.SchemaProps{ - Description: "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "creationTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "deletionTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "deletionGracePeriodSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "labels": { - SchemaProps: spec.SchemaProps{ - Description: "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "annotations": { - SchemaProps: spec.SchemaProps{ - Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "ownerReferences": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "uid", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), - }, - }, - }, - }, - }, - "initializers": { - SchemaProps: spec.SchemaProps{ - Description: "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Initializers"), - }, - }, - "finalizers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "clusterName": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Initializers", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "API version of the referent.", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - Type: []string{"string"}, - Format: "", - }, - }, - "controller": { - SchemaProps: spec.SchemaProps{ - Description: "If true, this reference points to the managing controller.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "blockOwnerDeletion": { - SchemaProps: spec.SchemaProps{ - Description: "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"apiVersion", "kind", "name", "uid"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", - Properties: map[string]spec.Schema{ - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the target UID.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", - Properties: map[string]spec.Schema{ - "paths": { - SchemaProps: spec.SchemaProps{ - Description: "paths are the paths available at root.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"paths"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", - Properties: map[string]spec.Schema{ - "clientCIDR": { - SchemaProps: spec.SchemaProps{ - Description: "The CIDR with which clients can match their IP to figure out the server address that they should use.", - Type: []string{"string"}, - Format: "", - }, - }, - "serverAddress": { - SchemaProps: spec.SchemaProps{ - Description: "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"clientCIDR", "serverAddress"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Status": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Status is a return value for calls that don't return other objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the status of this operation.", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", - Type: []string{"string"}, - Format: "", - }, - }, - "details": { - SchemaProps: spec.SchemaProps{ - Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), - }, - }, - "code": { - SchemaProps: spec.SchemaProps{ - Description: "Suggested HTTP return code for this status, 0 if not set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", - Properties: map[string]spec.Schema{ - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "A machine-readable description of the cause of the error. If this value is empty there is no information available.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", - Type: []string{"string"}, - Format: "", - }, - }, - "field": { - SchemaProps: spec.SchemaProps{ - Description: "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", - Type: []string{"string"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "The group attribute of the resource associated with the status StatusReason.", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - Type: []string{"string"}, - Format: "", - }, - }, - "causes": { - SchemaProps: spec.SchemaProps{ - Description: "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), - }, - }, - }, - }, - }, - "retryAfterSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Time": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: v1.Time{}.OpenAPISchemaType(), - Format: v1.Time{}.OpenAPISchemaFormat(), - }, - }, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Timestamp is a struct that is equivalent to Time, but intended for protobuf marshalling/unmarshalling. It is generated into a serialization that matches Time. Do not use in Go structs.", - Properties: map[string]spec.Schema{ - "seconds": { - SchemaProps: spec.SchemaProps{ - Description: "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "nanos": { - SchemaProps: spec.SchemaProps{ - Description: "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"seconds", "nanos"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Event represents a single event to a watched resource.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "object": { - SchemaProps: spec.SchemaProps{ - Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - Required: []string{"type", "object"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - }, - "k8s.io/apimachinery/pkg/runtime.RawExtension": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", - Properties: map[string]spec.Schema{ - "Raw": { - SchemaProps: spec.SchemaProps{ - Description: "Raw is the underlying serialization of this object.", - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - Required: []string{"Raw"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/runtime.TypeMeta": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, like this: type MyAwesomeAPIObject struct {\n runtime.TypeMeta `json:\",inline\"`\n ... // other fields\n} func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind\n\nTypeMeta is provided here for convenience. You may use it directly from this package or define your own with the same fields.", - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/runtime.Unknown": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Unknown allows api objects with unknown types to be passed-through. This can be used to deal with the API objects from a plug-in. Unknown objects still have functioning TypeMeta features-- kind, version, etc. metadata and field mutatation.", - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "Raw": { - SchemaProps: spec.SchemaProps{ - Description: "Raw will hold the complete serialized object which couldn't be matched with a registered type. Most likely, nothing should be done with this except for passing it through the system.", - Type: []string{"string"}, - Format: "byte", - }, - }, - "ContentEncoding": { - SchemaProps: spec.SchemaProps{ - Description: "ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.", - Type: []string{"string"}, - Format: "", - }, - }, - "ContentType": { - SchemaProps: spec.SchemaProps{ - Description: "ContentType is serialization method used to serialize 'Raw'. Unspecified means ContentTypeJSON.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"Raw", "ContentEncoding", "ContentType"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/util/intstr.IntOrString": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: intstr.IntOrString{}.OpenAPISchemaType(), - Format: intstr.IntOrString{}.OpenAPISchemaFormat(), - }, - }, - }, - "k8s.io/apimachinery/pkg/version.Info": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Info contains versioning information. how we'll want to distribute that information.", - Properties: map[string]spec.Schema{ - "major": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "minor": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "gitVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "gitCommit": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "gitTreeState": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "buildDate": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "goVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "compiler": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "platform": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"}, - }, - }, - Dependencies: []string{}, - }, - } -} diff --git a/apis/tensorflow/v1/register.go b/apis/tensorflow/v1/register.go deleted file mode 100644 index 8c890b41..00000000 --- a/apis/tensorflow/v1/register.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2018 The Kubeflow Authors -// -// 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 v1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/runtime/scheme" -) - -const ( - // GroupName is the group name use in this package. - GroupName = "kubeflow.org" - // Kind is the kind name. - Kind = "TFJob" - // GroupVersion is the version. - GroupVersion = "v1" - // Plural is the Plural for TFJob. - Plural = "tfjobs" - // Singular is the singular for TFJob. - Singular = "tfjob" - // TFCRD is the CRD name for TFJob. - TFCRD = "tfjobs.kubeflow.org" -) - -var ( - // SchemeGroupVersion is the group version used to register these objects. - SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion} - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} - // SchemeGroupVersionKind is the GroupVersionKind of the resource. - SchemeGroupVersionKind = SchemeGroupVersion.WithKind(Kind) -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - SchemeBuilder.SchemeBuilder.Register(addDefaultingFuncs) -} - -// Resource takes an unqualified resource and returns a Group-qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/apis/tensorflow/v1/v1_suite_test.go b/apis/tensorflow/v1/v1_suite_test.go deleted file mode 100644 index 21601563..00000000 --- a/apis/tensorflow/v1/v1_suite_test.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2019 The Alibaba Authors. - -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 v1 - -import ( - "log" - "os" - "testing" - - "k8s.io/client-go/kubernetes/scheme" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/fake" -) - -var c client.Client - -func TestMain(m *testing.M) { - err := SchemeBuilder.AddToScheme(scheme.Scheme) - if err != nil { - log.Fatal(err) - } - c = fake.NewFakeClientWithScheme(scheme.Scheme) - - code := m.Run() - os.Exit(code) -} diff --git a/apis/tensorflow/v1/zz_generated.deepcopy.go b/apis/tensorflow/v1/zz_generated.deepcopy.go deleted file mode 100644 index 59ee2c91..00000000 --- a/apis/tensorflow/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,121 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2021 The Alibaba Authors. - -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. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1 - -import ( - apiv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TFJob) DeepCopyInto(out *TFJob) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TFJob. -func (in *TFJob) DeepCopy() *TFJob { - if in == nil { - return nil - } - out := new(TFJob) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TFJob) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TFJobList) DeepCopyInto(out *TFJobList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]TFJob, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TFJobList. -func (in *TFJobList) DeepCopy() *TFJobList { - if in == nil { - return nil - } - out := new(TFJobList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TFJobList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TFJobSpec) DeepCopyInto(out *TFJobSpec) { - *out = *in - in.RunPolicy.DeepCopyInto(&out.RunPolicy) - if in.SuccessPolicy != nil { - in, out := &in.SuccessPolicy, &out.SuccessPolicy - *out = new(SuccessPolicy) - **out = **in - } - if in.TFReplicaSpecs != nil { - in, out := &in.TFReplicaSpecs, &out.TFReplicaSpecs - *out = make(map[apiv1.ReplicaType]*apiv1.ReplicaSpec, len(*in)) - for key, val := range *in { - var outVal *apiv1.ReplicaSpec - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(apiv1.ReplicaSpec) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TFJobSpec. -func (in *TFJobSpec) DeepCopy() *TFJobSpec { - if in == nil { - return nil - } - out := new(TFJobSpec) - in.DeepCopyInto(out) - return out -} diff --git a/apis/tensorflow/v1/zz_generated.defaults.go b/apis/tensorflow/v1/zz_generated.defaults.go deleted file mode 100644 index 0ff62cb7..00000000 --- a/apis/tensorflow/v1/zz_generated.defaults.go +++ /dev/null @@ -1,44 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2019 The Alibaba Authors. - -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. -*/ -// Code generated by main. DO NOT EDIT. - -package v1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&TFJob{}, func(obj interface{}) { SetObjectDefaults_TFJob(obj.(*TFJob)) }) - scheme.AddTypeDefaultingFunc(&TFJobList{}, func(obj interface{}) { SetObjectDefaults_TFJobList(obj.(*TFJobList)) }) - return nil -} - -func SetObjectDefaults_TFJob(in *TFJob) { - SetDefaults_TFJob(in) -} - -func SetObjectDefaults_TFJobList(in *TFJobList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_TFJob(a) - } -} diff --git a/apis/training/v1alpha1/common.go b/apis/training/v1alpha1/common.go new file mode 100644 index 00000000..4487e8c5 --- /dev/null +++ b/apis/training/v1alpha1/common.go @@ -0,0 +1,30 @@ +package v1alpha1 + +import ( + v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var SchemeGroupVersion = GroupVersion + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + SchemeBuilder.SchemeBuilder.Register(addDefaultingFuncs) +} + +// Resource is required by pkg/client/listers/... +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} + +func cleanPodPolicyPointer(cleanPodPolicy v1.CleanPodPolicy) *v1.CleanPodPolicy { + c := cleanPodPolicy + return &c +} diff --git a/apis/mpi/v1/doc.go b/apis/training/v1alpha1/doc.go similarity index 81% rename from apis/mpi/v1/doc.go rename to apis/training/v1alpha1/doc.go index a43fe85d..67c3623e 100644 --- a/apis/mpi/v1/doc.go +++ b/apis/training/v1alpha1/doc.go @@ -14,10 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package +// Package v1alpha1 contains API Schema definitions for the training v1alpha1 API group // +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true - -// Package v1 is the v1 version of the API. -// +groupName=kubeflow.org -package v1 +// +groupName=training.kubedl.io +package v1alpha1 diff --git a/apis/training/v1alpha1/elasticdljob_constant.go b/apis/training/v1alpha1/elasticdljob_constant.go new file mode 100644 index 00000000..2de276c6 --- /dev/null +++ b/apis/training/v1alpha1/elasticdljob_constant.go @@ -0,0 +1,8 @@ +package v1alpha1 + +const ( + ElasticDLJobKind = "ElasticDLJob" + ElasticDLJobDefaultContainerName = "elasticdl" + ElasticDLJobDefaultPortName = "elasticdl-port" + ElasticDLJobDefaultPort = 11111 +) diff --git a/apis/elasticdl/v1alpha1/elasticdljob_types.go b/apis/training/v1alpha1/elasticdljob_types.go similarity index 70% rename from apis/elasticdl/v1alpha1/elasticdljob_types.go rename to apis/training/v1alpha1/elasticdljob_types.go index 1df5245e..639395d5 100644 --- a/apis/elasticdl/v1alpha1/elasticdljob_types.go +++ b/apis/training/v1alpha1/elasticdljob_types.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Alibaba Authors. +Copyright 2021 The Alibaba Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -22,8 +22,14 @@ import ( common "github.com/alibaba/kubedl/pkg/job_controller/api/v1" ) -// ElasticDLJobSpec is a desired state description of the ElasticDLJob. +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// ElasticDLJobSpec defines the desired state of ElasticDLJob type ElasticDLJobSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + // RunPolicy encapsulates various runtime policies of the distributed training // job, for example how to clean up resources and how long the job can stay // active. @@ -38,9 +44,7 @@ type ElasticDLJobSpec struct { } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:defaulter-gen=TypeMeta -// +resource:path=elasticdljob +// +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:resource:scope=Namespaced // +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type` @@ -48,19 +52,12 @@ type ElasticDLJobSpec struct { // +kubebuilder:printcolumn:name="Finished-TTL",type=integer,JSONPath=`.spec.ttlSecondsAfterFinished` // +kubebuilder:printcolumn:name="Max-Lifetime",type=integer,JSONPath=`.spec.activeDeadlineSeconds` -// ElasticDLJob Represents an elasticdl Job instance +// ElasticDLJob is the Schema for the elasticdljobs API type ElasticDLJob struct { - // Standard Kubernetes type metadata. - metav1.TypeMeta `json:",inline"` - - // Standard Kubernetes object's metadata. + metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired state of the ElasticDLJob. - Spec ElasticDLJobSpec `json:"spec,omitempty"` - - // Most recently observed status of the ElasticDLJob. - // Read-only (modified by the system). + Spec ElasticDLJobSpec `json:"spec,omitempty"` Status common.JobStatus `json:"status,omitempty"` } @@ -69,19 +66,13 @@ const ( ElasticDLReplicaTypeMaster common.ReplicaType = "Master" ) -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +resource:path=elasticdljobs +// +kubebuilder:object:root=true -// ElasticDLJobList is a list of ElasticDLJobs. +// ElasticDLJobList contains a list of ElasticDLJob type ElasticDLJobList struct { - // Standard type metadata. metav1.TypeMeta `json:",inline"` - - // Standard list metadata. metav1.ListMeta `json:"metadata,omitempty"` - - // List of ElasticDLJobs. - Items []ElasticDLJob `json:"items"` + Items []ElasticDLJob `json:"items"` } func init() { diff --git a/apis/elasticdl/v1alpha1/groupversion_info.go b/apis/training/v1alpha1/groupversion_info.go similarity index 54% rename from apis/elasticdl/v1alpha1/groupversion_info.go rename to apis/training/v1alpha1/groupversion_info.go index d0933d7c..bdf9a197 100644 --- a/apis/elasticdl/v1alpha1/groupversion_info.go +++ b/apis/training/v1alpha1/groupversion_info.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Alibaba Authors. +Copyright 2021 The Alibaba Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,35 +14,23 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package v1alpha1 contains API Schema definitions for the training v1alpha1 API group // +kubebuilder:object:generate=true -// +groupName=elasticdl.org +// +groupName=training.kubedl.io package v1alpha1 import ( "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/runtime/scheme" -) - -const ( - Kind = "ElasticDLJob" - GroupName = "elasticdl.org" - GroupVersion = "v1alpha1" + "sigs.k8s.io/controller-runtime/pkg/scheme" ) var ( - // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion} - - GroupVersionKind = SchemeGroupVersion.WithKind(Kind) + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "training.kubedl.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme ) - -// Resource takes an unqualified resource and returns a Group-qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/apis/mars/v1alpha1/constant.go b/apis/training/v1alpha1/marsjob_constant.go similarity index 59% rename from apis/mars/v1alpha1/constant.go rename to apis/training/v1alpha1/marsjob_constant.go index 237819fb..abbdb617 100644 --- a/apis/mars/v1alpha1/constant.go +++ b/apis/training/v1alpha1/marsjob_constant.go @@ -19,11 +19,12 @@ package v1alpha1 import v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" const ( - DefaultContainerName = "mars" - DefaultPortName = "mars-port" - DefaultPort = 11111 - DefaultCacheMountPath = "/dev/shm" - DefaultSchedulerRestartPolicy = v1.RestartPolicyNever - DefaultWebServiceRestartPolicy = v1.RestartPolicyAlways - DefaultWorkerRestartPolicy = v1.RestartPolicyExitCode + MarsJobKind = "MarsJob" + MarsJobDefaultContainerName = "mars" + MarsJobDefaultPortName = "mars-port" + MarsJobDefaultPort = 11111 + MarsJobDefaultCacheMountPath = "/dev/shm" + MarsJobDefaultSchedulerRestartPolicy = v1.RestartPolicyNever + MarsJobDefaultWebServiceRestartPolicy = v1.RestartPolicyAlways + MarsJobDefaultWorkerRestartPolicy = v1.RestartPolicyExitCode ) diff --git a/apis/mars/v1alpha1/defaults.go b/apis/training/v1alpha1/marsjob_defaults.go similarity index 63% rename from apis/mars/v1alpha1/defaults.go rename to apis/training/v1alpha1/marsjob_defaults.go index 0f8a68f6..0798922c 100644 --- a/apis/mars/v1alpha1/defaults.go +++ b/apis/training/v1alpha1/marsjob_defaults.go @@ -22,19 +22,14 @@ import ( common "github.com/alibaba/kubedl/pkg/job_controller/api/v1" v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/utils/pointer" ) -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} - -// setDefaultPort sets the default ports for pytorch container. -func setDefaultPort(spec *v1.PodSpec) { +// setDefaults_MarsJobPort sets the default ports for pytorch container. +func setDefaults_MarsJobPort(spec *v1.PodSpec) { index := 0 for i, container := range spec.Containers { - if container.Name == DefaultContainerName { + if container.Name == MarsJobDefaultContainerName { index = i break } @@ -42,47 +37,47 @@ func setDefaultPort(spec *v1.PodSpec) { hasMarsJobPort := false for _, port := range spec.Containers[index].Ports { - if port.Name == DefaultPortName { + if port.Name == MarsJobDefaultPortName { hasMarsJobPort = true break } } if !hasMarsJobPort { spec.Containers[index].Ports = append(spec.Containers[index].Ports, v1.ContainerPort{ - Name: DefaultPortName, - ContainerPort: DefaultPort, + Name: MarsJobDefaultPortName, + ContainerPort: MarsJobDefaultPort, }) } } -func setDefaultSchedulerReplicas(spec *common.ReplicaSpec) { +func setDefaults_MarsJobSchedulerReplicas(spec *common.ReplicaSpec) { if spec.Replicas == nil { spec.Replicas = pointer.Int32Ptr(1) } if spec.RestartPolicy == "" { - spec.RestartPolicy = DefaultSchedulerRestartPolicy + spec.RestartPolicy = MarsJobDefaultSchedulerRestartPolicy } } -func setDefaultWorkerReplicas(spec *common.ReplicaSpec) { +func setDefaults_MarsJobWorkerReplicas(spec *common.ReplicaSpec) { if spec.Replicas == nil { spec.Replicas = pointer.Int32Ptr(1) } if spec.RestartPolicy == "" { - spec.RestartPolicy = DefaultWorkerRestartPolicy + spec.RestartPolicy = MarsJobDefaultWorkerRestartPolicy } } -func setDefaultWebServiceReplicas(spec *common.ReplicaSpec) { +func setDefaults_MarsJobWebServiceReplicas(spec *common.ReplicaSpec) { if spec.Replicas == nil { spec.Replicas = pointer.Int32Ptr(1) } if spec.RestartPolicy == "" { - spec.RestartPolicy = DefaultWebServiceRestartPolicy + spec.RestartPolicy = MarsJobDefaultWebServiceRestartPolicy } } -func setDefaultWorkerMemTuningPolicy(job *MarsJob) { +func setDefaults_MarsJobWorkerMemTuningPolicy(job *MarsJob) { if job.Spec.WorkerMemoryTuningPolicy == nil { job.Spec.WorkerMemoryTuningPolicy = &MarsWorkerMemoryTuningPolicy{} } @@ -94,15 +89,15 @@ func setDefaultWorkerMemTuningPolicy(job *MarsJob) { } } -// setTypeNamesToCamelCase sets the name of all replica types from any case to correct case. -func setTypeNamesToCamelCase(job *MarsJob) { - setTypeNameToCamelCase(job, MarsReplicaTypeScheduler) - setTypeNameToCamelCase(job, MarsReplicaTypeWorker) - setTypeNameToCamelCase(job, MarsReplicaTypeWebService) +// setTypeNames_MarsJob sets the name of all replica types from any case to correct case. +func setTypeNames_MarsJob(job *MarsJob) { + setTypeName_MarsJob(job, MarsReplicaTypeScheduler) + setTypeName_MarsJob(job, MarsReplicaTypeWorker) + setTypeName_MarsJob(job, MarsReplicaTypeWebService) } -// setTypeNameToCamelCase sets the name of the replica type from any case to correct case. -func setTypeNameToCamelCase(job *MarsJob, typ common.ReplicaType) { +// setTypeName_MarsJob sets the name of the replica type from any case to correct case. +func setTypeName_MarsJob(job *MarsJob, typ common.ReplicaType) { for t := range job.Spec.MarsReplicaSpecs { if strings.EqualFold(string(t), string(typ)) && t != typ { spec := job.Spec.MarsReplicaSpecs[t] @@ -122,18 +117,18 @@ func SetDefaults_MarsJob(job *MarsJob) { } // Update the key of PyTorchReplicaSpecs to camel case. - setTypeNamesToCamelCase(job) + setTypeNames_MarsJob(job) for rType, spec := range job.Spec.MarsReplicaSpecs { - setDefaultPort(&spec.Template.Spec) + setDefaults_MarsJobPort(&spec.Template.Spec) switch rType { case MarsReplicaTypeWebService: - setDefaultWebServiceReplicas(spec) + setDefaults_MarsJobWebServiceReplicas(spec) case MarsReplicaTypeWorker: - setDefaultWorkerReplicas(spec) - setDefaultWorkerMemTuningPolicy(job) + setDefaults_MarsJobWorkerReplicas(spec) + setDefaults_MarsJobWorkerMemTuningPolicy(job) case MarsReplicaTypeScheduler: - setDefaultSchedulerReplicas(spec) + setDefaults_MarsJobSchedulerReplicas(spec) } } } diff --git a/apis/mars/v1alpha1/marsjob_types.go b/apis/training/v1alpha1/marsjob_types.go similarity index 88% rename from apis/mars/v1alpha1/marsjob_types.go rename to apis/training/v1alpha1/marsjob_types.go index 23207671..6b435486 100644 --- a/apis/mars/v1alpha1/marsjob_types.go +++ b/apis/training/v1alpha1/marsjob_types.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Alibaba Authors. +Copyright 2021 The Alibaba Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -22,8 +22,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + // MarsJobSpec defines the desired state of MarsJob type MarsJobSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + // RunPolicy encapsulates various runtime policies of the distributed training // job, for example how to clean up resources and how long the job can stay // active. @@ -41,8 +47,11 @@ type MarsJobSpec struct { MarsReplicaSpecs map[commonv1.ReplicaType]*commonv1.ReplicaSpec `json:"marsReplicaSpecs"` } -// MarsJobStatus defines the current observed state of MarsJob +// MarsJobStatus defines the observed state of MarsJob type MarsJobStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file + commonv1.JobStatus `json:",inline"` // WebServiceAddresses is a list of available webservices addresses for users, its length // equals with WebServices.Replicas. @@ -72,8 +81,8 @@ type MarsWorkerMemoryTuningPolicy struct { WorkerCacheSize *resource.Quantity `json:"workerCacheSize,omitempty"` } +// +genclient // +kubebuilder:object:root=true -// +k8s:defaulter-gen=TypeMeta // +kubebuilder:subresource:status // +kubebuilder:resource:scope=Namespaced // +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type` @@ -81,7 +90,7 @@ type MarsWorkerMemoryTuningPolicy struct { // +kubebuilder:printcolumn:name="Finished-TTL",type=integer,JSONPath=`.spec.ttlSecondsAfterFinished` // +kubebuilder:printcolumn:name="Max-Lifetime",type=integer,JSONPath=`.spec.activeDeadlineSeconds` -// MarsJob represents a mars job instance nad +// MarsJob is the Schema for the marsjobs API type MarsJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -90,11 +99,6 @@ type MarsJob struct { Status MarsJobStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:defaulter-gen=TypeMeta -// +resource:path=pytorchjob -// +kubebuilder:subresource:status -// +kubebuilder:resource:scope=Namespaced // +kubebuilder:object:root=true // MarsJobList contains a list of MarsJob diff --git a/apis/mpi/v1/constants.go b/apis/training/v1alpha1/mpijob_constants.go similarity index 73% rename from apis/mpi/v1/constants.go rename to apis/training/v1alpha1/mpijob_constants.go index af7cd134..d402f41f 100644 --- a/apis/mpi/v1/constants.go +++ b/apis/training/v1alpha1/mpijob_constants.go @@ -14,16 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1 +package v1alpha1 import v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" const ( + MPIJobKind = "MPIJob" // DefaultRestartPolicy is default RestartPolicy for ReplicaSpec. - DefaultRestartPolicy = v1.RestartPolicyNever - DefaultCleanPodPolicy = v1.CleanPodPolicyRunning + MPIJobDefaultRestartPolicy = v1.RestartPolicyNever + MPIJobDefaultCleanPodPolicy = v1.CleanPodPolicyRunning - DefaultContainerName = "mpi" - DefaultPortName = "mpi-port" - DefaultPort = 2222 + MPIJobDefaultContainerName = "mpi" + MPIJobDefaultPortName = "mpi-port" + MPIJobDefaultPort = 2222 ) diff --git a/apis/mpi/v1/default.go b/apis/training/v1alpha1/mpijob_default.go similarity index 62% rename from apis/mpi/v1/default.go rename to apis/training/v1alpha1/mpijob_default.go index 062f21c1..0c58db4f 100644 --- a/apis/mpi/v1/default.go +++ b/apis/training/v1alpha1/mpijob_default.go @@ -14,29 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1 +package v1alpha1 import ( v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" ) -// Int32 is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it. -func Int32(v int32) *int32 { - return &v -} - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} - // setDefaultPort sets the default ports for mpi container. -func setDefaultPort(spec *corev1.PodSpec) { +func setDefaults_MPIJobPort(spec *corev1.PodSpec) { index := 0 for i, container := range spec.Containers { - if container.Name == DefaultContainerName { + if container.Name == MPIJobDefaultContainerName { index = i break } @@ -44,36 +33,36 @@ func setDefaultPort(spec *corev1.PodSpec) { hasMPIJobPort := false for _, port := range spec.Containers[index].Ports { - if port.Name == DefaultPortName { + if port.Name == MPIJobDefaultPortName { hasMPIJobPort = true break } } if !hasMPIJobPort { spec.Containers[index].Ports = append(spec.Containers[index].Ports, corev1.ContainerPort{ - Name: DefaultPortName, - ContainerPort: DefaultPort, + Name: MPIJobDefaultPortName, + ContainerPort: MPIJobDefaultPort, }) } } -// setDefaultsTypeLauncher sets the default value to launcher. -func setDefaultsTypeLauncher(spec *v1.ReplicaSpec) { +// setDefaults_MPIJobLauncherReplica sets the default value to launcher. +func setDefaults_MPIJobLauncherReplica(spec *v1.ReplicaSpec) { if spec != nil { if spec.RestartPolicy == "" { - spec.RestartPolicy = DefaultRestartPolicy + spec.RestartPolicy = MPIJobDefaultRestartPolicy } - setDefaultPort(&spec.Template.Spec) + setDefaults_MPIJobPort(&spec.Template.Spec) } } -// setDefaultsTypeWorker sets the default value to worker. -func setDefaultsTypeWorker(spec *v1.ReplicaSpec) { +// setDefaults_MPIJobWorkerReplica sets the default value to worker. +func setDefaults_MPIJobWorkerReplica(spec *v1.ReplicaSpec) { if spec != nil { if spec.RestartPolicy == "" { - spec.RestartPolicy = DefaultRestartPolicy + spec.RestartPolicy = MPIJobDefaultRestartPolicy } - setDefaultPort(&spec.Template.Spec) + setDefaults_MPIJobPort(&spec.Template.Spec) } } @@ -83,17 +72,17 @@ func SetDefaults_MPIJob(mpiJob *MPIJob) { mpiJob.Spec.MPIJobLegacySpec.RunPolicy = &v1.RunPolicy{} } if mpiJob.Spec.MPIJobLegacySpec != nil && mpiJob.Spec.MPIJobLegacySpec.CleanPodPolicy == nil { - policy := DefaultCleanPodPolicy + policy := MPIJobDefaultCleanPodPolicy mpiJob.Spec.CleanPodPolicy = &policy } // set default to Launcher if mpiJob.Spec.MPIReplicaSpecs[MPIReplicaTypeLauncher] != nil { - setDefaultsTypeLauncher(mpiJob.Spec.MPIReplicaSpecs[MPIReplicaTypeLauncher]) + setDefaults_MPIJobLauncherReplica(mpiJob.Spec.MPIReplicaSpecs[MPIReplicaTypeLauncher]) } // set default to Worker if mpiJob.Spec.MPIReplicaSpecs[MPIReplicaTypeWorker] != nil { - setDefaultsTypeWorker(mpiJob.Spec.MPIReplicaSpecs[MPIReplicaTypeWorker]) + setDefaults_MPIJobWorkerReplica(mpiJob.Spec.MPIReplicaSpecs[MPIReplicaTypeWorker]) } } diff --git a/apis/mpi/v1/types.go b/apis/training/v1alpha1/mpijob_types.go similarity index 89% rename from apis/mpi/v1/types.go rename to apis/training/v1alpha1/mpijob_types.go index f912e512..756b6c55 100644 --- a/apis/mpi/v1/types.go +++ b/apis/training/v1alpha1/mpijob_types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1 +package v1alpha1 import ( apiv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" @@ -23,37 +23,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// +genclient -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:resource:scope=Namespaced -// +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type` -// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` -// +kubebuilder:printcolumn:name="Finished-TTL",type=integer,JSONPath=`.spec.ttlSecondsAfterFinished` -// +kubebuilder:printcolumn:name="Max-Lifetime",type=integer,JSONPath=`.spec.activeDeadlineSeconds` -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type MPIJob struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec MPIJobSpec `json:"spec,omitempty"` - Status apiv1.JobStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:defaulter-gen=TypeMeta -// +resource:path=mpijob -// +kubebuilder:subresource:status -// +kubebuilder:resource:scope=Namespaced -// +kubebuilder:object:root=true - -type MPIJobList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []MPIJob `json:"items"` -} +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. +// MPIJobSpec defines the desired state of MPIJob type MPIJobSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + // Specifies the number of slots per worker used in hostfile. // Defaults to 1. // +optional @@ -161,3 +138,34 @@ const ( // MPIDistributionTypeMPICH is the type for MPICh. MPIDistributionTypeMPICH MPIDistributionType = "MPICH" ) + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Namespaced +// +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type` +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +// +kubebuilder:printcolumn:name="Finished-TTL",type=integer,JSONPath=`.spec.ttlSecondsAfterFinished` +// +kubebuilder:printcolumn:name="Max-Lifetime",type=integer,JSONPath=`.spec.activeDeadlineSeconds` + +// MPIJob is the Schema for the mpijobs API +type MPIJob struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec MPIJobSpec `json:"spec,omitempty"` + Status apiv1.JobStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// MPIJobList contains a list of MPIJob +type MPIJobList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []MPIJob `json:"items"` +} + +func init() { + SchemeBuilder.Register(&MPIJob{}, &MPIJobList{}) +} diff --git a/apis/training/v1alpha1/pytorchjob_constants.go b/apis/training/v1alpha1/pytorchjob_constants.go new file mode 100644 index 00000000..ce528967 --- /dev/null +++ b/apis/training/v1alpha1/pytorchjob_constants.go @@ -0,0 +1,34 @@ +// Copyright 2018 The Kubeflow Authors +// +// 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 v1alpha1 + +import ( + common "github.com/alibaba/kubedl/pkg/job_controller/api/v1" +) + +const ( + PyTorchJobKind = "PyTorchJob" + // PyTorchJobDefaultPortName is name of the port used to communicate between Master and + // workers. + PyTorchJobDefaultPortName = "pytorchjob-port" + // PyTorchJobDefaultContainerName is the name of the PyTorchJob container. + PyTorchJobDefaultContainerName = "pytorch" + // PyTorchJobDefaultPort is default value of the port. + PyTorchJobDefaultPort = 23456 + // PyTorchJobDefaultMasterRestartPolicy is default RestartPolicy for Master PyTorchReplicaSpec. + PyTorchJobDefaultMasterRestartPolicy = common.RestartPolicyExitCode + // PyTorchJobDefaultWorkerRestartPolicy is default RestartPolicy for Worker PyTorchReplicaSpec, + PyTorchJobDefaultWorkerRestartPolicy = common.RestartPolicyOnFailure +) diff --git a/apis/pytorch/v1/defaults.go b/apis/training/v1alpha1/pytorchjob_defaults.go similarity index 61% rename from apis/pytorch/v1/defaults.go rename to apis/training/v1alpha1/pytorchjob_defaults.go index 9c906ed4..048eeb19 100644 --- a/apis/pytorch/v1/defaults.go +++ b/apis/training/v1alpha1/pytorchjob_defaults.go @@ -12,31 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1 +package v1alpha1 import ( "strings" common "github.com/alibaba/kubedl/pkg/job_controller/api/v1" v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" + "k8s.io/utils/pointer" ) -// Int32 is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it. -func Int32(v int32) *int32 { - return &v -} - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} - -// setDefaultPort sets the default ports for pytorch container. -func setDefaultPort(spec *v1.PodSpec) { +// setDefaults_PyTorchJobPort sets the default ports for pytorch container. +func setDefaults_PyTorchJobPort(spec *v1.PodSpec) { index := 0 for i, container := range spec.Containers { - if container.Name == DefaultContainerName { + if container.Name == PyTorchJobDefaultContainerName { index = i break } @@ -44,44 +34,44 @@ func setDefaultPort(spec *v1.PodSpec) { hasPyTorchJobPort := false for _, port := range spec.Containers[index].Ports { - if port.Name == DefaultPortName { + if port.Name == PyTorchJobDefaultPortName { hasPyTorchJobPort = true break } } if !hasPyTorchJobPort { spec.Containers[index].Ports = append(spec.Containers[index].Ports, v1.ContainerPort{ - Name: DefaultPortName, - ContainerPort: DefaultPort, + Name: PyTorchJobDefaultPortName, + ContainerPort: PyTorchJobDefaultPort, }) } } -func setDefaultMasterReplicas(spec *common.ReplicaSpec) { +func setDefaults_PyTorchJobMasterReplicas(spec *common.ReplicaSpec) { if spec.Replicas == nil { - spec.Replicas = Int32(1) + spec.Replicas = pointer.Int32Ptr(1) } if spec.RestartPolicy == "" { - spec.RestartPolicy = DefaultMasterRestartPolicy + spec.RestartPolicy = PyTorchJobDefaultMasterRestartPolicy } } -func setDefaultWorkerReplicas(spec *common.ReplicaSpec) { +func setDefaults_PyTorchJobWorkerReplicas(spec *common.ReplicaSpec) { if spec.Replicas == nil { - spec.Replicas = Int32(1) + spec.Replicas = pointer.Int32Ptr(1) } if spec.RestartPolicy == "" { - spec.RestartPolicy = DefaultWorkerRestartPolicy + spec.RestartPolicy = PyTorchJobDefaultWorkerRestartPolicy } } -// setTypeNamesToCamelCase sets the name of all replica types from any case to correct case. -func setTypeNamesToCamelCase(job *PyTorchJob) { - setTypeNameToCamelCase(job, PyTorchReplicaTypeMaster) - setTypeNameToCamelCase(job, PyTorchReplicaTypeWorker) +// setTypeNames_PyTorchJob sets the name of all replica types from any case to correct case. +func setTypeNames_PyTorchJob(job *PyTorchJob) { + setTypeName_PyTorchJob(job, PyTorchReplicaTypeMaster) + setTypeName_PyTorchJob(job, PyTorchReplicaTypeWorker) } -// setTypeNameToCamelCase sets the name of the replica type from any case to correct case. -func setTypeNameToCamelCase(job *PyTorchJob, typ common.ReplicaType) { +// setTypeName_PyTorchJob sets the name of the replica type from any case to correct case. +func setTypeName_PyTorchJob(job *PyTorchJob, typ common.ReplicaType) { for t := range job.Spec.PyTorchReplicaSpecs { if strings.EqualFold(string(t), string(typ)) && t != typ { spec := job.Spec.PyTorchReplicaSpecs[t] @@ -101,17 +91,17 @@ func SetDefaults_PyTorchJob(job *PyTorchJob) { } // Update the key of PyTorchReplicaSpecs to camel case. - setTypeNamesToCamelCase(job) + setTypeNames_PyTorchJob(job) for rType, spec := range job.Spec.PyTorchReplicaSpecs { // Set default replicas and restart policy. if rType == PyTorchReplicaTypeWorker { - setDefaultWorkerReplicas(spec) + setDefaults_PyTorchJobWorkerReplicas(spec) } if rType == PyTorchReplicaTypeMaster { - setDefaultMasterReplicas(spec) + setDefaults_PyTorchJobMasterReplicas(spec) // Set default port to pytorch container of Master. - setDefaultPort(&spec.Template.Spec) + setDefaults_PyTorchJobPort(&spec.Template.Spec) } } } diff --git a/apis/pytorch/v1/types.go b/apis/training/v1alpha1/pytorchjob_types.go similarity index 54% rename from apis/pytorch/v1/types.go rename to apis/training/v1alpha1/pytorchjob_types.go index 28efc6c1..5bafa061 100644 --- a/apis/pytorch/v1/types.go +++ b/apis/training/v1alpha1/pytorchjob_types.go @@ -1,18 +1,20 @@ -// Copyright 2019 The Kubeflow Authors -// -// 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 v1 +/* +Copyright 2021 The Alibaba Authors. + +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 v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -20,10 +22,36 @@ import ( common "github.com/alibaba/kubedl/pkg/job_controller/api/v1" ) +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// PyTorchJobSpec defines the desired state of PyTorchJob +type PyTorchJobSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + + // RunPolicy encapsulates various runtime policies of the distributed training + // job, for example how to clean up resources and how long the job can stay + // active. + common.RunPolicy `json:",inline"` + + // A map of PyTorchReplicaType (type) to ReplicaSpec (value). Specifies the PyTorch cluster configuration. + // For example, + // { + // "Master": PyTorchReplicaSpec, + // "Worker": PyTorchReplicaSpec, + // } + PyTorchReplicaSpecs map[common.ReplicaType]*common.ReplicaSpec `json:"pytorchReplicaSpecs"` +} + +// PyTorchJobStatus defines the observed state of PyTorchJob +type PyTorchJobStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file +} + // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:defaulter-gen=TypeMeta -// +resource:path=pytorchjob +// +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:resource:scope=Namespaced // +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type` @@ -31,36 +59,22 @@ import ( // +kubebuilder:printcolumn:name="Finished-TTL",type=integer,JSONPath=`.spec.ttlSecondsAfterFinished` // +kubebuilder:printcolumn:name="Max-Lifetime",type=integer,JSONPath=`.spec.activeDeadlineSeconds` -// Represents a PyTorchJob resource. +// PyTorchJob is the Schema for the pytorchjobs API type PyTorchJob struct { - // Standard Kubernetes type metadata. - metav1.TypeMeta `json:",inline"` - - // Standard Kubernetes object's metadata. + metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired state of the PyTorchJob. - Spec PyTorchJobSpec `json:"spec,omitempty"` - - // Most recently observed status of the PyTorchJob. - // Read-only (modified by the system). + Spec PyTorchJobSpec `json:"spec,omitempty"` Status common.JobStatus `json:"status,omitempty"` } -// PyTorchJobSpec is a desired state description of the PyTorchJob. -type PyTorchJobSpec struct { - // RunPolicy encapsulates various runtime policies of the distributed training - // job, for example how to clean up resources and how long the job can stay - // active. - common.RunPolicy `json:",inline"` +// +kubebuilder:object:root=true - // A map of PyTorchReplicaType (type) to ReplicaSpec (value). Specifies the PyTorch cluster configuration. - // For example, - // { - // "Master": PyTorchReplicaSpec, - // "Worker": PyTorchReplicaSpec, - // } - PyTorchReplicaSpecs map[common.ReplicaType]*common.ReplicaSpec `json:"pytorchReplicaSpecs"` +// PyTorchJobList contains a list of PyTorchJob +type PyTorchJobList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []PyTorchJob `json:"items"` } const ( @@ -71,21 +85,6 @@ const ( PyTorchReplicaTypeWorker common.ReplicaType = "Worker" ) -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +resource:path=pytorchjobs - -// PyTorchJobList is a list of PyTorchJobs. -type PyTorchJobList struct { - // Standard type metadata. - metav1.TypeMeta `json:",inline"` - - // Standard list metadata. - metav1.ListMeta `json:"metadata,omitempty"` - - // List of PyTorchJobs. - Items []PyTorchJob `json:"items"` -} - func init() { SchemeBuilder.Register(&PyTorchJob{}, &PyTorchJobList{}) } diff --git a/apis/pytorch/v1/types_test.go b/apis/training/v1alpha1/pytorchjob_types_test.go similarity index 95% rename from apis/pytorch/v1/types_test.go rename to apis/training/v1alpha1/pytorchjob_types_test.go index be558773..ed171697 100644 --- a/apis/pytorch/v1/types_test.go +++ b/apis/training/v1alpha1/pytorchjob_types_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1 +package v1alpha1 import ( "context" @@ -49,8 +49,8 @@ func TestStoragePytorchJob(t *testing.T) { expected := &PyTorchJob{ TypeMeta: metav1.TypeMeta{ - Kind: Kind, - APIVersion: GroupName + "/" + GroupVersion, + Kind: PyTorchJobKind, + APIVersion: GroupVersion.Group + "/" + GroupVersion.Version, }, ObjectMeta: metav1.ObjectMeta{ Name: "foo", diff --git a/apis/tensorflow/v1/constants.go b/apis/training/v1alpha1/tfjob_constants.go similarity index 77% rename from apis/tensorflow/v1/constants.go rename to apis/training/v1alpha1/tfjob_constants.go index f27a06af..3b890a42 100644 --- a/apis/tensorflow/v1/constants.go +++ b/apis/training/v1alpha1/tfjob_constants.go @@ -12,23 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1 +package v1alpha1 import ( common "github.com/alibaba/kubedl/pkg/job_controller/api/v1" ) const ( - // EnvKubeflowNamespace is ENV for kubeflow namespace specified by user. - EnvKubeflowNamespace = "KUBEFLOW_NAMESPACE" - + TFJobKind = "TFJob" // DefaultPortName is name of the port used to communicate between PS and // workers. - DefaultPortName = "tfjob-port" + TFJobDefaultPortName = "tfjob-port" // DefaultContainerName is the name of the TFJob container. - DefaultContainerName = "tensorflow" + TFJobDefaultContainerName = "tensorflow" // DefaultPort is default value of the port. - DefaultPort = 2222 + TFJobDefaultPort = 2222 // DefaultRestartPolicy is default RestartPolicy for TFReplicaSpec. - DefaultRestartPolicy = common.RestartPolicyExitCode + TFJobDefaultRestartPolicy = common.RestartPolicyExitCode ) diff --git a/apis/tensorflow/v1/defaults.go b/apis/training/v1alpha1/tfjob_defaults.go similarity index 62% rename from apis/tensorflow/v1/defaults.go rename to apis/training/v1alpha1/tfjob_defaults.go index 661c3037..eb0a1347 100644 --- a/apis/tensorflow/v1/defaults.go +++ b/apis/training/v1alpha1/tfjob_defaults.go @@ -12,31 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1 +package v1alpha1 import ( "strings" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" + "k8s.io/utils/pointer" ) -// Int32 is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it. -func Int32(v int32) *int32 { - return &v -} - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} - -// setDefaultPort sets the default ports for tensorflow container. -func setDefaultPort(spec *corev1.PodSpec) { +// setDefaults_TFJobPort sets the default ports for tensorflow container. +func setDefaults_TFJobPort(spec *corev1.PodSpec) { index := 0 for i, container := range spec.Containers { - if container.Name == DefaultContainerName { + if container.Name == TFJobDefaultContainerName { index = i break } @@ -44,40 +34,40 @@ func setDefaultPort(spec *corev1.PodSpec) { hasTFJobPort := false for _, port := range spec.Containers[index].Ports { - if port.Name == DefaultPortName { + if port.Name == TFJobDefaultPortName { hasTFJobPort = true break } } if !hasTFJobPort { spec.Containers[index].Ports = append(spec.Containers[index].Ports, corev1.ContainerPort{ - Name: DefaultPortName, - ContainerPort: DefaultPort, + Name: TFJobDefaultPortName, + ContainerPort: TFJobDefaultPort, }) } } func setDefaultReplicas(spec *v1.ReplicaSpec) { if spec.Replicas == nil { - spec.Replicas = Int32(1) + spec.Replicas = pointer.Int32Ptr(1) } if spec.RestartPolicy == "" { - spec.RestartPolicy = DefaultRestartPolicy + spec.RestartPolicy = TFJobDefaultRestartPolicy } } -// setTypeNamesToCamelCase sets the name of all replica types from any case to correct case. -func setTypeNamesToCamelCase(tfJob *TFJob) { - setTypeNameToCamelCase(tfJob, TFReplicaTypePS) - setTypeNameToCamelCase(tfJob, TFReplicaTypeWorker) - setTypeNameToCamelCase(tfJob, TFReplicaTypeChief) - setTypeNameToCamelCase(tfJob, TFReplicaTypeMaster) - setTypeNameToCamelCase(tfJob, TFReplicaTypeEval) +// setTypeNames_TFJob sets the name of all replica types from any case to correct case. +func setTypeNames_TFJob(tfJob *TFJob) { + setTypeName_TFJob(tfJob, TFReplicaTypePS) + setTypeName_TFJob(tfJob, TFReplicaTypeWorker) + setTypeName_TFJob(tfJob, TFReplicaTypeChief) + setTypeName_TFJob(tfJob, TFReplicaTypeMaster) + setTypeName_TFJob(tfJob, TFReplicaTypeEval) } -// setTypeNameToCamelCase sets the name of the replica type from any case to correct case. +// setTypeName_TFJob sets the name of the replica type from any case to correct case. // E.g. from ps to PS; from WORKER to Worker. -func setTypeNameToCamelCase(tfJob *TFJob, typ v1.ReplicaType) { +func setTypeName_TFJob(tfJob *TFJob, typ v1.ReplicaType) { for t := range tfJob.Spec.TFReplicaSpecs { if strings.EqualFold(string(t), string(typ)) && t != typ { spec := tfJob.Spec.TFReplicaSpecs[t] @@ -88,6 +78,15 @@ func setTypeNameToCamelCase(tfJob *TFJob, typ v1.ReplicaType) { } } +func setDefaults_TFJobReplicas(spec *v1.ReplicaSpec) { + if spec.Replicas == nil { + spec.Replicas = pointer.Int32Ptr(1) + } + if spec.RestartPolicy == "" { + spec.RestartPolicy = TFJobDefaultRestartPolicy + } +} + // SetDefaults_TFJob sets any unspecified values to defaults. func SetDefaults_TFJob(tfjob *TFJob) { // Set default cleanpod policy to Running. @@ -103,12 +102,12 @@ func SetDefaults_TFJob(tfjob *TFJob) { } // Update the key of TFReplicaSpecs to camel case. - setTypeNamesToCamelCase(tfjob) + setTypeNames_TFJob(tfjob) for _, spec := range tfjob.Spec.TFReplicaSpecs { // Set default replicas to 1. - setDefaultReplicas(spec) + setDefaults_TFJobReplicas(spec) // Set default port to tensorFlow container. - setDefaultPort(&spec.Template.Spec) + setDefaults_TFJobPort(&spec.Template.Spec) } } diff --git a/apis/tensorflow/v1/defaults_test.go b/apis/training/v1alpha1/tfjob_defaults_test.go similarity index 79% rename from apis/tensorflow/v1/defaults_test.go rename to apis/training/v1alpha1/tfjob_defaults_test.go index 56bc61d2..5271a376 100644 --- a/apis/tensorflow/v1/defaults_test.go +++ b/apis/training/v1alpha1/tfjob_defaults_test.go @@ -12,20 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1 +package v1alpha1 import ( "reflect" "testing" v1 "k8s.io/api/core/v1" + "k8s.io/utils/pointer" common "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/util" ) const ( - testImage = "test-image:latest" + testTFJobImage = "test-image:latest" ) func expectedTFJob(cleanPodPolicy common.CleanPodPolicy, restartPolicy common.RestartPolicy, portName string, port int32) *TFJob { @@ -42,11 +43,11 @@ func expectedTFJob(cleanPodPolicy common.CleanPodPolicy, restartPolicy common.Re } // port set with custom name - if portName != DefaultPortName { + if portName != TFJobDefaultPortName { ports = append(ports, v1.ContainerPort{ - Name: DefaultPortName, - ContainerPort: DefaultPort, + Name: TFJobDefaultPortName, + ContainerPort: TFJobDefaultPort, }, ) } @@ -59,14 +60,14 @@ func expectedTFJob(cleanPodPolicy common.CleanPodPolicy, restartPolicy common.Re RunPolicy: common.RunPolicy{CleanPodPolicy: &cleanPodPolicy}, TFReplicaSpecs: map[common.ReplicaType]*common.ReplicaSpec{ TFReplicaTypeWorker: &common.ReplicaSpec{ - Replicas: Int32(1), + Replicas: pointer.Int32Ptr(1), RestartPolicy: restartPolicy, Template: v1.PodTemplateSpec{ Spec: v1.PodSpec{ Containers: []v1.Container{ { - Name: DefaultContainerName, - Image: testImage, + Name: TFJobDefaultContainerName, + Image: testTFJobImage, Ports: ports, }, }, @@ -78,19 +79,19 @@ func expectedTFJob(cleanPodPolicy common.CleanPodPolicy, restartPolicy common.Re } } -func TestSetTypeNames(t *testing.T) { +func TestSetTypeNames_TFJob(t *testing.T) { spec := &common.ReplicaSpec{ RestartPolicy: common.RestartPolicyAlways, Template: v1.PodTemplateSpec{ Spec: v1.PodSpec{ Containers: []v1.Container{ { - Name: DefaultContainerName, - Image: testImage, + Name: TFJobDefaultContainerName, + Image: testTFJobImage, Ports: []v1.ContainerPort{ { - Name: DefaultPortName, - ContainerPort: DefaultPort, + Name: TFJobDefaultPortName, + ContainerPort: TFJobDefaultPort, }, }, }, @@ -108,7 +109,7 @@ func TestSetTypeNames(t *testing.T) { }, } - setTypeNamesToCamelCase(original) + setTypeNames_TFJob(original) if _, ok := original.Spec.TFReplicaSpecs[workerUpperCase]; ok { t.Errorf("Failed to delete key %s", workerUpperCase) } @@ -117,7 +118,7 @@ func TestSetTypeNames(t *testing.T) { } } -func TestSetDefaultTFJob(t *testing.T) { +func TestSetDefaults_TFJob(t *testing.T) { customPortName := "customPort" var customPort int32 = 1234 customRestartPolicy := common.RestartPolicyAlways @@ -136,12 +137,12 @@ func TestSetDefaultTFJob(t *testing.T) { Spec: v1.PodSpec{ Containers: []v1.Container{ { - Name: DefaultContainerName, - Image: testImage, + Name: TFJobDefaultContainerName, + Image: testTFJobImage, Ports: []v1.ContainerPort{ { - Name: DefaultPortName, - ContainerPort: DefaultPort, + Name: TFJobDefaultPortName, + ContainerPort: TFJobDefaultPort, }, }, }, @@ -152,7 +153,7 @@ func TestSetDefaultTFJob(t *testing.T) { }, }, }, - expected: expectedTFJob(common.CleanPodPolicyRunning, customRestartPolicy, DefaultPortName, DefaultPort), + expected: expectedTFJob(common.CleanPodPolicyRunning, customRestartPolicy, TFJobDefaultPortName, TFJobDefaultPort), }, "set replicas with default restartpolicy": { original: &TFJob{ @@ -163,12 +164,12 @@ func TestSetDefaultTFJob(t *testing.T) { Spec: v1.PodSpec{ Containers: []v1.Container{ { - Name: DefaultContainerName, - Image: testImage, + Name: TFJobDefaultContainerName, + Image: testTFJobImage, Ports: []v1.ContainerPort{ { - Name: DefaultPortName, - ContainerPort: DefaultPort, + Name: TFJobDefaultPortName, + ContainerPort: TFJobDefaultPort, }, }, }, @@ -179,21 +180,21 @@ func TestSetDefaultTFJob(t *testing.T) { }, }, }, - expected: expectedTFJob(common.CleanPodPolicyRunning, DefaultRestartPolicy, DefaultPortName, DefaultPort), + expected: expectedTFJob(common.CleanPodPolicyRunning, TFJobDefaultRestartPolicy, TFJobDefaultPortName, TFJobDefaultPort), }, "set replicas with default port": { original: &TFJob{ Spec: TFJobSpec{ TFReplicaSpecs: map[common.ReplicaType]*common.ReplicaSpec{ TFReplicaTypeWorker: &common.ReplicaSpec{ - Replicas: Int32(1), + Replicas: pointer.Int32Ptr(1), RestartPolicy: customRestartPolicy, Template: v1.PodTemplateSpec{ Spec: v1.PodSpec{ Containers: []v1.Container{ { - Name: DefaultContainerName, - Image: testImage, + Name: TFJobDefaultContainerName, + Image: testTFJobImage, }, }, }, @@ -209,14 +210,14 @@ func TestSetDefaultTFJob(t *testing.T) { Spec: TFJobSpec{ TFReplicaSpecs: map[common.ReplicaType]*common.ReplicaSpec{ TFReplicaTypeWorker: &common.ReplicaSpec{ - Replicas: Int32(1), + Replicas: pointer.Int32Ptr(1), RestartPolicy: customRestartPolicy, Template: v1.PodTemplateSpec{ Spec: v1.PodSpec{ Containers: []v1.Container{ { - Name: DefaultContainerName, - Image: testImage, + Name: TFJobDefaultContainerName, + Image: testTFJobImage, Ports: []v1.ContainerPort{ { Name: customPortName, @@ -239,14 +240,14 @@ func TestSetDefaultTFJob(t *testing.T) { RunPolicy: common.RunPolicy{CleanPodPolicy: cleanPodPolicyPointer(common.CleanPodPolicyAll)}, TFReplicaSpecs: map[common.ReplicaType]*common.ReplicaSpec{ TFReplicaTypeWorker: &common.ReplicaSpec{ - Replicas: Int32(1), + Replicas: pointer.Int32Ptr(1), RestartPolicy: customRestartPolicy, Template: v1.PodTemplateSpec{ Spec: v1.PodSpec{ Containers: []v1.Container{ { - Name: DefaultContainerName, - Image: testImage, + Name: TFJobDefaultContainerName, + Image: testTFJobImage, Ports: []v1.ContainerPort{ { Name: customPortName, @@ -272,8 +273,3 @@ func TestSetDefaultTFJob(t *testing.T) { } } } - -func cleanPodPolicyPointer(cleanPodPolicy common.CleanPodPolicy) *common.CleanPodPolicy { - c := cleanPodPolicy - return &c -} diff --git a/apis/tensorflow/v1/types.go b/apis/training/v1alpha1/tfjob_types.go similarity index 70% rename from apis/tensorflow/v1/types.go rename to apis/training/v1alpha1/tfjob_types.go index 8710027d..df0fbc79 100644 --- a/apis/tensorflow/v1/types.go +++ b/apis/training/v1alpha1/tfjob_types.go @@ -1,53 +1,34 @@ -// Copyright 2019 The Kubeflow Authors -// -// 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 v1 +/* +Copyright 2021 The Alibaba Authors. + +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 v1alpha1 import ( commonv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:defaulter-gen=TypeMeta -// +resource:path=tfjob -// +kubebuilder:subresource:status -// +kubebuilder:resource:scope=Namespaced -// +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type` -// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` -// +kubebuilder:printcolumn:name="Finished-TTL",type=integer,JSONPath=`.spec.ttlSecondsAfterFinished` -// +kubebuilder:printcolumn:name="Max-Lifetime",type=integer,JSONPath=`.spec.activeDeadlineSeconds` +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. -// TFJob represents a TFJob resource. -type TFJob struct { - // Standard Kubernetes type metadata. - metav1.TypeMeta `json:",inline"` - - // Standard Kubernetes object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Specification of the desired state of the TFJob. - Spec TFJobSpec `json:"spec,omitempty"` - - // Most recently observed status of the TFJob. - // Read-only (modified by the system). - Status commonv1.JobStatus `json:"status,omitempty"` -} - -// TFJobSpec is a desired state description of the TFJob. +// TFJobSpec defines the desired state of TFJob type TFJobSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + // RunPolicy encapsulates various runtime policies of the distributed training // job, for example how to clean up resources and how long the job can stay // active. @@ -70,6 +51,24 @@ type TFJobSpec struct { TFReplicaSpecs map[commonv1.ReplicaType]*commonv1.ReplicaSpec `json:"tfReplicaSpecs"` } +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Namespaced +// +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type` +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +// +kubebuilder:printcolumn:name="Finished-TTL",type=integer,JSONPath=`.spec.ttlSecondsAfterFinished` +// +kubebuilder:printcolumn:name="Max-Lifetime",type=integer,JSONPath=`.spec.activeDeadlineSeconds` + +// TFJob is the Schema for the tfjobs API +type TFJob struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TFJobSpec `json:"spec,omitempty"` + Status commonv1.JobStatus `json:"status,omitempty"` +} + // SuccessPolicy is the policy to mark the job as succeeded, when the job does not contain the chief or master role. type SuccessPolicy string @@ -105,19 +104,13 @@ const ( TFReplicaTypeEval commonv1.ReplicaType = "Evaluator" ) -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +resource:path=tfjobs +// +kubebuilder:object:root=true -// TFJobList is a list of TFJobs. +// TFJobList contains a list of TFJob type TFJobList struct { - // Standard type metadata. metav1.TypeMeta `json:",inline"` - - // Standard list metadata. metav1.ListMeta `json:"metadata,omitempty"` - - // List of TFJobs. - Items []TFJob `json:"items"` + Items []TFJob `json:"items"` } func init() { diff --git a/apis/tensorflow/v1/types_test.go b/apis/training/v1alpha1/tfjob_types_test.go similarity index 95% rename from apis/tensorflow/v1/types_test.go rename to apis/training/v1alpha1/tfjob_types_test.go index b25d635b..d463821c 100644 --- a/apis/tensorflow/v1/types_test.go +++ b/apis/training/v1alpha1/tfjob_types_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1 +package v1alpha1 import ( "context" @@ -49,8 +49,8 @@ func TestStorageTFJob(t *testing.T) { expected := &TFJob{ TypeMeta: metav1.TypeMeta{ - Kind: Kind, - APIVersion: GroupName + "/" + GroupVersion, + Kind: TFJobKind, + APIVersion: GroupVersion.Group + "/" + GroupVersion.Version, }, ObjectMeta: metav1.ObjectMeta{ Name: "foo", diff --git a/apis/tensorflow/v1/util.go b/apis/training/v1alpha1/tfjob_util.go similarity index 69% rename from apis/tensorflow/v1/util.go rename to apis/training/v1alpha1/tfjob_util.go index 3deed6af..37434283 100644 --- a/apis/tensorflow/v1/util.go +++ b/apis/training/v1alpha1/tfjob_util.go @@ -12,23 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1 +package v1alpha1 import ( commonv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" ) -// IsChieforMaster returns true if the type is Master or Chief. -func IsChieforMaster(typ commonv1.ReplicaType) bool { +// IsTFJobChieforMaster returns true if the type is Master or Chief. +func IsTFJobChieforMaster(typ commonv1.ReplicaType) bool { return typ == TFReplicaTypeChief || typ == TFReplicaTypeMaster } -// IsWorker returns true if the type is Worker. -func IsWorker(typ commonv1.ReplicaType) bool { +// IsTFJobWorker returns true if the type is Worker. +func IsTFJobWorker(typ commonv1.ReplicaType) bool { return typ == TFReplicaTypeWorker } -// IsEvaluator returns true if the type is Evaluator. -func IsEvaluator(typ commonv1.ReplicaType) bool { +// IsTFJobEvaluator returns true if the type is Evaluator. +func IsTFJobEvaluator(typ commonv1.ReplicaType) bool { return typ == TFReplicaTypeEval } diff --git a/apis/tensorflow/v1/util_test.go b/apis/training/v1alpha1/tfjob_util_test.go similarity index 91% rename from apis/tensorflow/v1/util_test.go rename to apis/training/v1alpha1/tfjob_util_test.go index f9c219bd..b7a88a0a 100644 --- a/apis/tensorflow/v1/util_test.go +++ b/apis/training/v1alpha1/tfjob_util_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1 +package v1alpha1 import ( "testing" @@ -20,7 +20,7 @@ import ( v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" ) -func TestIsChieforMaster(t *testing.T) { +func TestIsTFJobChieforMaster(t *testing.T) { tc := []struct { Type v1.ReplicaType Expected bool @@ -40,7 +40,7 @@ func TestIsChieforMaster(t *testing.T) { } for _, c := range tc { - actual := IsChieforMaster(c.Type) + actual := IsTFJobChieforMaster(c.Type) if actual != c.Expected { t.Errorf("Expected %v; Got %v", c.Expected, actual) } diff --git a/apis/xgboost/v1alpha1/v1alpha1_suite_test.go b/apis/training/v1alpha1/v1alpha1_suite_test.go similarity index 100% rename from apis/xgboost/v1alpha1/v1alpha1_suite_test.go rename to apis/training/v1alpha1/v1alpha1_suite_test.go diff --git a/apis/xdl/v1alpha1/constants.go b/apis/training/v1alpha1/xdljob_constants.go similarity index 72% rename from apis/xdl/v1alpha1/constants.go rename to apis/training/v1alpha1/xdljob_constants.go index cc50153a..45c00b64 100644 --- a/apis/xdl/v1alpha1/constants.go +++ b/apis/training/v1alpha1/xdljob_constants.go @@ -22,14 +22,15 @@ import ( const ( // Field of XDLJobSpec, 0 indicate that job finish util all workers done. - DefaultMinFinishWorkNum int32 = 0 + XDLJobDefaultMinFinishWorkNum int32 = 0 // Field of XDLJobSpec, 90 indicate that job finish util 90% workers done. - DefaultMinFinishWorkRate int32 = 90 + XDLJobDefaultMinFinishWorkRate int32 = 90 // Field of XDLJobSpec, default total failover times of job is 20. - DefaultBackoffLimit int32 = 20 + XDLJobDefaultBackoffLimit int32 = 20 // TODO(qiukai.cqk): ensure default names - DefaultContainerName = "xdl" - DefaultContainerPortName = "xdljob-port" - DefaultPort = 2222 - DefaultRestartPolicy = v1.RestartPolicyNever + XDLJobDefaultContainerName = "xdl" + XDLJobDefaultContainerPortName = "xdljob-port" + XDLJobDefaultPort = 2222 + XDLJobDefaultRestartPolicy = v1.RestartPolicyNever + XDLJobKind = "XDLJob" ) diff --git a/apis/xdl/v1alpha1/defaults.go b/apis/training/v1alpha1/xdljob_defaults.go similarity index 60% rename from apis/xdl/v1alpha1/defaults.go rename to apis/training/v1alpha1/xdljob_defaults.go index 1bb1f454..e63c4b3b 100644 --- a/apis/xdl/v1alpha1/defaults.go +++ b/apis/training/v1alpha1/xdljob_defaults.go @@ -21,20 +21,10 @@ import ( v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" + "k8s.io/utils/pointer" ) -// Int32 is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it. -func Int32(v int32) *int32 { - return &v -} - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} - -func setDefaultXDLJobSpec(spec *XDLJobSpec) { +func setDefaults_XDLJobSpec(spec *XDLJobSpec) { // Set default clean pod policy to Running. if spec.RunPolicy.CleanPodPolicy == nil { running := v1.CleanPodPolicyRunning @@ -43,19 +33,19 @@ func setDefaultXDLJobSpec(spec *XDLJobSpec) { // Set MinFinishWorkerPercentage to default value neither MinFinishWorkerNum nor MinFinishWorkerPercentage // are set. if spec.MinFinishWorkerNum == nil && spec.MinFinishWorkerPercentage == nil { - spec.MinFinishWorkerPercentage = Int32(DefaultMinFinishWorkRate) + spec.MinFinishWorkerPercentage = pointer.Int32Ptr(XDLJobDefaultMinFinishWorkRate) } // Set MaxFailoverTimes to default value if user not manually set. if spec.BackoffLimit == nil { - spec.BackoffLimit = Int32(DefaultBackoffLimit) + spec.BackoffLimit = pointer.Int32Ptr(XDLJobDefaultBackoffLimit) } } -// setDefaultPort sets the default ports for xdl container. -func setDefaultPort(spec *corev1.PodSpec) { +// setDefaults_XDLJobPort sets the default ports for xdl container. +func setDefaults_XDLJobPort(spec *corev1.PodSpec) { index := 0 for i, container := range spec.Containers { - if container.Name == DefaultContainerName { + if container.Name == XDLJobDefaultContainerName { index = i break } @@ -63,38 +53,29 @@ func setDefaultPort(spec *corev1.PodSpec) { hasXDLJobPort := false for _, port := range spec.Containers[index].Ports { - if port.Name == DefaultContainerPortName { + if port.Name == XDLJobDefaultContainerPortName { hasXDLJobPort = true break } } if !hasXDLJobPort { spec.Containers[index].Ports = append(spec.Containers[index].Ports, corev1.ContainerPort{ - Name: DefaultContainerPortName, - ContainerPort: DefaultPort, + Name: XDLJobDefaultContainerPortName, + ContainerPort: XDLJobDefaultPort, }) } } -func setDefaultReplicas(spec *v1.ReplicaSpec) { - if spec.Replicas == nil { - spec.Replicas = Int32(1) - } - if spec.RestartPolicy == "" { - spec.RestartPolicy = DefaultRestartPolicy - } -} - -func setTypeNamesToCamelCase(xdlJob *XDLJob) { - setTypeNameToCamelCase(xdlJob, XDLReplicaTypeWorker) - setTypeNameToCamelCase(xdlJob, XDLReplicaTypePS) - setTypeNameToCamelCase(xdlJob, XDLReplicaTypeScheduler) - setTypeNameToCamelCase(xdlJob, XDLReplicaTypeExtendRole) +func setTypeNames_XDLJob(xdlJob *XDLJob) { + setTypeName_XDLJob(xdlJob, XDLReplicaTypeWorker) + setTypeName_XDLJob(xdlJob, XDLReplicaTypePS) + setTypeName_XDLJob(xdlJob, XDLReplicaTypeScheduler) + setTypeName_XDLJob(xdlJob, XDLReplicaTypeExtendRole) } -// setTypeNameToCamelCase sets the name of the replica type from any case to correct case. +// setTypeName_XDLJob sets the name of the replica type from any case to correct case. // E.g. from ps to PS; from WORKER to Worker. -func setTypeNameToCamelCase(xdlJob *XDLJob, typ v1.ReplicaType) { +func setTypeName_XDLJob(xdlJob *XDLJob, typ v1.ReplicaType) { for t := range xdlJob.Spec.XDLReplicaSpecs { if strings.EqualFold(string(t), string(typ)) && t != typ { spec := xdlJob.Spec.XDLReplicaSpecs[t] @@ -105,15 +86,24 @@ func setTypeNameToCamelCase(xdlJob *XDLJob, typ v1.ReplicaType) { } } +func setDefaults_XDLJobReplicas(spec *v1.ReplicaSpec) { + if spec.Replicas == nil { + spec.Replicas = pointer.Int32Ptr(1) + } + if spec.RestartPolicy == "" { + spec.RestartPolicy = XDLJobDefaultRestartPolicy + } +} + // SetDefaults_XDLJob sets any unspecified values to defaults. func SetDefaults_XDLJob(xdlJob *XDLJob) { - setDefaultXDLJobSpec(&xdlJob.Spec) - setTypeNamesToCamelCase(xdlJob) + setDefaults_XDLJobSpec(&xdlJob.Spec) + setTypeNames_XDLJob(xdlJob) for _, spec := range xdlJob.Spec.XDLReplicaSpecs { // Set default replica and restart policy. - setDefaultReplicas(spec) + setDefaults_XDLJobReplicas(spec) // Set default container port for xdl containers - setDefaultPort(&spec.Template.Spec) + setDefaults_XDLJobPort(&spec.Template.Spec) } } diff --git a/apis/xdl/v1alpha1/defaults_test.go b/apis/training/v1alpha1/xdljob_defaults_test.go similarity index 69% rename from apis/xdl/v1alpha1/defaults_test.go rename to apis/training/v1alpha1/xdljob_defaults_test.go index a1ae5506..fb888e2b 100644 --- a/apis/xdl/v1alpha1/defaults_test.go +++ b/apis/training/v1alpha1/xdljob_defaults_test.go @@ -23,10 +23,11 @@ import ( v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/util" corev1 "k8s.io/api/core/v1" + "k8s.io/utils/pointer" ) const ( - testImage = "test-image:latest" + testXDLImage = "test-image:latest" ) func expectedXDLJob( @@ -50,11 +51,11 @@ func expectedXDLJob( } // port set with custom name - if portName != DefaultContainerPortName { + if portName != XDLJobDefaultContainerPortName { ports = append(ports, corev1.ContainerPort{ - Name: DefaultContainerPortName, - ContainerPort: DefaultPort, + Name: XDLJobDefaultContainerPortName, + ContainerPort: XDLJobDefaultPort, }, ) } @@ -67,14 +68,14 @@ func expectedXDLJob( }, XDLReplicaSpecs: map[v1.ReplicaType]*v1.ReplicaSpec{ XDLReplicaTypeWorker: &v1.ReplicaSpec{ - Replicas: Int32(1), + Replicas: pointer.Int32Ptr(1), RestartPolicy: restartPolicy, Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: DefaultContainerName, - Image: testImage, + Name: XDLJobDefaultContainerName, + Image: testXDLImage, Ports: ports, }, }, @@ -88,19 +89,19 @@ func expectedXDLJob( } } -func TestSetTypeNames(t *testing.T) { +func TestSetTypeNames_XDLJob(t *testing.T) { spec := &v1.ReplicaSpec{ RestartPolicy: v1.RestartPolicyAlways, Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: DefaultContainerName, - Image: testImage, + Name: XDLJobDefaultContainerName, + Image: testXDLImage, Ports: []corev1.ContainerPort{ { - Name: DefaultContainerPortName, - ContainerPort: DefaultPort, + Name: XDLJobDefaultContainerPortName, + ContainerPort: XDLJobDefaultPort, }, }, }, @@ -112,16 +113,16 @@ func TestSetTypeNames(t *testing.T) { workerUpperCase := v1.ReplicaType("WORKER") original := &XDLJob{ Spec: XDLJobSpec{ - RunPolicy: v1.RunPolicy{BackoffLimit: Int32(DefaultBackoffLimit)}, + RunPolicy: v1.RunPolicy{BackoffLimit: pointer.Int32Ptr(XDLJobDefaultBackoffLimit)}, XDLReplicaSpecs: map[v1.ReplicaType]*v1.ReplicaSpec{ workerUpperCase: spec, }, - MinFinishWorkerNum: Int32(DefaultMinFinishWorkNum), - MinFinishWorkerPercentage: Int32(DefaultMinFinishWorkRate), + MinFinishWorkerNum: pointer.Int32Ptr(XDLJobDefaultMinFinishWorkNum), + MinFinishWorkerPercentage: pointer.Int32Ptr(XDLJobDefaultMinFinishWorkRate), }, } - setTypeNamesToCamelCase(original) + setTypeNames_XDLJob(original) if _, ok := original.Spec.XDLReplicaSpecs[workerUpperCase]; ok { t.Errorf("Failed to delete key %s", workerUpperCase) } @@ -130,13 +131,13 @@ func TestSetTypeNames(t *testing.T) { } } -func TestSetDefaultTFJob(t *testing.T) { +func TestSetDefaults_XDLJob(t *testing.T) { customPortName := "customPort" var customPort int32 = 1234 customRestartPolicy := v1.RestartPolicyAlways - customMinFinishWorkNum := Int32(10) - customMinFinishWorkRate := Int32(100) - customBackoffLimit := Int32(100) + customMinFinishWorkNum := pointer.Int32Ptr(10) + customMinFinishWorkRate := pointer.Int32Ptr(100) + customBackoffLimit := pointer.Int32Ptr(100) testCases := map[string]struct { original *XDLJob @@ -152,12 +153,12 @@ func TestSetDefaultTFJob(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ corev1.Container{ - Name: DefaultContainerName, - Image: testImage, + Name: XDLJobDefaultContainerName, + Image: testXDLImage, Ports: []corev1.ContainerPort{ corev1.ContainerPort{ - Name: DefaultContainerPortName, - ContainerPort: DefaultPort, + Name: XDLJobDefaultContainerPortName, + ContainerPort: XDLJobDefaultPort, }, }, }, @@ -171,11 +172,11 @@ func TestSetDefaultTFJob(t *testing.T) { expected: expectedXDLJob( v1.CleanPodPolicyRunning, customRestartPolicy, - DefaultContainerPortName, - DefaultPort, + XDLJobDefaultContainerPortName, + XDLJobDefaultPort, nil, - Int32(DefaultMinFinishWorkRate), - Int32(DefaultBackoffLimit), + pointer.Int32Ptr(XDLJobDefaultMinFinishWorkRate), + pointer.Int32Ptr(XDLJobDefaultBackoffLimit), ), }, "set replicas with default restart policy": { @@ -187,12 +188,12 @@ func TestSetDefaultTFJob(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ corev1.Container{ - Name: DefaultContainerName, - Image: testImage, + Name: XDLJobDefaultContainerName, + Image: testXDLImage, Ports: []corev1.ContainerPort{ corev1.ContainerPort{ - Name: DefaultContainerPortName, - ContainerPort: DefaultPort, + Name: XDLJobDefaultContainerPortName, + ContainerPort: XDLJobDefaultPort, }, }, }, @@ -205,12 +206,12 @@ func TestSetDefaultTFJob(t *testing.T) { }, expected: expectedXDLJob( v1.CleanPodPolicyRunning, - DefaultRestartPolicy, - DefaultContainerPortName, - DefaultPort, + XDLJobDefaultRestartPolicy, + XDLJobDefaultContainerPortName, + XDLJobDefaultPort, nil, - Int32(DefaultMinFinishWorkRate), - Int32(DefaultBackoffLimit), + pointer.Int32Ptr(XDLJobDefaultMinFinishWorkRate), + pointer.Int32Ptr(XDLJobDefaultBackoffLimit), ), }, "set replicas with default port": { @@ -218,14 +219,14 @@ func TestSetDefaultTFJob(t *testing.T) { Spec: XDLJobSpec{ XDLReplicaSpecs: map[v1.ReplicaType]*v1.ReplicaSpec{ XDLReplicaTypeWorker: &v1.ReplicaSpec{ - Replicas: Int32(1), + Replicas: pointer.Int32Ptr(1), RestartPolicy: customRestartPolicy, Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ corev1.Container{ - Name: DefaultContainerName, - Image: testImage, + Name: XDLJobDefaultContainerName, + Image: testXDLImage, }, }, }, @@ -240,8 +241,8 @@ func TestSetDefaultTFJob(t *testing.T) { "", 0, nil, - Int32(DefaultMinFinishWorkRate), - Int32(DefaultBackoffLimit), + pointer.Int32Ptr(XDLJobDefaultMinFinishWorkRate), + pointer.Int32Ptr(XDLJobDefaultBackoffLimit), ), }, "set replicas adding default port": { @@ -249,14 +250,14 @@ func TestSetDefaultTFJob(t *testing.T) { Spec: XDLJobSpec{ XDLReplicaSpecs: map[v1.ReplicaType]*v1.ReplicaSpec{ XDLReplicaTypeWorker: &v1.ReplicaSpec{ - Replicas: Int32(1), + Replicas: pointer.Int32Ptr(1), RestartPolicy: customRestartPolicy, Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ corev1.Container{ - Name: DefaultContainerName, - Image: testImage, + Name: XDLJobDefaultContainerName, + Image: testXDLImage, Ports: []corev1.ContainerPort{ corev1.ContainerPort{ Name: customPortName, @@ -277,8 +278,8 @@ func TestSetDefaultTFJob(t *testing.T) { customPortName, customPort, nil, - Int32(DefaultMinFinishWorkRate), - Int32(DefaultBackoffLimit), + pointer.Int32Ptr(XDLJobDefaultMinFinishWorkRate), + pointer.Int32Ptr(XDLJobDefaultBackoffLimit), ), }, "set custom clean pod policy": { @@ -287,14 +288,14 @@ func TestSetDefaultTFJob(t *testing.T) { RunPolicy: v1.RunPolicy{CleanPodPolicy: cleanPodPolicyPointer(v1.CleanPodPolicyAll)}, XDLReplicaSpecs: map[v1.ReplicaType]*v1.ReplicaSpec{ XDLReplicaTypeWorker: &v1.ReplicaSpec{ - Replicas: Int32(1), + Replicas: pointer.Int32Ptr(1), RestartPolicy: customRestartPolicy, Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ corev1.Container{ - Name: DefaultContainerName, - Image: testImage, + Name: XDLJobDefaultContainerName, + Image: testXDLImage, Ports: []corev1.ContainerPort{ corev1.ContainerPort{ Name: customPortName, @@ -314,8 +315,8 @@ func TestSetDefaultTFJob(t *testing.T) { customPortName, customPort, nil, - Int32(DefaultMinFinishWorkRate), - Int32(DefaultBackoffLimit), + pointer.Int32Ptr(XDLJobDefaultMinFinishWorkRate), + pointer.Int32Ptr(XDLJobDefaultBackoffLimit), ), }, "set default min finish attributes": { @@ -327,12 +328,12 @@ func TestSetDefaultTFJob(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ corev1.Container{ - Name: DefaultContainerName, - Image: testImage, + Name: XDLJobDefaultContainerName, + Image: testXDLImage, Ports: []corev1.ContainerPort{ corev1.ContainerPort{ - Name: DefaultContainerPortName, - ContainerPort: DefaultPort, + Name: XDLJobDefaultContainerPortName, + ContainerPort: XDLJobDefaultPort, }, }, }, @@ -345,12 +346,12 @@ func TestSetDefaultTFJob(t *testing.T) { }, expected: expectedXDLJob( v1.CleanPodPolicyRunning, - DefaultRestartPolicy, - DefaultContainerPortName, - DefaultPort, + XDLJobDefaultRestartPolicy, + XDLJobDefaultContainerPortName, + XDLJobDefaultPort, nil, - Int32(DefaultMinFinishWorkRate), - Int32(DefaultBackoffLimit), + pointer.Int32Ptr(XDLJobDefaultMinFinishWorkRate), + pointer.Int32Ptr(XDLJobDefaultBackoffLimit), ), }, "set add min finish work num": { @@ -362,12 +363,12 @@ func TestSetDefaultTFJob(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ corev1.Container{ - Name: DefaultContainerName, - Image: testImage, + Name: XDLJobDefaultContainerName, + Image: testXDLImage, Ports: []corev1.ContainerPort{ corev1.ContainerPort{ - Name: DefaultContainerPortName, - ContainerPort: DefaultPort, + Name: XDLJobDefaultContainerPortName, + ContainerPort: XDLJobDefaultPort, }, }, }, @@ -381,12 +382,12 @@ func TestSetDefaultTFJob(t *testing.T) { }, expected: expectedXDLJob( v1.CleanPodPolicyRunning, - DefaultRestartPolicy, - DefaultContainerPortName, - DefaultPort, + XDLJobDefaultRestartPolicy, + XDLJobDefaultContainerPortName, + XDLJobDefaultPort, customMinFinishWorkNum, nil, - Int32(DefaultBackoffLimit), + pointer.Int32Ptr(XDLJobDefaultBackoffLimit), ), }, "set add min finish work percentage": { @@ -398,12 +399,12 @@ func TestSetDefaultTFJob(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ corev1.Container{ - Name: DefaultContainerName, - Image: testImage, + Name: XDLJobDefaultContainerName, + Image: testXDLImage, Ports: []corev1.ContainerPort{ corev1.ContainerPort{ - Name: DefaultContainerPortName, - ContainerPort: DefaultPort, + Name: XDLJobDefaultContainerPortName, + ContainerPort: XDLJobDefaultPort, }, }, }, @@ -417,12 +418,12 @@ func TestSetDefaultTFJob(t *testing.T) { }, expected: expectedXDLJob( v1.CleanPodPolicyRunning, - DefaultRestartPolicy, - DefaultContainerPortName, - DefaultPort, + XDLJobDefaultRestartPolicy, + XDLJobDefaultContainerPortName, + XDLJobDefaultPort, nil, customMinFinishWorkRate, - Int32(DefaultBackoffLimit), + pointer.Int32Ptr(XDLJobDefaultBackoffLimit), ), }, "set add backoff limit": { @@ -434,12 +435,12 @@ func TestSetDefaultTFJob(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ corev1.Container{ - Name: DefaultContainerName, - Image: testImage, + Name: XDLJobDefaultContainerName, + Image: testXDLImage, Ports: []corev1.ContainerPort{ corev1.ContainerPort{ - Name: DefaultContainerPortName, - ContainerPort: DefaultPort, + Name: XDLJobDefaultContainerPortName, + ContainerPort: XDLJobDefaultPort, }, }, }, @@ -453,11 +454,11 @@ func TestSetDefaultTFJob(t *testing.T) { }, expected: expectedXDLJob( v1.CleanPodPolicyRunning, - DefaultRestartPolicy, - DefaultContainerPortName, - DefaultPort, + XDLJobDefaultRestartPolicy, + XDLJobDefaultContainerPortName, + XDLJobDefaultPort, nil, - Int32(DefaultMinFinishWorkRate), + pointer.Int32Ptr(XDLJobDefaultMinFinishWorkRate), customBackoffLimit, ), }, @@ -470,12 +471,12 @@ func TestSetDefaultTFJob(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ corev1.Container{ - Name: DefaultContainerName, - Image: testImage, + Name: XDLJobDefaultContainerName, + Image: testXDLImage, Ports: []corev1.ContainerPort{ corev1.ContainerPort{ - Name: DefaultContainerPortName, - ContainerPort: DefaultPort, + Name: XDLJobDefaultContainerPortName, + ContainerPort: XDLJobDefaultPort, }, }, }, @@ -488,12 +489,12 @@ func TestSetDefaultTFJob(t *testing.T) { }, expected: expectedXDLJob( v1.CleanPodPolicyRunning, - DefaultRestartPolicy, - DefaultContainerPortName, - DefaultPort, + XDLJobDefaultRestartPolicy, + XDLJobDefaultContainerPortName, + XDLJobDefaultPort, nil, - Int32(DefaultMinFinishWorkRate), - Int32(DefaultBackoffLimit), + pointer.Int32Ptr(XDLJobDefaultMinFinishWorkRate), + pointer.Int32Ptr(XDLJobDefaultBackoffLimit), ), }, } @@ -505,7 +506,3 @@ func TestSetDefaultTFJob(t *testing.T) { } } } - -func cleanPodPolicyPointer(cleanPodPolicy v1.CleanPodPolicy) *v1.CleanPodPolicy { - return &cleanPodPolicy -} diff --git a/apis/xdl/v1alpha1/types.go b/apis/training/v1alpha1/xdljob_types.go similarity index 84% rename from apis/xdl/v1alpha1/types.go rename to apis/training/v1alpha1/xdljob_types.go index 23f1a4b2..5205a0c4 100644 --- a/apis/xdl/v1alpha1/types.go +++ b/apis/training/v1alpha1/xdljob_types.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Alibaba Authors. +Copyright 2021 The Alibaba Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,8 +21,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + // XDLJobSpec defines the desired state of XDLJob type XDLJobSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + // RunPolicy encapsulates various runtime policies of the distributed training // job, for example how to clean up resources and how long the job can stay // active. @@ -49,10 +55,14 @@ type XDLJobSpec struct { MinFinishWorkerPercentage *int32 `json:"minFinishWorkRate,omitempty"` } +// XDLJobStatus defines the observed state of XDLJob +type XDLJobStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file +} + // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:defaulter-gen=TypeMeta -// +resource:path=xdljob +// +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:resource:scope=Namespaced // +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type` @@ -61,7 +71,6 @@ type XDLJobSpec struct { // +kubebuilder:printcolumn:name="Max-Lifetime",type=integer,JSONPath=`.spec.activeDeadlineSeconds` // XDLJob is the Schema for the xdljobs API -// +k8s:openapi-gen=true type XDLJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -70,7 +79,7 @@ type XDLJob struct { Status v1.JobStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // XDLJobList contains a list of XDLJob type XDLJobList struct { diff --git a/apis/xdl/v1alpha1/types_test.go b/apis/training/v1alpha1/xdljob_types_test.go similarity index 94% rename from apis/xdl/v1alpha1/types_test.go rename to apis/training/v1alpha1/xdljob_types_test.go index f60e86e6..1b2ad4fd 100644 --- a/apis/xdl/v1alpha1/types_test.go +++ b/apis/training/v1alpha1/xdljob_types_test.go @@ -20,7 +20,7 @@ import ( "context" "testing" - "github.com/alibaba/kubedl/pkg/job_controller/api/v1" + v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -50,8 +50,8 @@ func TestStorageXDLJob(t *testing.T) { expected := &XDLJob{ TypeMeta: metav1.TypeMeta{ - Kind: Kind, - APIVersion: GroupName + "/" + GroupVersion, + Kind: XDLJobKind, + APIVersion: GroupVersion.Group + "/" + GroupVersion.Version, }, ObjectMeta: metav1.ObjectMeta{ Name: "foo", diff --git a/apis/xdl/v1alpha1/v1alpha1_suite_test.go b/apis/training/v1alpha1/xgboostjob_constants.go similarity index 57% rename from apis/xdl/v1alpha1/v1alpha1_suite_test.go rename to apis/training/v1alpha1/xgboostjob_constants.go index 22aa012f..59b1f433 100644 --- a/apis/xdl/v1alpha1/v1alpha1_suite_test.go +++ b/apis/training/v1alpha1/xgboostjob_constants.go @@ -1,5 +1,4 @@ /* -Copyright 2019 The Alibaba Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,26 +16,15 @@ limitations under the License. package v1alpha1 import ( - "log" - "os" - "testing" - - "k8s.io/client-go/kubernetes/scheme" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/fake" + v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" ) -var c client.Client - -func TestMain(m *testing.M) { - - err := SchemeBuilder.AddToScheme(scheme.Scheme) - if err != nil { - log.Fatal(err) - } - - c = fake.NewFakeClientWithScheme(scheme.Scheme) - - code := m.Run() - os.Exit(code) -} +const ( + // Kind is the kind name. + XGBoostJobKind = "XGBoostJob" + XGBoostJobDefaultContainerName = "xgboostjob" + XGBoostJobDefaultContainerPortName = "xgboostjob-port" + XGBoostJobDefaultPort = 9999 + XGBoostJobDefaultTTLseconds = int32(100) + XGBoostJobDefaultCleanPodPolicy = v1.CleanPodPolicyNone +) diff --git a/apis/xgboost/v1alpha1/defaults.go b/apis/training/v1alpha1/xgboostjob_defaults.go similarity index 58% rename from apis/xgboost/v1alpha1/defaults.go rename to apis/training/v1alpha1/xgboostjob_defaults.go index 28ba2a25..02cbb050 100644 --- a/apis/xgboost/v1alpha1/defaults.go +++ b/apis/training/v1alpha1/xgboostjob_defaults.go @@ -17,40 +17,31 @@ limitations under the License. package v1alpha1 import ( - v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "strings" + v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" + corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" + "k8s.io/utils/pointer" ) -// Int32 is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it. -func Int32(v int32) *int32 { - return &v -} - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} - -func setDefaultXGBJobSpec(spec *XGBoostJobSpec) { +func setDefaults_XGBoostJobSpec(spec *XGBoostJobSpec) { // Set default clean pod policy to Running. if spec.RunPolicy.CleanPodPolicy == nil { - policy := DefaultCleanPodPolicy + policy := XGBoostJobDefaultCleanPodPolicy spec.RunPolicy.CleanPodPolicy = &policy } if spec.RunPolicy.TTLSecondsAfterFinished == nil { - ttl := DefaultTTLseconds + ttl := XGBoostJobDefaultTTLseconds spec.RunPolicy.TTLSecondsAfterFinished = &ttl } } -// setDefaultPort sets the default ports for xgboost container. -func setDefaultPort(spec *corev1.PodSpec) { +// setDefaults_XGBoostJobPort sets the default ports for xgboost container. +func setDefaults_XGBoostJobPort(spec *corev1.PodSpec) { index := 0 for i, container := range spec.Containers { - if container.Name == DefaultContainerName { + if container.Name == XGBoostJobDefaultContainerName { index = i break } @@ -58,33 +49,27 @@ func setDefaultPort(spec *corev1.PodSpec) { hasJobPort := false for _, port := range spec.Containers[index].Ports { - if port.Name == DefaultContainerPortName { + if port.Name == XGBoostJobDefaultContainerPortName { hasJobPort = true break } } if !hasJobPort { spec.Containers[index].Ports = append(spec.Containers[index].Ports, corev1.ContainerPort{ - Name: DefaultContainerPortName, - ContainerPort: DefaultPort, + Name: XGBoostJobDefaultContainerPortName, + ContainerPort: XGBoostJobDefaultPort, }) } } -func setDefaultReplicas(spec *v1.ReplicaSpec) { - if spec.Replicas == nil { - spec.Replicas = Int32(1) - } -} - -func setTypeNamesToCamelCase(xgbJob *XGBoostJob) { - setTypeNameToCamelCase(xgbJob, XGBoostReplicaTypeMaster) - setTypeNameToCamelCase(xgbJob, XGBoostReplicaTypeWorker) +func setTypeNames_XGBoostJob(xgbJob *XGBoostJob) { + setTypeName_XGBoostJob(xgbJob, XGBoostReplicaTypeMaster) + setTypeName_XGBoostJob(xgbJob, XGBoostReplicaTypeWorker) } -// setTypeNameToCamelCase sets the name of the replica type from any case to correct case. +// setTypeName_XGBoostJob sets the name of the replica type from any case to correct case. // E.g. from ps to PS; from WORKER to Worker. -func setTypeNameToCamelCase(xgbJob *XGBoostJob, typ v1.ReplicaType) { +func setTypeName_XGBoostJob(xgbJob *XGBoostJob, typ v1.ReplicaType) { for t := range xgbJob.Spec.XGBReplicaSpecs { if strings.EqualFold(string(t), string(typ)) && t != typ { spec := xgbJob.Spec.XGBReplicaSpecs[t] @@ -95,15 +80,21 @@ func setTypeNameToCamelCase(xgbJob *XGBoostJob, typ v1.ReplicaType) { } } -// SetDefaults_XGBJob sets any unspecified values to defaults. -func SetDefaults_XGBJob(xgbJob *XGBoostJob) { - setDefaultXGBJobSpec(&xgbJob.Spec) - setTypeNamesToCamelCase(xgbJob) +func setDefaults_XGBoostJobReplicas(spec *v1.ReplicaSpec) { + if spec.Replicas == nil { + spec.Replicas = pointer.Int32Ptr(1) + } +} + +// SetDefaults_XGBoostJob sets any unspecified values to defaults. +func SetDefaults_XGBoostJob(xgbJob *XGBoostJob) { + setDefaults_XGBoostJobSpec(&xgbJob.Spec) + setTypeNames_XGBoostJob(xgbJob) for _, spec := range xgbJob.Spec.XGBReplicaSpecs { // Set default replica and restart policy. - setDefaultReplicas(spec) + setDefaults_XGBoostJobReplicas(spec) // Set default container port for xgboost containers - setDefaultPort(&spec.Template.Spec) + setDefaults_XGBoostJobPort(&spec.Template.Spec) } } diff --git a/apis/xgboost/v1alpha1/types.go b/apis/training/v1alpha1/xgboostjob_types.go similarity index 87% rename from apis/xgboost/v1alpha1/types.go rename to apis/training/v1alpha1/xgboostjob_types.go index c189d2e1..30b98096 100644 --- a/apis/xgboost/v1alpha1/types.go +++ b/apis/training/v1alpha1/xgboostjob_types.go @@ -1,4 +1,5 @@ /* +Copyright 2021 The Alibaba Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,8 +21,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + // XGBoostJobSpec defines the desired state of XGBoostJob type XGBoostJobSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + // RunPolicy encapsulates various runtime policies of the distributed training // job, for example how to clean up resources and how long the job can stay // active. @@ -41,13 +48,12 @@ type XGBoostJobSpec struct { type XGBoostJobStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file + commonv1.JobStatus `json:",inline"` } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:defaulter-gen=TypeMeta -// +resource:path=xgboostjob +// +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:resource:scope=Namespaced // +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type` @@ -56,7 +62,6 @@ type XGBoostJobStatus struct { // +kubebuilder:printcolumn:name="Max-Lifetime",type=integer,JSONPath=`.spec.activeDeadlineSeconds` // XGBoostJob is the Schema for the xgboostjobs API -// +k8s:openapi-gen=true type XGBoostJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -65,7 +70,7 @@ type XGBoostJob struct { Status XGBoostJobStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // XGBoostJobList contains a list of XGBoostJob type XGBoostJobList struct { diff --git a/apis/xgboost/v1alpha1/types_test.go b/apis/training/v1alpha1/xgboostjob_types_test.go similarity index 96% rename from apis/xgboost/v1alpha1/types_test.go rename to apis/training/v1alpha1/xgboostjob_types_test.go index 46b27204..8d04f16c 100644 --- a/apis/xgboost/v1alpha1/types_test.go +++ b/apis/training/v1alpha1/xgboostjob_types_test.go @@ -53,8 +53,8 @@ func TestStorageXGBoostJob(t *testing.T) { // Test Create expected := &XGBoostJob{ TypeMeta: metav1.TypeMeta{ - Kind: Kind, - APIVersion: "xgboostjob.kubeflow.org/v1alpha1", + Kind: XGBoostJobKind, + APIVersion: "training.kubedl.io/v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: "foo", diff --git a/apis/training/v1alpha1/zz_generated.deepcopy.go b/apis/training/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..b561c429 --- /dev/null +++ b/apis/training/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,889 @@ +// +build !ignore_autogenerated + +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "github.com/alibaba/kubedl/pkg/job_controller/api/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ElasticDLJob) DeepCopyInto(out *ElasticDLJob) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticDLJob. +func (in *ElasticDLJob) DeepCopy() *ElasticDLJob { + if in == nil { + return nil + } + out := new(ElasticDLJob) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ElasticDLJob) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ElasticDLJobList) DeepCopyInto(out *ElasticDLJobList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ElasticDLJob, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticDLJobList. +func (in *ElasticDLJobList) DeepCopy() *ElasticDLJobList { + if in == nil { + return nil + } + out := new(ElasticDLJobList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ElasticDLJobList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ElasticDLJobSpec) DeepCopyInto(out *ElasticDLJobSpec) { + *out = *in + in.RunPolicy.DeepCopyInto(&out.RunPolicy) + if in.ElasticDLReplicaSpecs != nil { + in, out := &in.ElasticDLReplicaSpecs, &out.ElasticDLReplicaSpecs + *out = make(map[v1.ReplicaType]*v1.ReplicaSpec, len(*in)) + for key, val := range *in { + var outVal *v1.ReplicaSpec + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(v1.ReplicaSpec) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticDLJobSpec. +func (in *ElasticDLJobSpec) DeepCopy() *ElasticDLJobSpec { + if in == nil { + return nil + } + out := new(ElasticDLJobSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LegacyV1Alpha1) DeepCopyInto(out *LegacyV1Alpha1) { + *out = *in + if in.DeprecatedGPUs != nil { + in, out := &in.DeprecatedGPUs, &out.DeprecatedGPUs + *out = new(int32) + **out = **in + } + if in.GPUsPerNode != nil { + in, out := &in.GPUsPerNode, &out.GPUsPerNode + *out = new(int32) + **out = **in + } + if in.ProcessingUnits != nil { + in, out := &in.ProcessingUnits, &out.ProcessingUnits + *out = new(int32) + **out = **in + } + if in.ProcessingUnitsPerNode != nil { + in, out := &in.ProcessingUnitsPerNode, &out.ProcessingUnitsPerNode + *out = new(int32) + **out = **in + } + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + in.Template.DeepCopyInto(&out.Template) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LegacyV1Alpha1. +func (in *LegacyV1Alpha1) DeepCopy() *LegacyV1Alpha1 { + if in == nil { + return nil + } + out := new(LegacyV1Alpha1) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LegacyV1Alpha2) DeepCopyInto(out *LegacyV1Alpha2) { + *out = *in + if in.MPIDistribution != nil { + in, out := &in.MPIDistribution, &out.MPIDistribution + *out = new(MPIDistributionType) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LegacyV1Alpha2. +func (in *LegacyV1Alpha2) DeepCopy() *LegacyV1Alpha2 { + if in == nil { + return nil + } + out := new(LegacyV1Alpha2) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MPIJob) DeepCopyInto(out *MPIJob) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MPIJob. +func (in *MPIJob) DeepCopy() *MPIJob { + if in == nil { + return nil + } + out := new(MPIJob) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MPIJob) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MPIJobLegacySpec) DeepCopyInto(out *MPIJobLegacySpec) { + *out = *in + if in.RunPolicy != nil { + in, out := &in.RunPolicy, &out.RunPolicy + *out = new(v1.RunPolicy) + (*in).DeepCopyInto(*out) + } + if in.LegacyV1Alpha1 != nil { + in, out := &in.LegacyV1Alpha1, &out.LegacyV1Alpha1 + *out = new(LegacyV1Alpha1) + (*in).DeepCopyInto(*out) + } + if in.LegacyV1Alpha2 != nil { + in, out := &in.LegacyV1Alpha2, &out.LegacyV1Alpha2 + *out = new(LegacyV1Alpha2) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MPIJobLegacySpec. +func (in *MPIJobLegacySpec) DeepCopy() *MPIJobLegacySpec { + if in == nil { + return nil + } + out := new(MPIJobLegacySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MPIJobList) DeepCopyInto(out *MPIJobList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MPIJob, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MPIJobList. +func (in *MPIJobList) DeepCopy() *MPIJobList { + if in == nil { + return nil + } + out := new(MPIJobList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MPIJobList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MPIJobSpec) DeepCopyInto(out *MPIJobSpec) { + *out = *in + if in.SlotsPerWorker != nil { + in, out := &in.SlotsPerWorker, &out.SlotsPerWorker + *out = new(int32) + **out = **in + } + if in.MPIReplicaSpecs != nil { + in, out := &in.MPIReplicaSpecs, &out.MPIReplicaSpecs + *out = make(map[v1.ReplicaType]*v1.ReplicaSpec, len(*in)) + for key, val := range *in { + var outVal *v1.ReplicaSpec + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(v1.ReplicaSpec) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } + in.RunPolicy.DeepCopyInto(&out.RunPolicy) + if in.MPIJobLegacySpec != nil { + in, out := &in.MPIJobLegacySpec, &out.MPIJobLegacySpec + *out = new(MPIJobLegacySpec) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MPIJobSpec. +func (in *MPIJobSpec) DeepCopy() *MPIJobSpec { + if in == nil { + return nil + } + out := new(MPIJobSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MarsJob) DeepCopyInto(out *MarsJob) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsJob. +func (in *MarsJob) DeepCopy() *MarsJob { + if in == nil { + return nil + } + out := new(MarsJob) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MarsJob) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MarsJobList) DeepCopyInto(out *MarsJobList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MarsJob, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsJobList. +func (in *MarsJobList) DeepCopy() *MarsJobList { + if in == nil { + return nil + } + out := new(MarsJobList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MarsJobList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MarsJobSpec) DeepCopyInto(out *MarsJobSpec) { + *out = *in + in.RunPolicy.DeepCopyInto(&out.RunPolicy) + if in.WorkerMemoryTuningPolicy != nil { + in, out := &in.WorkerMemoryTuningPolicy, &out.WorkerMemoryTuningPolicy + *out = new(MarsWorkerMemoryTuningPolicy) + (*in).DeepCopyInto(*out) + } + if in.WebHost != nil { + in, out := &in.WebHost, &out.WebHost + *out = new(string) + **out = **in + } + if in.MarsReplicaSpecs != nil { + in, out := &in.MarsReplicaSpecs, &out.MarsReplicaSpecs + *out = make(map[v1.ReplicaType]*v1.ReplicaSpec, len(*in)) + for key, val := range *in { + var outVal *v1.ReplicaSpec + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(v1.ReplicaSpec) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsJobSpec. +func (in *MarsJobSpec) DeepCopy() *MarsJobSpec { + if in == nil { + return nil + } + out := new(MarsJobSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MarsJobStatus) DeepCopyInto(out *MarsJobStatus) { + *out = *in + in.JobStatus.DeepCopyInto(&out.JobStatus) + if in.WebServiceAddresses != nil { + in, out := &in.WebServiceAddresses, &out.WebServiceAddresses + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsJobStatus. +func (in *MarsJobStatus) DeepCopy() *MarsJobStatus { + if in == nil { + return nil + } + out := new(MarsJobStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MarsWorkerMemoryTuningPolicy) DeepCopyInto(out *MarsWorkerMemoryTuningPolicy) { + *out = *in + if in.PlasmaStore != nil { + in, out := &in.PlasmaStore, &out.PlasmaStore + *out = new(string) + **out = **in + } + if in.LockFreeFileIO != nil { + in, out := &in.LockFreeFileIO, &out.LockFreeFileIO + *out = new(bool) + **out = **in + } + if in.SpillDirs != nil { + in, out := &in.SpillDirs, &out.SpillDirs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.WorkerCachePercentage != nil { + in, out := &in.WorkerCachePercentage, &out.WorkerCachePercentage + *out = new(int32) + **out = **in + } + if in.WorkerCacheSize != nil { + in, out := &in.WorkerCacheSize, &out.WorkerCacheSize + x := (*in).DeepCopy() + *out = &x + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsWorkerMemoryTuningPolicy. +func (in *MarsWorkerMemoryTuningPolicy) DeepCopy() *MarsWorkerMemoryTuningPolicy { + if in == nil { + return nil + } + out := new(MarsWorkerMemoryTuningPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PyTorchJob) DeepCopyInto(out *PyTorchJob) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PyTorchJob. +func (in *PyTorchJob) DeepCopy() *PyTorchJob { + if in == nil { + return nil + } + out := new(PyTorchJob) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PyTorchJob) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PyTorchJobList) DeepCopyInto(out *PyTorchJobList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PyTorchJob, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PyTorchJobList. +func (in *PyTorchJobList) DeepCopy() *PyTorchJobList { + if in == nil { + return nil + } + out := new(PyTorchJobList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PyTorchJobList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PyTorchJobSpec) DeepCopyInto(out *PyTorchJobSpec) { + *out = *in + in.RunPolicy.DeepCopyInto(&out.RunPolicy) + if in.PyTorchReplicaSpecs != nil { + in, out := &in.PyTorchReplicaSpecs, &out.PyTorchReplicaSpecs + *out = make(map[v1.ReplicaType]*v1.ReplicaSpec, len(*in)) + for key, val := range *in { + var outVal *v1.ReplicaSpec + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(v1.ReplicaSpec) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PyTorchJobSpec. +func (in *PyTorchJobSpec) DeepCopy() *PyTorchJobSpec { + if in == nil { + return nil + } + out := new(PyTorchJobSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PyTorchJobStatus) DeepCopyInto(out *PyTorchJobStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PyTorchJobStatus. +func (in *PyTorchJobStatus) DeepCopy() *PyTorchJobStatus { + if in == nil { + return nil + } + out := new(PyTorchJobStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TFJob) DeepCopyInto(out *TFJob) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TFJob. +func (in *TFJob) DeepCopy() *TFJob { + if in == nil { + return nil + } + out := new(TFJob) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TFJob) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TFJobList) DeepCopyInto(out *TFJobList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TFJob, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TFJobList. +func (in *TFJobList) DeepCopy() *TFJobList { + if in == nil { + return nil + } + out := new(TFJobList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TFJobList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TFJobSpec) DeepCopyInto(out *TFJobSpec) { + *out = *in + in.RunPolicy.DeepCopyInto(&out.RunPolicy) + if in.SuccessPolicy != nil { + in, out := &in.SuccessPolicy, &out.SuccessPolicy + *out = new(SuccessPolicy) + **out = **in + } + if in.TFReplicaSpecs != nil { + in, out := &in.TFReplicaSpecs, &out.TFReplicaSpecs + *out = make(map[v1.ReplicaType]*v1.ReplicaSpec, len(*in)) + for key, val := range *in { + var outVal *v1.ReplicaSpec + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(v1.ReplicaSpec) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TFJobSpec. +func (in *TFJobSpec) DeepCopy() *TFJobSpec { + if in == nil { + return nil + } + out := new(TFJobSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XDLJob) DeepCopyInto(out *XDLJob) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XDLJob. +func (in *XDLJob) DeepCopy() *XDLJob { + if in == nil { + return nil + } + out := new(XDLJob) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *XDLJob) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XDLJobList) DeepCopyInto(out *XDLJobList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]XDLJob, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XDLJobList. +func (in *XDLJobList) DeepCopy() *XDLJobList { + if in == nil { + return nil + } + out := new(XDLJobList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *XDLJobList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XDLJobSpec) DeepCopyInto(out *XDLJobSpec) { + *out = *in + in.RunPolicy.DeepCopyInto(&out.RunPolicy) + if in.XDLReplicaSpecs != nil { + in, out := &in.XDLReplicaSpecs, &out.XDLReplicaSpecs + *out = make(map[v1.ReplicaType]*v1.ReplicaSpec, len(*in)) + for key, val := range *in { + var outVal *v1.ReplicaSpec + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(v1.ReplicaSpec) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } + if in.MinFinishWorkerNum != nil { + in, out := &in.MinFinishWorkerNum, &out.MinFinishWorkerNum + *out = new(int32) + **out = **in + } + if in.MinFinishWorkerPercentage != nil { + in, out := &in.MinFinishWorkerPercentage, &out.MinFinishWorkerPercentage + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XDLJobSpec. +func (in *XDLJobSpec) DeepCopy() *XDLJobSpec { + if in == nil { + return nil + } + out := new(XDLJobSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XDLJobStatus) DeepCopyInto(out *XDLJobStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XDLJobStatus. +func (in *XDLJobStatus) DeepCopy() *XDLJobStatus { + if in == nil { + return nil + } + out := new(XDLJobStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XGBoostJob) DeepCopyInto(out *XGBoostJob) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XGBoostJob. +func (in *XGBoostJob) DeepCopy() *XGBoostJob { + if in == nil { + return nil + } + out := new(XGBoostJob) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *XGBoostJob) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XGBoostJobList) DeepCopyInto(out *XGBoostJobList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]XGBoostJob, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XGBoostJobList. +func (in *XGBoostJobList) DeepCopy() *XGBoostJobList { + if in == nil { + return nil + } + out := new(XGBoostJobList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *XGBoostJobList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XGBoostJobSpec) DeepCopyInto(out *XGBoostJobSpec) { + *out = *in + in.RunPolicy.DeepCopyInto(&out.RunPolicy) + if in.XGBReplicaSpecs != nil { + in, out := &in.XGBReplicaSpecs, &out.XGBReplicaSpecs + *out = make(map[v1.ReplicaType]*v1.ReplicaSpec, len(*in)) + for key, val := range *in { + var outVal *v1.ReplicaSpec + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(v1.ReplicaSpec) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XGBoostJobSpec. +func (in *XGBoostJobSpec) DeepCopy() *XGBoostJobSpec { + if in == nil { + return nil + } + out := new(XGBoostJobSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XGBoostJobStatus) DeepCopyInto(out *XGBoostJobStatus) { + *out = *in + in.JobStatus.DeepCopyInto(&out.JobStatus) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XGBoostJobStatus. +func (in *XGBoostJobStatus) DeepCopy() *XGBoostJobStatus { + if in == nil { + return nil + } + out := new(XGBoostJobStatus) + in.DeepCopyInto(out) + return out +} diff --git a/apis/training/v1alpha1/zz_generated.defaults.go b/apis/training/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..c09e6f62 --- /dev/null +++ b/apis/training/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,109 @@ +// +build !ignore_autogenerated + +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&MPIJob{}, func(obj interface{}) { SetObjectDefaults_MPIJob(obj.(*MPIJob)) }) + scheme.AddTypeDefaultingFunc(&MPIJobList{}, func(obj interface{}) { SetObjectDefaults_MPIJobList(obj.(*MPIJobList)) }) + scheme.AddTypeDefaultingFunc(&MarsJob{}, func(obj interface{}) { SetObjectDefaults_MarsJob(obj.(*MarsJob)) }) + scheme.AddTypeDefaultingFunc(&MarsJobList{}, func(obj interface{}) { SetObjectDefaults_MarsJobList(obj.(*MarsJobList)) }) + scheme.AddTypeDefaultingFunc(&PyTorchJob{}, func(obj interface{}) { SetObjectDefaults_PyTorchJob(obj.(*PyTorchJob)) }) + scheme.AddTypeDefaultingFunc(&PyTorchJobList{}, func(obj interface{}) { SetObjectDefaults_PyTorchJobList(obj.(*PyTorchJobList)) }) + scheme.AddTypeDefaultingFunc(&TFJob{}, func(obj interface{}) { SetObjectDefaults_TFJob(obj.(*TFJob)) }) + scheme.AddTypeDefaultingFunc(&TFJobList{}, func(obj interface{}) { SetObjectDefaults_TFJobList(obj.(*TFJobList)) }) + scheme.AddTypeDefaultingFunc(&XDLJob{}, func(obj interface{}) { SetObjectDefaults_XDLJob(obj.(*XDLJob)) }) + scheme.AddTypeDefaultingFunc(&XDLJobList{}, func(obj interface{}) { SetObjectDefaults_XDLJobList(obj.(*XDLJobList)) }) + scheme.AddTypeDefaultingFunc(&XGBoostJob{}, func(obj interface{}) { SetObjectDefaults_XGBoostJob(obj.(*XGBoostJob)) }) + scheme.AddTypeDefaultingFunc(&XGBoostJobList{}, func(obj interface{}) { SetObjectDefaults_XGBoostJobList(obj.(*XGBoostJobList)) }) + return nil +} + +func SetObjectDefaults_MPIJob(in *MPIJob) { + SetDefaults_MPIJob(in) +} + +func SetObjectDefaults_MPIJobList(in *MPIJobList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_MPIJob(a) + } +} + +func SetObjectDefaults_MarsJob(in *MarsJob) { + SetDefaults_MarsJob(in) +} + +func SetObjectDefaults_MarsJobList(in *MarsJobList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_MarsJob(a) + } +} + +func SetObjectDefaults_PyTorchJob(in *PyTorchJob) { + SetDefaults_PyTorchJob(in) +} + +func SetObjectDefaults_PyTorchJobList(in *PyTorchJobList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_PyTorchJob(a) + } +} + +func SetObjectDefaults_TFJob(in *TFJob) { + SetDefaults_TFJob(in) +} + +func SetObjectDefaults_TFJobList(in *TFJobList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_TFJob(a) + } +} + +func SetObjectDefaults_XDLJob(in *XDLJob) { + SetDefaults_XDLJob(in) +} + +func SetObjectDefaults_XDLJobList(in *XDLJobList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_XDLJob(a) + } +} + +func SetObjectDefaults_XGBoostJob(in *XGBoostJob) { + SetDefaults_XGBoostJob(in) +} + +func SetObjectDefaults_XGBoostJobList(in *XGBoostJobList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_XGBoostJob(a) + } +} diff --git a/apis/xdl/v1alpha1/register.go b/apis/xdl/v1alpha1/register.go deleted file mode 100644 index a697f689..00000000 --- a/apis/xdl/v1alpha1/register.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2019 The Alibaba Authors. - -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. -*/ - -// NOTE: Boilerplate only. Ignore this file. - -// Package v1alpha1 contains API Schema definitions for the xdl v1alpha1 API group -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/alibaba/kubedl/api/xdl -// +k8s:defaulter-gen=TypeMeta -// +groupName=xdl.kubedl.io -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/runtime/scheme" -) - -const ( - // GroupName is the group name use in this package. - GroupName = "xdl.kubedl.io" - // Kind is the kind name. - Kind = "XDLJob" - // GroupVersion is the version. - GroupVersion = "v1alpha1" - // Plural is the Plural for XDLJob. - Plural = "xdljobs" - // Singular is the singular for XDLJob. - Singular = "xdljob" -) - -var ( - // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion} - - // SchemeGroupVersionKind is the GroupVersionKind of the resource. - SchemeGroupVersionKind = SchemeGroupVersion.WithKind(Kind) - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} -) - -// Resource is required by pkg/client/listers/... -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - SchemeBuilder.SchemeBuilder.Register(addDefaultingFuncs) -} diff --git a/apis/xdl/v1alpha1/zz_generated.deepcopy.go b/apis/xdl/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index c4715f3a..00000000 --- a/apis/xdl/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,126 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2021 The Alibaba Authors. - -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. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/alibaba/kubedl/pkg/job_controller/api/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *XDLJob) DeepCopyInto(out *XDLJob) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XDLJob. -func (in *XDLJob) DeepCopy() *XDLJob { - if in == nil { - return nil - } - out := new(XDLJob) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *XDLJob) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *XDLJobList) DeepCopyInto(out *XDLJobList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]XDLJob, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XDLJobList. -func (in *XDLJobList) DeepCopy() *XDLJobList { - if in == nil { - return nil - } - out := new(XDLJobList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *XDLJobList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *XDLJobSpec) DeepCopyInto(out *XDLJobSpec) { - *out = *in - in.RunPolicy.DeepCopyInto(&out.RunPolicy) - if in.XDLReplicaSpecs != nil { - in, out := &in.XDLReplicaSpecs, &out.XDLReplicaSpecs - *out = make(map[v1.ReplicaType]*v1.ReplicaSpec, len(*in)) - for key, val := range *in { - var outVal *v1.ReplicaSpec - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(v1.ReplicaSpec) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } - if in.MinFinishWorkerNum != nil { - in, out := &in.MinFinishWorkerNum, &out.MinFinishWorkerNum - *out = new(int32) - **out = **in - } - if in.MinFinishWorkerPercentage != nil { - in, out := &in.MinFinishWorkerPercentage, &out.MinFinishWorkerPercentage - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XDLJobSpec. -func (in *XDLJobSpec) DeepCopy() *XDLJobSpec { - if in == nil { - return nil - } - out := new(XDLJobSpec) - in.DeepCopyInto(out) - return out -} diff --git a/apis/xdl/v1alpha1/zz_generated.defaults.go b/apis/xdl/v1alpha1/zz_generated.defaults.go deleted file mode 100644 index 11ba1e30..00000000 --- a/apis/xdl/v1alpha1/zz_generated.defaults.go +++ /dev/null @@ -1,44 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2019 The Alibaba Authors. - -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. -*/ -// Code generated by main. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&XDLJob{}, func(obj interface{}) { SetObjectDefaults_XDLJob(obj.(*XDLJob)) }) - scheme.AddTypeDefaultingFunc(&XDLJobList{}, func(obj interface{}) { SetObjectDefaults_XDLJobList(obj.(*XDLJobList)) }) - return nil -} - -func SetObjectDefaults_XDLJob(in *XDLJob) { - SetDefaults_XDLJob(in) -} - -func SetObjectDefaults_XDLJobList(in *XDLJobList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_XDLJob(a) - } -} diff --git a/apis/xgboost/v1alpha1/constants.go b/apis/xgboost/v1alpha1/constants.go deleted file mode 100644 index ff6f4a28..00000000 --- a/apis/xgboost/v1alpha1/constants.go +++ /dev/null @@ -1,41 +0,0 @@ -/* - -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 v1alpha1 - -import ( - v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" -) - -const ( - // GroupName is the group name use in this package. - GroupName = "kubeflow.org" - // Kind is the kind name. - Kind = "XGBoostJob" - // GroupVersion is the version. - GroupVersion = "v1alpha1" - // Plural is the Plural for XGBoostJob. - Plural = "xgboostjobs" - // Singular is the singular for XGBoostJob. - Singular = "xgboostjob" - // XGBOOSTCRD is the CRD name for XGBoostJob. - XGBoostCRD = "xgboostjobs.kubeflow.org" - - DefaultContainerName = "xgboostjob" - DefaultContainerPortName = "xgboostjob-port" - DefaultPort = 9999 - DefaultTTLseconds = int32(100) - DefaultCleanPodPolicy = v1.CleanPodPolicyNone -) diff --git a/apis/xgboost/v1alpha1/doc.go b/apis/xgboost/v1alpha1/doc.go deleted file mode 100644 index 41d3e6e0..00000000 --- a/apis/xgboost/v1alpha1/doc.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - -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 v1alpha1 contains API Schema definitions for the xgboostjob v1alpha1 API group -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/kubeflow/xgboost-operator/pkg/apis/xgboostjob -// +k8s:defaulter-gen=TypeMeta -// +groupName=xgboostjob.kubeflow.org -package v1alpha1 diff --git a/apis/xgboost/v1alpha1/register.go b/apis/xgboost/v1alpha1/register.go deleted file mode 100644 index e7d80078..00000000 --- a/apis/xgboost/v1alpha1/register.go +++ /dev/null @@ -1,55 +0,0 @@ -/* - -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. -*/ - -// NOTE: Boilerplate only. Ignore this file. - -// Package v1alpha1 contains API Schema definitions for the xgboostjob v1alpha1 API group -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/kubeflow/xgboost-operator/pkg/apis/xgboostjob -// +k8s:defaulter-gen=TypeMeta -// +groupName=xgboostjob.kubeflow.org -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/runtime/scheme" -) - -var ( - // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: "xgboostjob.kubeflow.org", Version: "v1alpha1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} - - // SchemeGroupVersionKind is the GroupVersionKind of the resource. - SchemeGroupVersionKind = SchemeGroupVersion.WithKind(Kind) - - // AddToScheme is required by pkg/client/... - AddToScheme = SchemeBuilder.AddToScheme -) - -// Resource is required by pkg/client/listers/... -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - SchemeBuilder.SchemeBuilder.Register(addDefaultingFuncs) -} diff --git a/apis/xgboost/v1alpha1/zz_generated.deepcopy.go b/apis/xgboost/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 6d26a86e..00000000 --- a/apis/xgboost/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,132 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2021 The Alibaba Authors. - -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. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/alibaba/kubedl/pkg/job_controller/api/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *XGBoostJob) DeepCopyInto(out *XGBoostJob) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XGBoostJob. -func (in *XGBoostJob) DeepCopy() *XGBoostJob { - if in == nil { - return nil - } - out := new(XGBoostJob) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *XGBoostJob) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *XGBoostJobList) DeepCopyInto(out *XGBoostJobList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]XGBoostJob, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XGBoostJobList. -func (in *XGBoostJobList) DeepCopy() *XGBoostJobList { - if in == nil { - return nil - } - out := new(XGBoostJobList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *XGBoostJobList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *XGBoostJobSpec) DeepCopyInto(out *XGBoostJobSpec) { - *out = *in - in.RunPolicy.DeepCopyInto(&out.RunPolicy) - if in.XGBReplicaSpecs != nil { - in, out := &in.XGBReplicaSpecs, &out.XGBReplicaSpecs - *out = make(map[v1.ReplicaType]*v1.ReplicaSpec, len(*in)) - for key, val := range *in { - var outVal *v1.ReplicaSpec - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(v1.ReplicaSpec) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XGBoostJobSpec. -func (in *XGBoostJobSpec) DeepCopy() *XGBoostJobSpec { - if in == nil { - return nil - } - out := new(XGBoostJobSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *XGBoostJobStatus) DeepCopyInto(out *XGBoostJobStatus) { - *out = *in - in.JobStatus.DeepCopyInto(&out.JobStatus) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XGBoostJobStatus. -func (in *XGBoostJobStatus) DeepCopy() *XGBoostJobStatus { - if in == nil { - return nil - } - out := new(XGBoostJobStatus) - in.DeepCopyInto(out) - return out -} diff --git a/apis/xgboost/v1alpha1/zz_generated.defaults.go b/apis/xgboost/v1alpha1/zz_generated.defaults.go deleted file mode 100644 index 85e0d3d2..00000000 --- a/apis/xgboost/v1alpha1/zz_generated.defaults.go +++ /dev/null @@ -1,44 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2019 The Alibaba Authors. - -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. -*/ -// Code generated by main. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&XGBoostJob{}, func(obj interface{}) { SetObjectDefaults_XGBoostJob(obj.(*XGBoostJob)) }) - scheme.AddTypeDefaultingFunc(&XGBoostJobList{}, func(obj interface{}) { SetObjectDefaults_XGBoostJobList(obj.(*XGBoostJobList)) }) - return nil -} - -func SetObjectDefaults_XGBoostJob(in *XGBoostJob) { - SetDefaults_XGBJob(in) -} - -func SetObjectDefaults_XGBoostJobList(in *XGBoostJobList) { - for i := range in.Items { - a := &in.Items[i] - SetDefaults_XGBJob(a) - } -} diff --git a/client/clientset/versioned/clientset.go b/client/clientset/versioned/clientset.go new file mode 100644 index 00000000..8a6f04a9 --- /dev/null +++ b/client/clientset/versioned/clientset.go @@ -0,0 +1,96 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + trainingv1alpha1 "github.com/alibaba/kubedl/client/clientset/versioned/typed/training/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + TrainingV1alpha1() trainingv1alpha1.TrainingV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + trainingV1alpha1 *trainingv1alpha1.TrainingV1alpha1Client +} + +// TrainingV1alpha1 retrieves the TrainingV1alpha1Client +func (c *Clientset) TrainingV1alpha1() trainingv1alpha1.TrainingV1alpha1Interface { + return c.trainingV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.trainingV1alpha1, err = trainingv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.trainingV1alpha1 = trainingv1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.trainingV1alpha1 = trainingv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/apis/addtoscheme_mpijob_v1.go b/client/clientset/versioned/doc.go similarity index 80% rename from apis/addtoscheme_mpijob_v1.go rename to client/clientset/versioned/doc.go index b1a57ccd..678f7691 100644 --- a/apis/addtoscheme_mpijob_v1.go +++ b/client/clientset/versioned/doc.go @@ -13,11 +13,7 @@ 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. */ +// Code generated by client-gen. DO NOT EDIT. -package apis - -import v1 "github.com/alibaba/kubedl/apis/mpi/v1" - -func init() { - AddToSchemes = append(AddToSchemes, v1.AddToScheme) -} +// This package has the automatically generated clientset. +package versioned diff --git a/client/clientset/versioned/fake/clientset_generated.go b/client/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..278518c2 --- /dev/null +++ b/client/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,81 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "github.com/alibaba/kubedl/client/clientset/versioned" + trainingv1alpha1 "github.com/alibaba/kubedl/client/clientset/versioned/typed/training/v1alpha1" + faketrainingv1alpha1 "github.com/alibaba/kubedl/client/clientset/versioned/typed/training/v1alpha1/fake" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// TrainingV1alpha1 retrieves the TrainingV1alpha1Client +func (c *Clientset) TrainingV1alpha1() trainingv1alpha1.TrainingV1alpha1Interface { + return &faketrainingv1alpha1.FakeTrainingV1alpha1{Fake: &c.Fake} +} diff --git a/apis/addtoscheme_marsjob_v1alpha1.go b/client/clientset/versioned/fake/doc.go similarity index 74% rename from apis/addtoscheme_marsjob_v1alpha1.go rename to client/clientset/versioned/fake/doc.go index d3be1781..0d22097c 100644 --- a/apis/addtoscheme_marsjob_v1alpha1.go +++ b/client/clientset/versioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Alibaba Authors. +Copyright 2021 The Alibaba Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,11 +13,7 @@ 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. */ +// Code generated by client-gen. DO NOT EDIT. -package apis - -import "github.com/alibaba/kubedl/apis/mars/v1alpha1" - -func init() { - AddToSchemes = append(AddToSchemes, v1alpha1.AddToScheme) -} +// This package has the automatically generated fake clientset. +package fake diff --git a/client/clientset/versioned/fake/register.go b/client/clientset/versioned/fake/register.go new file mode 100644 index 00000000..c118d6f4 --- /dev/null +++ b/client/clientset/versioned/fake/register.go @@ -0,0 +1,55 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) +var parameterCodec = runtime.NewParameterCodec(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + trainingv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/apis/addtoscheme_elasticdljob_v1alpha1.go b/client/clientset/versioned/scheme/doc.go similarity index 74% rename from apis/addtoscheme_elasticdljob_v1alpha1.go rename to client/clientset/versioned/scheme/doc.go index 55f19164..dff068e8 100644 --- a/apis/addtoscheme_elasticdljob_v1alpha1.go +++ b/client/clientset/versioned/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Alibaba Authors. +Copyright 2021 The Alibaba Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,11 +13,7 @@ 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. */ +// Code generated by client-gen. DO NOT EDIT. -package apis - -import "github.com/alibaba/kubedl/apis/elasticdl/v1alpha1" - -func init() { - AddToSchemes = append(AddToSchemes, v1alpha1.AddToScheme) -} +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/client/clientset/versioned/scheme/register.go b/client/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..7cf19a98 --- /dev/null +++ b/client/clientset/versioned/scheme/register.go @@ -0,0 +1,55 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + trainingv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/doc.go b/client/clientset/versioned/typed/training/v1alpha1/doc.go new file mode 100644 index 00000000..c777b342 --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/client/clientset/versioned/typed/training/v1alpha1/elasticdljob.go b/client/clientset/versioned/typed/training/v1alpha1/elasticdljob.go new file mode 100644 index 00000000..baf9d175 --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/elasticdljob.go @@ -0,0 +1,194 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + scheme "github.com/alibaba/kubedl/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ElasticDLJobsGetter has a method to return a ElasticDLJobInterface. +// A group's client should implement this interface. +type ElasticDLJobsGetter interface { + ElasticDLJobs(namespace string) ElasticDLJobInterface +} + +// ElasticDLJobInterface has methods to work with ElasticDLJob resources. +type ElasticDLJobInterface interface { + Create(ctx context.Context, elasticDLJob *v1alpha1.ElasticDLJob, opts v1.CreateOptions) (*v1alpha1.ElasticDLJob, error) + Update(ctx context.Context, elasticDLJob *v1alpha1.ElasticDLJob, opts v1.UpdateOptions) (*v1alpha1.ElasticDLJob, error) + UpdateStatus(ctx context.Context, elasticDLJob *v1alpha1.ElasticDLJob, opts v1.UpdateOptions) (*v1alpha1.ElasticDLJob, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ElasticDLJob, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ElasticDLJobList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ElasticDLJob, err error) + ElasticDLJobExpansion +} + +// elasticDLJobs implements ElasticDLJobInterface +type elasticDLJobs struct { + client rest.Interface + ns string +} + +// newElasticDLJobs returns a ElasticDLJobs +func newElasticDLJobs(c *TrainingV1alpha1Client, namespace string) *elasticDLJobs { + return &elasticDLJobs{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the elasticDLJob, and returns the corresponding elasticDLJob object, and an error if there is any. +func (c *elasticDLJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ElasticDLJob, err error) { + result = &v1alpha1.ElasticDLJob{} + err = c.client.Get(). + Namespace(c.ns). + Resource("elasticdljobs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ElasticDLJobs that match those selectors. +func (c *elasticDLJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ElasticDLJobList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ElasticDLJobList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("elasticdljobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested elasticDLJobs. +func (c *elasticDLJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("elasticdljobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a elasticDLJob and creates it. Returns the server's representation of the elasticDLJob, and an error, if there is any. +func (c *elasticDLJobs) Create(ctx context.Context, elasticDLJob *v1alpha1.ElasticDLJob, opts v1.CreateOptions) (result *v1alpha1.ElasticDLJob, err error) { + result = &v1alpha1.ElasticDLJob{} + err = c.client.Post(). + Namespace(c.ns). + Resource("elasticdljobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(elasticDLJob). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a elasticDLJob and updates it. Returns the server's representation of the elasticDLJob, and an error, if there is any. +func (c *elasticDLJobs) Update(ctx context.Context, elasticDLJob *v1alpha1.ElasticDLJob, opts v1.UpdateOptions) (result *v1alpha1.ElasticDLJob, err error) { + result = &v1alpha1.ElasticDLJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("elasticdljobs"). + Name(elasticDLJob.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(elasticDLJob). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *elasticDLJobs) UpdateStatus(ctx context.Context, elasticDLJob *v1alpha1.ElasticDLJob, opts v1.UpdateOptions) (result *v1alpha1.ElasticDLJob, err error) { + result = &v1alpha1.ElasticDLJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("elasticdljobs"). + Name(elasticDLJob.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(elasticDLJob). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the elasticDLJob and deletes it. Returns an error if one occurs. +func (c *elasticDLJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("elasticdljobs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *elasticDLJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("elasticdljobs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched elasticDLJob. +func (c *elasticDLJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ElasticDLJob, err error) { + result = &v1alpha1.ElasticDLJob{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("elasticdljobs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/fake/doc.go b/client/clientset/versioned/typed/training/v1alpha1/fake/doc.go new file mode 100644 index 00000000..def10728 --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/fake/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/client/clientset/versioned/typed/training/v1alpha1/fake/fake_elasticdljob.go b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_elasticdljob.go new file mode 100644 index 00000000..98ed7f70 --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_elasticdljob.go @@ -0,0 +1,141 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeElasticDLJobs implements ElasticDLJobInterface +type FakeElasticDLJobs struct { + Fake *FakeTrainingV1alpha1 + ns string +} + +var elasticdljobsResource = schema.GroupVersionResource{Group: "training.kubedl.io", Version: "v1alpha1", Resource: "elasticdljobs"} + +var elasticdljobsKind = schema.GroupVersionKind{Group: "training.kubedl.io", Version: "v1alpha1", Kind: "ElasticDLJob"} + +// Get takes name of the elasticDLJob, and returns the corresponding elasticDLJob object, and an error if there is any. +func (c *FakeElasticDLJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ElasticDLJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(elasticdljobsResource, c.ns, name), &v1alpha1.ElasticDLJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ElasticDLJob), err +} + +// List takes label and field selectors, and returns the list of ElasticDLJobs that match those selectors. +func (c *FakeElasticDLJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ElasticDLJobList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(elasticdljobsResource, elasticdljobsKind, c.ns, opts), &v1alpha1.ElasticDLJobList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ElasticDLJobList{ListMeta: obj.(*v1alpha1.ElasticDLJobList).ListMeta} + for _, item := range obj.(*v1alpha1.ElasticDLJobList).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 elasticDLJobs. +func (c *FakeElasticDLJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(elasticdljobsResource, c.ns, opts)) + +} + +// Create takes the representation of a elasticDLJob and creates it. Returns the server's representation of the elasticDLJob, and an error, if there is any. +func (c *FakeElasticDLJobs) Create(ctx context.Context, elasticDLJob *v1alpha1.ElasticDLJob, opts v1.CreateOptions) (result *v1alpha1.ElasticDLJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(elasticdljobsResource, c.ns, elasticDLJob), &v1alpha1.ElasticDLJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ElasticDLJob), err +} + +// Update takes the representation of a elasticDLJob and updates it. Returns the server's representation of the elasticDLJob, and an error, if there is any. +func (c *FakeElasticDLJobs) Update(ctx context.Context, elasticDLJob *v1alpha1.ElasticDLJob, opts v1.UpdateOptions) (result *v1alpha1.ElasticDLJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(elasticdljobsResource, c.ns, elasticDLJob), &v1alpha1.ElasticDLJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ElasticDLJob), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeElasticDLJobs) UpdateStatus(ctx context.Context, elasticDLJob *v1alpha1.ElasticDLJob, opts v1.UpdateOptions) (*v1alpha1.ElasticDLJob, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(elasticdljobsResource, "status", c.ns, elasticDLJob), &v1alpha1.ElasticDLJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ElasticDLJob), err +} + +// Delete takes name of the elasticDLJob and deletes it. Returns an error if one occurs. +func (c *FakeElasticDLJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(elasticdljobsResource, c.ns, name), &v1alpha1.ElasticDLJob{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeElasticDLJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(elasticdljobsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ElasticDLJobList{}) + return err +} + +// Patch applies the patch and returns the patched elasticDLJob. +func (c *FakeElasticDLJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ElasticDLJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(elasticdljobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ElasticDLJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ElasticDLJob), err +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/fake/fake_marsjob.go b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_marsjob.go new file mode 100644 index 00000000..d5fc48b1 --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_marsjob.go @@ -0,0 +1,141 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeMarsJobs implements MarsJobInterface +type FakeMarsJobs struct { + Fake *FakeTrainingV1alpha1 + ns string +} + +var marsjobsResource = schema.GroupVersionResource{Group: "training.kubedl.io", Version: "v1alpha1", Resource: "marsjobs"} + +var marsjobsKind = schema.GroupVersionKind{Group: "training.kubedl.io", Version: "v1alpha1", Kind: "MarsJob"} + +// Get takes name of the marsJob, and returns the corresponding marsJob object, and an error if there is any. +func (c *FakeMarsJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MarsJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(marsjobsResource, c.ns, name), &v1alpha1.MarsJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MarsJob), err +} + +// List takes label and field selectors, and returns the list of MarsJobs that match those selectors. +func (c *FakeMarsJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MarsJobList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(marsjobsResource, marsjobsKind, c.ns, opts), &v1alpha1.MarsJobList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.MarsJobList{ListMeta: obj.(*v1alpha1.MarsJobList).ListMeta} + for _, item := range obj.(*v1alpha1.MarsJobList).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 marsJobs. +func (c *FakeMarsJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(marsjobsResource, c.ns, opts)) + +} + +// Create takes the representation of a marsJob and creates it. Returns the server's representation of the marsJob, and an error, if there is any. +func (c *FakeMarsJobs) Create(ctx context.Context, marsJob *v1alpha1.MarsJob, opts v1.CreateOptions) (result *v1alpha1.MarsJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(marsjobsResource, c.ns, marsJob), &v1alpha1.MarsJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MarsJob), err +} + +// Update takes the representation of a marsJob and updates it. Returns the server's representation of the marsJob, and an error, if there is any. +func (c *FakeMarsJobs) Update(ctx context.Context, marsJob *v1alpha1.MarsJob, opts v1.UpdateOptions) (result *v1alpha1.MarsJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(marsjobsResource, c.ns, marsJob), &v1alpha1.MarsJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MarsJob), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeMarsJobs) UpdateStatus(ctx context.Context, marsJob *v1alpha1.MarsJob, opts v1.UpdateOptions) (*v1alpha1.MarsJob, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(marsjobsResource, "status", c.ns, marsJob), &v1alpha1.MarsJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MarsJob), err +} + +// Delete takes name of the marsJob and deletes it. Returns an error if one occurs. +func (c *FakeMarsJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(marsjobsResource, c.ns, name), &v1alpha1.MarsJob{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeMarsJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(marsjobsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.MarsJobList{}) + return err +} + +// Patch applies the patch and returns the patched marsJob. +func (c *FakeMarsJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MarsJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(marsjobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.MarsJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MarsJob), err +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/fake/fake_mpijob.go b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_mpijob.go new file mode 100644 index 00000000..f723ad15 --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_mpijob.go @@ -0,0 +1,141 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeMPIJobs implements MPIJobInterface +type FakeMPIJobs struct { + Fake *FakeTrainingV1alpha1 + ns string +} + +var mpijobsResource = schema.GroupVersionResource{Group: "training.kubedl.io", Version: "v1alpha1", Resource: "mpijobs"} + +var mpijobsKind = schema.GroupVersionKind{Group: "training.kubedl.io", Version: "v1alpha1", Kind: "MPIJob"} + +// Get takes name of the mPIJob, and returns the corresponding mPIJob object, and an error if there is any. +func (c *FakeMPIJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MPIJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(mpijobsResource, c.ns, name), &v1alpha1.MPIJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MPIJob), err +} + +// List takes label and field selectors, and returns the list of MPIJobs that match those selectors. +func (c *FakeMPIJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MPIJobList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(mpijobsResource, mpijobsKind, c.ns, opts), &v1alpha1.MPIJobList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.MPIJobList{ListMeta: obj.(*v1alpha1.MPIJobList).ListMeta} + for _, item := range obj.(*v1alpha1.MPIJobList).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 mPIJobs. +func (c *FakeMPIJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(mpijobsResource, c.ns, opts)) + +} + +// Create takes the representation of a mPIJob and creates it. Returns the server's representation of the mPIJob, and an error, if there is any. +func (c *FakeMPIJobs) Create(ctx context.Context, mPIJob *v1alpha1.MPIJob, opts v1.CreateOptions) (result *v1alpha1.MPIJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(mpijobsResource, c.ns, mPIJob), &v1alpha1.MPIJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MPIJob), err +} + +// Update takes the representation of a mPIJob and updates it. Returns the server's representation of the mPIJob, and an error, if there is any. +func (c *FakeMPIJobs) Update(ctx context.Context, mPIJob *v1alpha1.MPIJob, opts v1.UpdateOptions) (result *v1alpha1.MPIJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(mpijobsResource, c.ns, mPIJob), &v1alpha1.MPIJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MPIJob), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeMPIJobs) UpdateStatus(ctx context.Context, mPIJob *v1alpha1.MPIJob, opts v1.UpdateOptions) (*v1alpha1.MPIJob, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(mpijobsResource, "status", c.ns, mPIJob), &v1alpha1.MPIJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MPIJob), err +} + +// Delete takes name of the mPIJob and deletes it. Returns an error if one occurs. +func (c *FakeMPIJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(mpijobsResource, c.ns, name), &v1alpha1.MPIJob{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeMPIJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(mpijobsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.MPIJobList{}) + return err +} + +// Patch applies the patch and returns the patched mPIJob. +func (c *FakeMPIJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MPIJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(mpijobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.MPIJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MPIJob), err +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/fake/fake_pytorchjob.go b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_pytorchjob.go new file mode 100644 index 00000000..97060fdd --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_pytorchjob.go @@ -0,0 +1,141 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakePyTorchJobs implements PyTorchJobInterface +type FakePyTorchJobs struct { + Fake *FakeTrainingV1alpha1 + ns string +} + +var pytorchjobsResource = schema.GroupVersionResource{Group: "training.kubedl.io", Version: "v1alpha1", Resource: "pytorchjobs"} + +var pytorchjobsKind = schema.GroupVersionKind{Group: "training.kubedl.io", Version: "v1alpha1", Kind: "PyTorchJob"} + +// Get takes name of the pyTorchJob, and returns the corresponding pyTorchJob object, and an error if there is any. +func (c *FakePyTorchJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PyTorchJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(pytorchjobsResource, c.ns, name), &v1alpha1.PyTorchJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PyTorchJob), err +} + +// List takes label and field selectors, and returns the list of PyTorchJobs that match those selectors. +func (c *FakePyTorchJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PyTorchJobList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(pytorchjobsResource, pytorchjobsKind, c.ns, opts), &v1alpha1.PyTorchJobList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.PyTorchJobList{ListMeta: obj.(*v1alpha1.PyTorchJobList).ListMeta} + for _, item := range obj.(*v1alpha1.PyTorchJobList).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 pyTorchJobs. +func (c *FakePyTorchJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(pytorchjobsResource, c.ns, opts)) + +} + +// Create takes the representation of a pyTorchJob and creates it. Returns the server's representation of the pyTorchJob, and an error, if there is any. +func (c *FakePyTorchJobs) Create(ctx context.Context, pyTorchJob *v1alpha1.PyTorchJob, opts v1.CreateOptions) (result *v1alpha1.PyTorchJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(pytorchjobsResource, c.ns, pyTorchJob), &v1alpha1.PyTorchJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PyTorchJob), err +} + +// Update takes the representation of a pyTorchJob and updates it. Returns the server's representation of the pyTorchJob, and an error, if there is any. +func (c *FakePyTorchJobs) Update(ctx context.Context, pyTorchJob *v1alpha1.PyTorchJob, opts v1.UpdateOptions) (result *v1alpha1.PyTorchJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(pytorchjobsResource, c.ns, pyTorchJob), &v1alpha1.PyTorchJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PyTorchJob), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakePyTorchJobs) UpdateStatus(ctx context.Context, pyTorchJob *v1alpha1.PyTorchJob, opts v1.UpdateOptions) (*v1alpha1.PyTorchJob, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(pytorchjobsResource, "status", c.ns, pyTorchJob), &v1alpha1.PyTorchJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PyTorchJob), err +} + +// Delete takes name of the pyTorchJob and deletes it. Returns an error if one occurs. +func (c *FakePyTorchJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(pytorchjobsResource, c.ns, name), &v1alpha1.PyTorchJob{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePyTorchJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(pytorchjobsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.PyTorchJobList{}) + return err +} + +// Patch applies the patch and returns the patched pyTorchJob. +func (c *FakePyTorchJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PyTorchJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(pytorchjobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.PyTorchJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PyTorchJob), err +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/fake/fake_tfjob.go b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_tfjob.go new file mode 100644 index 00000000..d766e2f6 --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_tfjob.go @@ -0,0 +1,141 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeTFJobs implements TFJobInterface +type FakeTFJobs struct { + Fake *FakeTrainingV1alpha1 + ns string +} + +var tfjobsResource = schema.GroupVersionResource{Group: "training.kubedl.io", Version: "v1alpha1", Resource: "tfjobs"} + +var tfjobsKind = schema.GroupVersionKind{Group: "training.kubedl.io", Version: "v1alpha1", Kind: "TFJob"} + +// Get takes name of the tFJob, and returns the corresponding tFJob object, and an error if there is any. +func (c *FakeTFJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TFJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(tfjobsResource, c.ns, name), &v1alpha1.TFJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.TFJob), err +} + +// List takes label and field selectors, and returns the list of TFJobs that match those selectors. +func (c *FakeTFJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TFJobList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(tfjobsResource, tfjobsKind, c.ns, opts), &v1alpha1.TFJobList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.TFJobList{ListMeta: obj.(*v1alpha1.TFJobList).ListMeta} + for _, item := range obj.(*v1alpha1.TFJobList).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 tFJobs. +func (c *FakeTFJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(tfjobsResource, c.ns, opts)) + +} + +// Create takes the representation of a tFJob and creates it. Returns the server's representation of the tFJob, and an error, if there is any. +func (c *FakeTFJobs) Create(ctx context.Context, tFJob *v1alpha1.TFJob, opts v1.CreateOptions) (result *v1alpha1.TFJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(tfjobsResource, c.ns, tFJob), &v1alpha1.TFJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.TFJob), err +} + +// Update takes the representation of a tFJob and updates it. Returns the server's representation of the tFJob, and an error, if there is any. +func (c *FakeTFJobs) Update(ctx context.Context, tFJob *v1alpha1.TFJob, opts v1.UpdateOptions) (result *v1alpha1.TFJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(tfjobsResource, c.ns, tFJob), &v1alpha1.TFJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.TFJob), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeTFJobs) UpdateStatus(ctx context.Context, tFJob *v1alpha1.TFJob, opts v1.UpdateOptions) (*v1alpha1.TFJob, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(tfjobsResource, "status", c.ns, tFJob), &v1alpha1.TFJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.TFJob), err +} + +// Delete takes name of the tFJob and deletes it. Returns an error if one occurs. +func (c *FakeTFJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(tfjobsResource, c.ns, name), &v1alpha1.TFJob{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeTFJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(tfjobsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.TFJobList{}) + return err +} + +// Patch applies the patch and returns the patched tFJob. +func (c *FakeTFJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TFJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(tfjobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.TFJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.TFJob), err +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/fake/fake_training_client.go b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_training_client.go new file mode 100644 index 00000000..a1a40739 --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_training_client.go @@ -0,0 +1,63 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/alibaba/kubedl/client/clientset/versioned/typed/training/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeTrainingV1alpha1 struct { + *testing.Fake +} + +func (c *FakeTrainingV1alpha1) ElasticDLJobs(namespace string) v1alpha1.ElasticDLJobInterface { + return &FakeElasticDLJobs{c, namespace} +} + +func (c *FakeTrainingV1alpha1) MPIJobs(namespace string) v1alpha1.MPIJobInterface { + return &FakeMPIJobs{c, namespace} +} + +func (c *FakeTrainingV1alpha1) MarsJobs(namespace string) v1alpha1.MarsJobInterface { + return &FakeMarsJobs{c, namespace} +} + +func (c *FakeTrainingV1alpha1) PyTorchJobs(namespace string) v1alpha1.PyTorchJobInterface { + return &FakePyTorchJobs{c, namespace} +} + +func (c *FakeTrainingV1alpha1) TFJobs(namespace string) v1alpha1.TFJobInterface { + return &FakeTFJobs{c, namespace} +} + +func (c *FakeTrainingV1alpha1) XDLJobs(namespace string) v1alpha1.XDLJobInterface { + return &FakeXDLJobs{c, namespace} +} + +func (c *FakeTrainingV1alpha1) XGBoostJobs(namespace string) v1alpha1.XGBoostJobInterface { + return &FakeXGBoostJobs{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeTrainingV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/fake/fake_xdljob.go b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_xdljob.go new file mode 100644 index 00000000..98c150dd --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_xdljob.go @@ -0,0 +1,141 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeXDLJobs implements XDLJobInterface +type FakeXDLJobs struct { + Fake *FakeTrainingV1alpha1 + ns string +} + +var xdljobsResource = schema.GroupVersionResource{Group: "training.kubedl.io", Version: "v1alpha1", Resource: "xdljobs"} + +var xdljobsKind = schema.GroupVersionKind{Group: "training.kubedl.io", Version: "v1alpha1", Kind: "XDLJob"} + +// Get takes name of the xDLJob, and returns the corresponding xDLJob object, and an error if there is any. +func (c *FakeXDLJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.XDLJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(xdljobsResource, c.ns, name), &v1alpha1.XDLJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.XDLJob), err +} + +// List takes label and field selectors, and returns the list of XDLJobs that match those selectors. +func (c *FakeXDLJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.XDLJobList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(xdljobsResource, xdljobsKind, c.ns, opts), &v1alpha1.XDLJobList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.XDLJobList{ListMeta: obj.(*v1alpha1.XDLJobList).ListMeta} + for _, item := range obj.(*v1alpha1.XDLJobList).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 xDLJobs. +func (c *FakeXDLJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(xdljobsResource, c.ns, opts)) + +} + +// Create takes the representation of a xDLJob and creates it. Returns the server's representation of the xDLJob, and an error, if there is any. +func (c *FakeXDLJobs) Create(ctx context.Context, xDLJob *v1alpha1.XDLJob, opts v1.CreateOptions) (result *v1alpha1.XDLJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(xdljobsResource, c.ns, xDLJob), &v1alpha1.XDLJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.XDLJob), err +} + +// Update takes the representation of a xDLJob and updates it. Returns the server's representation of the xDLJob, and an error, if there is any. +func (c *FakeXDLJobs) Update(ctx context.Context, xDLJob *v1alpha1.XDLJob, opts v1.UpdateOptions) (result *v1alpha1.XDLJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(xdljobsResource, c.ns, xDLJob), &v1alpha1.XDLJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.XDLJob), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeXDLJobs) UpdateStatus(ctx context.Context, xDLJob *v1alpha1.XDLJob, opts v1.UpdateOptions) (*v1alpha1.XDLJob, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(xdljobsResource, "status", c.ns, xDLJob), &v1alpha1.XDLJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.XDLJob), err +} + +// Delete takes name of the xDLJob and deletes it. Returns an error if one occurs. +func (c *FakeXDLJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(xdljobsResource, c.ns, name), &v1alpha1.XDLJob{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeXDLJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(xdljobsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.XDLJobList{}) + return err +} + +// Patch applies the patch and returns the patched xDLJob. +func (c *FakeXDLJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.XDLJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(xdljobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.XDLJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.XDLJob), err +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/fake/fake_xgboostjob.go b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_xgboostjob.go new file mode 100644 index 00000000..5af00f74 --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/fake/fake_xgboostjob.go @@ -0,0 +1,141 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeXGBoostJobs implements XGBoostJobInterface +type FakeXGBoostJobs struct { + Fake *FakeTrainingV1alpha1 + ns string +} + +var xgboostjobsResource = schema.GroupVersionResource{Group: "training.kubedl.io", Version: "v1alpha1", Resource: "xgboostjobs"} + +var xgboostjobsKind = schema.GroupVersionKind{Group: "training.kubedl.io", Version: "v1alpha1", Kind: "XGBoostJob"} + +// Get takes name of the xGBoostJob, and returns the corresponding xGBoostJob object, and an error if there is any. +func (c *FakeXGBoostJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.XGBoostJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(xgboostjobsResource, c.ns, name), &v1alpha1.XGBoostJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.XGBoostJob), err +} + +// List takes label and field selectors, and returns the list of XGBoostJobs that match those selectors. +func (c *FakeXGBoostJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.XGBoostJobList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(xgboostjobsResource, xgboostjobsKind, c.ns, opts), &v1alpha1.XGBoostJobList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.XGBoostJobList{ListMeta: obj.(*v1alpha1.XGBoostJobList).ListMeta} + for _, item := range obj.(*v1alpha1.XGBoostJobList).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 xGBoostJobs. +func (c *FakeXGBoostJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(xgboostjobsResource, c.ns, opts)) + +} + +// Create takes the representation of a xGBoostJob and creates it. Returns the server's representation of the xGBoostJob, and an error, if there is any. +func (c *FakeXGBoostJobs) Create(ctx context.Context, xGBoostJob *v1alpha1.XGBoostJob, opts v1.CreateOptions) (result *v1alpha1.XGBoostJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(xgboostjobsResource, c.ns, xGBoostJob), &v1alpha1.XGBoostJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.XGBoostJob), err +} + +// Update takes the representation of a xGBoostJob and updates it. Returns the server's representation of the xGBoostJob, and an error, if there is any. +func (c *FakeXGBoostJobs) Update(ctx context.Context, xGBoostJob *v1alpha1.XGBoostJob, opts v1.UpdateOptions) (result *v1alpha1.XGBoostJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(xgboostjobsResource, c.ns, xGBoostJob), &v1alpha1.XGBoostJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.XGBoostJob), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeXGBoostJobs) UpdateStatus(ctx context.Context, xGBoostJob *v1alpha1.XGBoostJob, opts v1.UpdateOptions) (*v1alpha1.XGBoostJob, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(xgboostjobsResource, "status", c.ns, xGBoostJob), &v1alpha1.XGBoostJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.XGBoostJob), err +} + +// Delete takes name of the xGBoostJob and deletes it. Returns an error if one occurs. +func (c *FakeXGBoostJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(xgboostjobsResource, c.ns, name), &v1alpha1.XGBoostJob{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeXGBoostJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(xgboostjobsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.XGBoostJobList{}) + return err +} + +// Patch applies the patch and returns the patched xGBoostJob. +func (c *FakeXGBoostJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.XGBoostJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(xgboostjobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.XGBoostJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.XGBoostJob), err +} diff --git a/apis/xdl/v1alpha1/doc.go b/client/clientset/versioned/typed/training/v1alpha1/generated_expansion.go similarity index 62% rename from apis/xdl/v1alpha1/doc.go rename to client/clientset/versioned/typed/training/v1alpha1/generated_expansion.go index ef485c7b..dd1a662c 100644 --- a/apis/xdl/v1alpha1/doc.go +++ b/client/clientset/versioned/typed/training/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Alibaba Authors. +Copyright 2021 The Alibaba Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,11 +13,20 @@ 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. */ +// Code generated by client-gen. DO NOT EDIT. -// Package v1alpha1 contains API Schema definitions for the xdl v1alpha1 API group -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/alibaba/kubedl/api/xdl -// +k8s:defaulter-gen=TypeMeta -// +groupName=xdl.kubedl.io package v1alpha1 + +type ElasticDLJobExpansion interface{} + +type MPIJobExpansion interface{} + +type MarsJobExpansion interface{} + +type PyTorchJobExpansion interface{} + +type TFJobExpansion interface{} + +type XDLJobExpansion interface{} + +type XGBoostJobExpansion interface{} diff --git a/client/clientset/versioned/typed/training/v1alpha1/marsjob.go b/client/clientset/versioned/typed/training/v1alpha1/marsjob.go new file mode 100644 index 00000000..e3e1fe41 --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/marsjob.go @@ -0,0 +1,194 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + scheme "github.com/alibaba/kubedl/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// MarsJobsGetter has a method to return a MarsJobInterface. +// A group's client should implement this interface. +type MarsJobsGetter interface { + MarsJobs(namespace string) MarsJobInterface +} + +// MarsJobInterface has methods to work with MarsJob resources. +type MarsJobInterface interface { + Create(ctx context.Context, marsJob *v1alpha1.MarsJob, opts v1.CreateOptions) (*v1alpha1.MarsJob, error) + Update(ctx context.Context, marsJob *v1alpha1.MarsJob, opts v1.UpdateOptions) (*v1alpha1.MarsJob, error) + UpdateStatus(ctx context.Context, marsJob *v1alpha1.MarsJob, opts v1.UpdateOptions) (*v1alpha1.MarsJob, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.MarsJob, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.MarsJobList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MarsJob, err error) + MarsJobExpansion +} + +// marsJobs implements MarsJobInterface +type marsJobs struct { + client rest.Interface + ns string +} + +// newMarsJobs returns a MarsJobs +func newMarsJobs(c *TrainingV1alpha1Client, namespace string) *marsJobs { + return &marsJobs{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the marsJob, and returns the corresponding marsJob object, and an error if there is any. +func (c *marsJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MarsJob, err error) { + result = &v1alpha1.MarsJob{} + err = c.client.Get(). + Namespace(c.ns). + Resource("marsjobs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of MarsJobs that match those selectors. +func (c *marsJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MarsJobList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.MarsJobList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("marsjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested marsJobs. +func (c *marsJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("marsjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a marsJob and creates it. Returns the server's representation of the marsJob, and an error, if there is any. +func (c *marsJobs) Create(ctx context.Context, marsJob *v1alpha1.MarsJob, opts v1.CreateOptions) (result *v1alpha1.MarsJob, err error) { + result = &v1alpha1.MarsJob{} + err = c.client.Post(). + Namespace(c.ns). + Resource("marsjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(marsJob). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a marsJob and updates it. Returns the server's representation of the marsJob, and an error, if there is any. +func (c *marsJobs) Update(ctx context.Context, marsJob *v1alpha1.MarsJob, opts v1.UpdateOptions) (result *v1alpha1.MarsJob, err error) { + result = &v1alpha1.MarsJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("marsjobs"). + Name(marsJob.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(marsJob). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *marsJobs) UpdateStatus(ctx context.Context, marsJob *v1alpha1.MarsJob, opts v1.UpdateOptions) (result *v1alpha1.MarsJob, err error) { + result = &v1alpha1.MarsJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("marsjobs"). + Name(marsJob.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(marsJob). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the marsJob and deletes it. Returns an error if one occurs. +func (c *marsJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("marsjobs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *marsJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("marsjobs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched marsJob. +func (c *marsJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MarsJob, err error) { + result = &v1alpha1.MarsJob{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("marsjobs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/mpijob.go b/client/clientset/versioned/typed/training/v1alpha1/mpijob.go new file mode 100644 index 00000000..b1e9ee64 --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/mpijob.go @@ -0,0 +1,194 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + scheme "github.com/alibaba/kubedl/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// MPIJobsGetter has a method to return a MPIJobInterface. +// A group's client should implement this interface. +type MPIJobsGetter interface { + MPIJobs(namespace string) MPIJobInterface +} + +// MPIJobInterface has methods to work with MPIJob resources. +type MPIJobInterface interface { + Create(ctx context.Context, mPIJob *v1alpha1.MPIJob, opts v1.CreateOptions) (*v1alpha1.MPIJob, error) + Update(ctx context.Context, mPIJob *v1alpha1.MPIJob, opts v1.UpdateOptions) (*v1alpha1.MPIJob, error) + UpdateStatus(ctx context.Context, mPIJob *v1alpha1.MPIJob, opts v1.UpdateOptions) (*v1alpha1.MPIJob, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.MPIJob, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.MPIJobList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MPIJob, err error) + MPIJobExpansion +} + +// mPIJobs implements MPIJobInterface +type mPIJobs struct { + client rest.Interface + ns string +} + +// newMPIJobs returns a MPIJobs +func newMPIJobs(c *TrainingV1alpha1Client, namespace string) *mPIJobs { + return &mPIJobs{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the mPIJob, and returns the corresponding mPIJob object, and an error if there is any. +func (c *mPIJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MPIJob, err error) { + result = &v1alpha1.MPIJob{} + err = c.client.Get(). + Namespace(c.ns). + Resource("mpijobs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of MPIJobs that match those selectors. +func (c *mPIJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MPIJobList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.MPIJobList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("mpijobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested mPIJobs. +func (c *mPIJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("mpijobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a mPIJob and creates it. Returns the server's representation of the mPIJob, and an error, if there is any. +func (c *mPIJobs) Create(ctx context.Context, mPIJob *v1alpha1.MPIJob, opts v1.CreateOptions) (result *v1alpha1.MPIJob, err error) { + result = &v1alpha1.MPIJob{} + err = c.client.Post(). + Namespace(c.ns). + Resource("mpijobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(mPIJob). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a mPIJob and updates it. Returns the server's representation of the mPIJob, and an error, if there is any. +func (c *mPIJobs) Update(ctx context.Context, mPIJob *v1alpha1.MPIJob, opts v1.UpdateOptions) (result *v1alpha1.MPIJob, err error) { + result = &v1alpha1.MPIJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("mpijobs"). + Name(mPIJob.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(mPIJob). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *mPIJobs) UpdateStatus(ctx context.Context, mPIJob *v1alpha1.MPIJob, opts v1.UpdateOptions) (result *v1alpha1.MPIJob, err error) { + result = &v1alpha1.MPIJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("mpijobs"). + Name(mPIJob.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(mPIJob). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the mPIJob and deletes it. Returns an error if one occurs. +func (c *mPIJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("mpijobs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *mPIJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("mpijobs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched mPIJob. +func (c *mPIJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MPIJob, err error) { + result = &v1alpha1.MPIJob{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("mpijobs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/pytorchjob.go b/client/clientset/versioned/typed/training/v1alpha1/pytorchjob.go new file mode 100644 index 00000000..f9ed2e8f --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/pytorchjob.go @@ -0,0 +1,194 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + scheme "github.com/alibaba/kubedl/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// PyTorchJobsGetter has a method to return a PyTorchJobInterface. +// A group's client should implement this interface. +type PyTorchJobsGetter interface { + PyTorchJobs(namespace string) PyTorchJobInterface +} + +// PyTorchJobInterface has methods to work with PyTorchJob resources. +type PyTorchJobInterface interface { + Create(ctx context.Context, pyTorchJob *v1alpha1.PyTorchJob, opts v1.CreateOptions) (*v1alpha1.PyTorchJob, error) + Update(ctx context.Context, pyTorchJob *v1alpha1.PyTorchJob, opts v1.UpdateOptions) (*v1alpha1.PyTorchJob, error) + UpdateStatus(ctx context.Context, pyTorchJob *v1alpha1.PyTorchJob, opts v1.UpdateOptions) (*v1alpha1.PyTorchJob, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PyTorchJob, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PyTorchJobList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PyTorchJob, err error) + PyTorchJobExpansion +} + +// pyTorchJobs implements PyTorchJobInterface +type pyTorchJobs struct { + client rest.Interface + ns string +} + +// newPyTorchJobs returns a PyTorchJobs +func newPyTorchJobs(c *TrainingV1alpha1Client, namespace string) *pyTorchJobs { + return &pyTorchJobs{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the pyTorchJob, and returns the corresponding pyTorchJob object, and an error if there is any. +func (c *pyTorchJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PyTorchJob, err error) { + result = &v1alpha1.PyTorchJob{} + err = c.client.Get(). + Namespace(c.ns). + Resource("pytorchjobs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of PyTorchJobs that match those selectors. +func (c *pyTorchJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PyTorchJobList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.PyTorchJobList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("pytorchjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested pyTorchJobs. +func (c *pyTorchJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("pytorchjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a pyTorchJob and creates it. Returns the server's representation of the pyTorchJob, and an error, if there is any. +func (c *pyTorchJobs) Create(ctx context.Context, pyTorchJob *v1alpha1.PyTorchJob, opts v1.CreateOptions) (result *v1alpha1.PyTorchJob, err error) { + result = &v1alpha1.PyTorchJob{} + err = c.client.Post(). + Namespace(c.ns). + Resource("pytorchjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(pyTorchJob). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a pyTorchJob and updates it. Returns the server's representation of the pyTorchJob, and an error, if there is any. +func (c *pyTorchJobs) Update(ctx context.Context, pyTorchJob *v1alpha1.PyTorchJob, opts v1.UpdateOptions) (result *v1alpha1.PyTorchJob, err error) { + result = &v1alpha1.PyTorchJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("pytorchjobs"). + Name(pyTorchJob.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(pyTorchJob). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *pyTorchJobs) UpdateStatus(ctx context.Context, pyTorchJob *v1alpha1.PyTorchJob, opts v1.UpdateOptions) (result *v1alpha1.PyTorchJob, err error) { + result = &v1alpha1.PyTorchJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("pytorchjobs"). + Name(pyTorchJob.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(pyTorchJob). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the pyTorchJob and deletes it. Returns an error if one occurs. +func (c *pyTorchJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("pytorchjobs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *pyTorchJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("pytorchjobs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched pyTorchJob. +func (c *pyTorchJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PyTorchJob, err error) { + result = &v1alpha1.PyTorchJob{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("pytorchjobs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/tfjob.go b/client/clientset/versioned/typed/training/v1alpha1/tfjob.go new file mode 100644 index 00000000..8ed3ee6b --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/tfjob.go @@ -0,0 +1,194 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + scheme "github.com/alibaba/kubedl/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// TFJobsGetter has a method to return a TFJobInterface. +// A group's client should implement this interface. +type TFJobsGetter interface { + TFJobs(namespace string) TFJobInterface +} + +// TFJobInterface has methods to work with TFJob resources. +type TFJobInterface interface { + Create(ctx context.Context, tFJob *v1alpha1.TFJob, opts v1.CreateOptions) (*v1alpha1.TFJob, error) + Update(ctx context.Context, tFJob *v1alpha1.TFJob, opts v1.UpdateOptions) (*v1alpha1.TFJob, error) + UpdateStatus(ctx context.Context, tFJob *v1alpha1.TFJob, opts v1.UpdateOptions) (*v1alpha1.TFJob, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.TFJob, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.TFJobList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TFJob, err error) + TFJobExpansion +} + +// tFJobs implements TFJobInterface +type tFJobs struct { + client rest.Interface + ns string +} + +// newTFJobs returns a TFJobs +func newTFJobs(c *TrainingV1alpha1Client, namespace string) *tFJobs { + return &tFJobs{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the tFJob, and returns the corresponding tFJob object, and an error if there is any. +func (c *tFJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TFJob, err error) { + result = &v1alpha1.TFJob{} + err = c.client.Get(). + Namespace(c.ns). + Resource("tfjobs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of TFJobs that match those selectors. +func (c *tFJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TFJobList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.TFJobList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("tfjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested tFJobs. +func (c *tFJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("tfjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a tFJob and creates it. Returns the server's representation of the tFJob, and an error, if there is any. +func (c *tFJobs) Create(ctx context.Context, tFJob *v1alpha1.TFJob, opts v1.CreateOptions) (result *v1alpha1.TFJob, err error) { + result = &v1alpha1.TFJob{} + err = c.client.Post(). + Namespace(c.ns). + Resource("tfjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(tFJob). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a tFJob and updates it. Returns the server's representation of the tFJob, and an error, if there is any. +func (c *tFJobs) Update(ctx context.Context, tFJob *v1alpha1.TFJob, opts v1.UpdateOptions) (result *v1alpha1.TFJob, err error) { + result = &v1alpha1.TFJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("tfjobs"). + Name(tFJob.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(tFJob). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *tFJobs) UpdateStatus(ctx context.Context, tFJob *v1alpha1.TFJob, opts v1.UpdateOptions) (result *v1alpha1.TFJob, err error) { + result = &v1alpha1.TFJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("tfjobs"). + Name(tFJob.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(tFJob). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the tFJob and deletes it. Returns an error if one occurs. +func (c *tFJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("tfjobs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *tFJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("tfjobs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched tFJob. +func (c *tFJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TFJob, err error) { + result = &v1alpha1.TFJob{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("tfjobs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/training_client.go b/client/clientset/versioned/typed/training/v1alpha1/training_client.go new file mode 100644 index 00000000..8f3b554e --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/training_client.go @@ -0,0 +1,118 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + "github.com/alibaba/kubedl/client/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type TrainingV1alpha1Interface interface { + RESTClient() rest.Interface + ElasticDLJobsGetter + MPIJobsGetter + MarsJobsGetter + PyTorchJobsGetter + TFJobsGetter + XDLJobsGetter + XGBoostJobsGetter +} + +// TrainingV1alpha1Client is used to interact with features provided by the training.kubedl.io group. +type TrainingV1alpha1Client struct { + restClient rest.Interface +} + +func (c *TrainingV1alpha1Client) ElasticDLJobs(namespace string) ElasticDLJobInterface { + return newElasticDLJobs(c, namespace) +} + +func (c *TrainingV1alpha1Client) MPIJobs(namespace string) MPIJobInterface { + return newMPIJobs(c, namespace) +} + +func (c *TrainingV1alpha1Client) MarsJobs(namespace string) MarsJobInterface { + return newMarsJobs(c, namespace) +} + +func (c *TrainingV1alpha1Client) PyTorchJobs(namespace string) PyTorchJobInterface { + return newPyTorchJobs(c, namespace) +} + +func (c *TrainingV1alpha1Client) TFJobs(namespace string) TFJobInterface { + return newTFJobs(c, namespace) +} + +func (c *TrainingV1alpha1Client) XDLJobs(namespace string) XDLJobInterface { + return newXDLJobs(c, namespace) +} + +func (c *TrainingV1alpha1Client) XGBoostJobs(namespace string) XGBoostJobInterface { + return newXGBoostJobs(c, namespace) +} + +// NewForConfig creates a new TrainingV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*TrainingV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &TrainingV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new TrainingV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *TrainingV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new TrainingV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *TrainingV1alpha1Client { + return &TrainingV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *TrainingV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/xdljob.go b/client/clientset/versioned/typed/training/v1alpha1/xdljob.go new file mode 100644 index 00000000..4b3a6f1e --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/xdljob.go @@ -0,0 +1,194 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + scheme "github.com/alibaba/kubedl/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// XDLJobsGetter has a method to return a XDLJobInterface. +// A group's client should implement this interface. +type XDLJobsGetter interface { + XDLJobs(namespace string) XDLJobInterface +} + +// XDLJobInterface has methods to work with XDLJob resources. +type XDLJobInterface interface { + Create(ctx context.Context, xDLJob *v1alpha1.XDLJob, opts v1.CreateOptions) (*v1alpha1.XDLJob, error) + Update(ctx context.Context, xDLJob *v1alpha1.XDLJob, opts v1.UpdateOptions) (*v1alpha1.XDLJob, error) + UpdateStatus(ctx context.Context, xDLJob *v1alpha1.XDLJob, opts v1.UpdateOptions) (*v1alpha1.XDLJob, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.XDLJob, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.XDLJobList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.XDLJob, err error) + XDLJobExpansion +} + +// xDLJobs implements XDLJobInterface +type xDLJobs struct { + client rest.Interface + ns string +} + +// newXDLJobs returns a XDLJobs +func newXDLJobs(c *TrainingV1alpha1Client, namespace string) *xDLJobs { + return &xDLJobs{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the xDLJob, and returns the corresponding xDLJob object, and an error if there is any. +func (c *xDLJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.XDLJob, err error) { + result = &v1alpha1.XDLJob{} + err = c.client.Get(). + Namespace(c.ns). + Resource("xdljobs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of XDLJobs that match those selectors. +func (c *xDLJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.XDLJobList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.XDLJobList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("xdljobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested xDLJobs. +func (c *xDLJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("xdljobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a xDLJob and creates it. Returns the server's representation of the xDLJob, and an error, if there is any. +func (c *xDLJobs) Create(ctx context.Context, xDLJob *v1alpha1.XDLJob, opts v1.CreateOptions) (result *v1alpha1.XDLJob, err error) { + result = &v1alpha1.XDLJob{} + err = c.client.Post(). + Namespace(c.ns). + Resource("xdljobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(xDLJob). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a xDLJob and updates it. Returns the server's representation of the xDLJob, and an error, if there is any. +func (c *xDLJobs) Update(ctx context.Context, xDLJob *v1alpha1.XDLJob, opts v1.UpdateOptions) (result *v1alpha1.XDLJob, err error) { + result = &v1alpha1.XDLJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("xdljobs"). + Name(xDLJob.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(xDLJob). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *xDLJobs) UpdateStatus(ctx context.Context, xDLJob *v1alpha1.XDLJob, opts v1.UpdateOptions) (result *v1alpha1.XDLJob, err error) { + result = &v1alpha1.XDLJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("xdljobs"). + Name(xDLJob.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(xDLJob). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the xDLJob and deletes it. Returns an error if one occurs. +func (c *xDLJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("xdljobs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *xDLJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("xdljobs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched xDLJob. +func (c *xDLJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.XDLJob, err error) { + result = &v1alpha1.XDLJob{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("xdljobs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/client/clientset/versioned/typed/training/v1alpha1/xgboostjob.go b/client/clientset/versioned/typed/training/v1alpha1/xgboostjob.go new file mode 100644 index 00000000..1da7b590 --- /dev/null +++ b/client/clientset/versioned/typed/training/v1alpha1/xgboostjob.go @@ -0,0 +1,194 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + scheme "github.com/alibaba/kubedl/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// XGBoostJobsGetter has a method to return a XGBoostJobInterface. +// A group's client should implement this interface. +type XGBoostJobsGetter interface { + XGBoostJobs(namespace string) XGBoostJobInterface +} + +// XGBoostJobInterface has methods to work with XGBoostJob resources. +type XGBoostJobInterface interface { + Create(ctx context.Context, xGBoostJob *v1alpha1.XGBoostJob, opts v1.CreateOptions) (*v1alpha1.XGBoostJob, error) + Update(ctx context.Context, xGBoostJob *v1alpha1.XGBoostJob, opts v1.UpdateOptions) (*v1alpha1.XGBoostJob, error) + UpdateStatus(ctx context.Context, xGBoostJob *v1alpha1.XGBoostJob, opts v1.UpdateOptions) (*v1alpha1.XGBoostJob, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.XGBoostJob, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.XGBoostJobList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.XGBoostJob, err error) + XGBoostJobExpansion +} + +// xGBoostJobs implements XGBoostJobInterface +type xGBoostJobs struct { + client rest.Interface + ns string +} + +// newXGBoostJobs returns a XGBoostJobs +func newXGBoostJobs(c *TrainingV1alpha1Client, namespace string) *xGBoostJobs { + return &xGBoostJobs{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the xGBoostJob, and returns the corresponding xGBoostJob object, and an error if there is any. +func (c *xGBoostJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.XGBoostJob, err error) { + result = &v1alpha1.XGBoostJob{} + err = c.client.Get(). + Namespace(c.ns). + Resource("xgboostjobs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of XGBoostJobs that match those selectors. +func (c *xGBoostJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.XGBoostJobList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.XGBoostJobList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("xgboostjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested xGBoostJobs. +func (c *xGBoostJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("xgboostjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a xGBoostJob and creates it. Returns the server's representation of the xGBoostJob, and an error, if there is any. +func (c *xGBoostJobs) Create(ctx context.Context, xGBoostJob *v1alpha1.XGBoostJob, opts v1.CreateOptions) (result *v1alpha1.XGBoostJob, err error) { + result = &v1alpha1.XGBoostJob{} + err = c.client.Post(). + Namespace(c.ns). + Resource("xgboostjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(xGBoostJob). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a xGBoostJob and updates it. Returns the server's representation of the xGBoostJob, and an error, if there is any. +func (c *xGBoostJobs) Update(ctx context.Context, xGBoostJob *v1alpha1.XGBoostJob, opts v1.UpdateOptions) (result *v1alpha1.XGBoostJob, err error) { + result = &v1alpha1.XGBoostJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("xgboostjobs"). + Name(xGBoostJob.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(xGBoostJob). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *xGBoostJobs) UpdateStatus(ctx context.Context, xGBoostJob *v1alpha1.XGBoostJob, opts v1.UpdateOptions) (result *v1alpha1.XGBoostJob, err error) { + result = &v1alpha1.XGBoostJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("xgboostjobs"). + Name(xGBoostJob.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(xGBoostJob). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the xGBoostJob and deletes it. Returns an error if one occurs. +func (c *xGBoostJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("xgboostjobs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *xGBoostJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("xgboostjobs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched xGBoostJob. +func (c *xGBoostJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.XGBoostJob, err error) { + result = &v1alpha1.XGBoostJob{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("xgboostjobs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/client/informers/externalversions/factory.go b/client/informers/externalversions/factory.go new file mode 100644 index 00000000..3c98795a --- /dev/null +++ b/client/informers/externalversions/factory.go @@ -0,0 +1,179 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package externalversions + +import ( + reflect "reflect" + sync "sync" + time "time" + + versioned "github.com/alibaba/kubedl/client/clientset/versioned" + internalinterfaces "github.com/alibaba/kubedl/client/informers/externalversions/internalinterfaces" + training "github.com/alibaba/kubedl/client/informers/externalversions/training" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" +) + +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + +type sharedInformerFactory struct { + client versioned.Interface + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc + lock sync.Mutex + defaultResync time.Duration + customResync map[reflect.Type]time.Duration + + informers map[reflect.Type]cache.SharedIndexInformer + // startedInformers is used for tracking which informers have been started. + // This allows Start() to be called multiple times safely. + startedInformers map[reflect.Type]bool +} + +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. +func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { + return NewSharedInformerFactoryWithOptions(client, defaultResync) +} + +// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. +// Listers obtained via this SharedInformerFactory will be subject to the same filters +// as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead +func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ + client: client, + namespace: v1.NamespaceAll, + defaultResync: defaultResync, + informers: make(map[reflect.Type]cache.SharedIndexInformer), + startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) + } + + return factory +} + +// Start initializes all requested informers. +func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { + f.lock.Lock() + defer f.lock.Unlock() + + for informerType, informer := range f.informers { + if !f.startedInformers[informerType] { + go informer.Run(stopCh) + f.startedInformers[informerType] = true + } + } +} + +// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { + informers := func() map[reflect.Type]cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informers := map[reflect.Type]cache.SharedIndexInformer{} + for informerType, informer := range f.informers { + if f.startedInformers[informerType] { + informers[informerType] = informer + } + } + return informers + }() + + res := map[reflect.Type]bool{} + for informType, informer := range informers { + res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) + } + return res +} + +// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// client. +func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informerType := reflect.TypeOf(obj) + informer, exists := f.informers[informerType] + if exists { + return informer + } + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) + f.informers[informerType] = informer + + return informer +} + +// SharedInformerFactory provides shared informers for resources in all known +// API group versions. +type SharedInformerFactory interface { + internalinterfaces.SharedInformerFactory + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + + Training() training.Interface +} + +func (f *sharedInformerFactory) Training() training.Interface { + return training.New(f, f.namespace, f.tweakListOptions) +} diff --git a/client/informers/externalversions/generic.go b/client/informers/externalversions/generic.go new file mode 100644 index 00000000..dd6c5dd6 --- /dev/null +++ b/client/informers/externalversions/generic.go @@ -0,0 +1,73 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package externalversions + +import ( + "fmt" + + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" +) + +// GenericInformer is type of SharedIndexInformer which will locate and delegate to other +// sharedInformers based on type +type GenericInformer interface { + Informer() cache.SharedIndexInformer + Lister() cache.GenericLister +} + +type genericInformer struct { + informer cache.SharedIndexInformer + resource schema.GroupResource +} + +// Informer returns the SharedIndexInformer. +func (f *genericInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +// Lister returns the GenericLister. +func (f *genericInformer) Lister() cache.GenericLister { + return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) +} + +// ForResource gives generic access to a shared informer of the matching type +// TODO extend this to unknown resources with a client pool +func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { + switch resource { + // Group=training.kubedl.io, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("elasticdljobs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Training().V1alpha1().ElasticDLJobs().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("mpijobs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Training().V1alpha1().MPIJobs().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("marsjobs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Training().V1alpha1().MarsJobs().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("pytorchjobs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Training().V1alpha1().PyTorchJobs().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("tfjobs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Training().V1alpha1().TFJobs().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("xdljobs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Training().V1alpha1().XDLJobs().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("xgboostjobs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Training().V1alpha1().XGBoostJobs().Informer()}, nil + + } + + return nil, fmt.Errorf("no informer found for %v", resource) +} diff --git a/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/client/informers/externalversions/internalinterfaces/factory_interfaces.go new file mode 100644 index 00000000..5061b745 --- /dev/null +++ b/client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -0,0 +1,39 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package internalinterfaces + +import ( + time "time" + + versioned "github.com/alibaba/kubedl/client/clientset/versioned" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + cache "k8s.io/client-go/tools/cache" +) + +// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. +type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer + +// SharedInformerFactory a small interface to allow for adding an informer without an import cycle +type SharedInformerFactory interface { + Start(stopCh <-chan struct{}) + InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer +} + +// TweakListOptionsFunc is a function that transforms a v1.ListOptions. +type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/client/informers/externalversions/training/interface.go b/client/informers/externalversions/training/interface.go new file mode 100644 index 00000000..d262fa40 --- /dev/null +++ b/client/informers/externalversions/training/interface.go @@ -0,0 +1,45 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package training + +import ( + internalinterfaces "github.com/alibaba/kubedl/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/alibaba/kubedl/client/informers/externalversions/training/v1alpha1" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1alpha1 provides access to shared informers for resources in V1alpha1. + V1alpha1() v1alpha1.Interface +} + +type group struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// V1alpha1 returns a new v1alpha1.Interface. +func (g *group) V1alpha1() v1alpha1.Interface { + return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/client/informers/externalversions/training/v1alpha1/elasticdljob.go b/client/informers/externalversions/training/v1alpha1/elasticdljob.go new file mode 100644 index 00000000..5d02c437 --- /dev/null +++ b/client/informers/externalversions/training/v1alpha1/elasticdljob.go @@ -0,0 +1,89 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + versioned "github.com/alibaba/kubedl/client/clientset/versioned" + internalinterfaces "github.com/alibaba/kubedl/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/alibaba/kubedl/client/listers/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// ElasticDLJobInformer provides access to a shared informer and lister for +// ElasticDLJobs. +type ElasticDLJobInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ElasticDLJobLister +} + +type elasticDLJobInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewElasticDLJobInformer constructs a new informer for ElasticDLJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewElasticDLJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredElasticDLJobInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredElasticDLJobInformer constructs a new informer for ElasticDLJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredElasticDLJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().ElasticDLJobs(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().ElasticDLJobs(namespace).Watch(context.TODO(), options) + }, + }, + &trainingv1alpha1.ElasticDLJob{}, + resyncPeriod, + indexers, + ) +} + +func (f *elasticDLJobInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredElasticDLJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *elasticDLJobInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&trainingv1alpha1.ElasticDLJob{}, f.defaultInformer) +} + +func (f *elasticDLJobInformer) Lister() v1alpha1.ElasticDLJobLister { + return v1alpha1.NewElasticDLJobLister(f.Informer().GetIndexer()) +} diff --git a/client/informers/externalversions/training/v1alpha1/interface.go b/client/informers/externalversions/training/v1alpha1/interface.go new file mode 100644 index 00000000..ec2a7b69 --- /dev/null +++ b/client/informers/externalversions/training/v1alpha1/interface.go @@ -0,0 +1,86 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + internalinterfaces "github.com/alibaba/kubedl/client/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // ElasticDLJobs returns a ElasticDLJobInformer. + ElasticDLJobs() ElasticDLJobInformer + // MPIJobs returns a MPIJobInformer. + MPIJobs() MPIJobInformer + // MarsJobs returns a MarsJobInformer. + MarsJobs() MarsJobInformer + // PyTorchJobs returns a PyTorchJobInformer. + PyTorchJobs() PyTorchJobInformer + // TFJobs returns a TFJobInformer. + TFJobs() TFJobInformer + // XDLJobs returns a XDLJobInformer. + XDLJobs() XDLJobInformer + // XGBoostJobs returns a XGBoostJobInformer. + XGBoostJobs() XGBoostJobInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// ElasticDLJobs returns a ElasticDLJobInformer. +func (v *version) ElasticDLJobs() ElasticDLJobInformer { + return &elasticDLJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// MPIJobs returns a MPIJobInformer. +func (v *version) MPIJobs() MPIJobInformer { + return &mPIJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// MarsJobs returns a MarsJobInformer. +func (v *version) MarsJobs() MarsJobInformer { + return &marsJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// PyTorchJobs returns a PyTorchJobInformer. +func (v *version) PyTorchJobs() PyTorchJobInformer { + return &pyTorchJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// TFJobs returns a TFJobInformer. +func (v *version) TFJobs() TFJobInformer { + return &tFJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// XDLJobs returns a XDLJobInformer. +func (v *version) XDLJobs() XDLJobInformer { + return &xDLJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// XGBoostJobs returns a XGBoostJobInformer. +func (v *version) XGBoostJobs() XGBoostJobInformer { + return &xGBoostJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/client/informers/externalversions/training/v1alpha1/marsjob.go b/client/informers/externalversions/training/v1alpha1/marsjob.go new file mode 100644 index 00000000..3484ddcb --- /dev/null +++ b/client/informers/externalversions/training/v1alpha1/marsjob.go @@ -0,0 +1,89 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + versioned "github.com/alibaba/kubedl/client/clientset/versioned" + internalinterfaces "github.com/alibaba/kubedl/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/alibaba/kubedl/client/listers/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// MarsJobInformer provides access to a shared informer and lister for +// MarsJobs. +type MarsJobInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.MarsJobLister +} + +type marsJobInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewMarsJobInformer constructs a new informer for MarsJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewMarsJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredMarsJobInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredMarsJobInformer constructs a new informer for MarsJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredMarsJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().MarsJobs(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().MarsJobs(namespace).Watch(context.TODO(), options) + }, + }, + &trainingv1alpha1.MarsJob{}, + resyncPeriod, + indexers, + ) +} + +func (f *marsJobInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredMarsJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *marsJobInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&trainingv1alpha1.MarsJob{}, f.defaultInformer) +} + +func (f *marsJobInformer) Lister() v1alpha1.MarsJobLister { + return v1alpha1.NewMarsJobLister(f.Informer().GetIndexer()) +} diff --git a/client/informers/externalversions/training/v1alpha1/mpijob.go b/client/informers/externalversions/training/v1alpha1/mpijob.go new file mode 100644 index 00000000..d4bbdc26 --- /dev/null +++ b/client/informers/externalversions/training/v1alpha1/mpijob.go @@ -0,0 +1,89 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + versioned "github.com/alibaba/kubedl/client/clientset/versioned" + internalinterfaces "github.com/alibaba/kubedl/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/alibaba/kubedl/client/listers/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// MPIJobInformer provides access to a shared informer and lister for +// MPIJobs. +type MPIJobInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.MPIJobLister +} + +type mPIJobInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewMPIJobInformer constructs a new informer for MPIJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewMPIJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredMPIJobInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredMPIJobInformer constructs a new informer for MPIJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredMPIJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().MPIJobs(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().MPIJobs(namespace).Watch(context.TODO(), options) + }, + }, + &trainingv1alpha1.MPIJob{}, + resyncPeriod, + indexers, + ) +} + +func (f *mPIJobInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredMPIJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *mPIJobInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&trainingv1alpha1.MPIJob{}, f.defaultInformer) +} + +func (f *mPIJobInformer) Lister() v1alpha1.MPIJobLister { + return v1alpha1.NewMPIJobLister(f.Informer().GetIndexer()) +} diff --git a/client/informers/externalversions/training/v1alpha1/pytorchjob.go b/client/informers/externalversions/training/v1alpha1/pytorchjob.go new file mode 100644 index 00000000..17c2e70d --- /dev/null +++ b/client/informers/externalversions/training/v1alpha1/pytorchjob.go @@ -0,0 +1,89 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + versioned "github.com/alibaba/kubedl/client/clientset/versioned" + internalinterfaces "github.com/alibaba/kubedl/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/alibaba/kubedl/client/listers/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// PyTorchJobInformer provides access to a shared informer and lister for +// PyTorchJobs. +type PyTorchJobInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.PyTorchJobLister +} + +type pyTorchJobInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewPyTorchJobInformer constructs a new informer for PyTorchJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewPyTorchJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredPyTorchJobInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredPyTorchJobInformer constructs a new informer for PyTorchJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredPyTorchJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().PyTorchJobs(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().PyTorchJobs(namespace).Watch(context.TODO(), options) + }, + }, + &trainingv1alpha1.PyTorchJob{}, + resyncPeriod, + indexers, + ) +} + +func (f *pyTorchJobInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredPyTorchJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *pyTorchJobInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&trainingv1alpha1.PyTorchJob{}, f.defaultInformer) +} + +func (f *pyTorchJobInformer) Lister() v1alpha1.PyTorchJobLister { + return v1alpha1.NewPyTorchJobLister(f.Informer().GetIndexer()) +} diff --git a/client/informers/externalversions/training/v1alpha1/tfjob.go b/client/informers/externalversions/training/v1alpha1/tfjob.go new file mode 100644 index 00000000..218e9170 --- /dev/null +++ b/client/informers/externalversions/training/v1alpha1/tfjob.go @@ -0,0 +1,89 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + versioned "github.com/alibaba/kubedl/client/clientset/versioned" + internalinterfaces "github.com/alibaba/kubedl/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/alibaba/kubedl/client/listers/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// TFJobInformer provides access to a shared informer and lister for +// TFJobs. +type TFJobInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.TFJobLister +} + +type tFJobInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewTFJobInformer constructs a new informer for TFJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewTFJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredTFJobInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredTFJobInformer constructs a new informer for TFJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredTFJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().TFJobs(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().TFJobs(namespace).Watch(context.TODO(), options) + }, + }, + &trainingv1alpha1.TFJob{}, + resyncPeriod, + indexers, + ) +} + +func (f *tFJobInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredTFJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *tFJobInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&trainingv1alpha1.TFJob{}, f.defaultInformer) +} + +func (f *tFJobInformer) Lister() v1alpha1.TFJobLister { + return v1alpha1.NewTFJobLister(f.Informer().GetIndexer()) +} diff --git a/client/informers/externalversions/training/v1alpha1/xdljob.go b/client/informers/externalversions/training/v1alpha1/xdljob.go new file mode 100644 index 00000000..2540fde3 --- /dev/null +++ b/client/informers/externalversions/training/v1alpha1/xdljob.go @@ -0,0 +1,89 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + versioned "github.com/alibaba/kubedl/client/clientset/versioned" + internalinterfaces "github.com/alibaba/kubedl/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/alibaba/kubedl/client/listers/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// XDLJobInformer provides access to a shared informer and lister for +// XDLJobs. +type XDLJobInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.XDLJobLister +} + +type xDLJobInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewXDLJobInformer constructs a new informer for XDLJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewXDLJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredXDLJobInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredXDLJobInformer constructs a new informer for XDLJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredXDLJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().XDLJobs(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().XDLJobs(namespace).Watch(context.TODO(), options) + }, + }, + &trainingv1alpha1.XDLJob{}, + resyncPeriod, + indexers, + ) +} + +func (f *xDLJobInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredXDLJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *xDLJobInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&trainingv1alpha1.XDLJob{}, f.defaultInformer) +} + +func (f *xDLJobInformer) Lister() v1alpha1.XDLJobLister { + return v1alpha1.NewXDLJobLister(f.Informer().GetIndexer()) +} diff --git a/client/informers/externalversions/training/v1alpha1/xgboostjob.go b/client/informers/externalversions/training/v1alpha1/xgboostjob.go new file mode 100644 index 00000000..a2d23ae5 --- /dev/null +++ b/client/informers/externalversions/training/v1alpha1/xgboostjob.go @@ -0,0 +1,89 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + versioned "github.com/alibaba/kubedl/client/clientset/versioned" + internalinterfaces "github.com/alibaba/kubedl/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/alibaba/kubedl/client/listers/training/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// XGBoostJobInformer provides access to a shared informer and lister for +// XGBoostJobs. +type XGBoostJobInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.XGBoostJobLister +} + +type xGBoostJobInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewXGBoostJobInformer constructs a new informer for XGBoostJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewXGBoostJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredXGBoostJobInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredXGBoostJobInformer constructs a new informer for XGBoostJob type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredXGBoostJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().XGBoostJobs(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TrainingV1alpha1().XGBoostJobs(namespace).Watch(context.TODO(), options) + }, + }, + &trainingv1alpha1.XGBoostJob{}, + resyncPeriod, + indexers, + ) +} + +func (f *xGBoostJobInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredXGBoostJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *xGBoostJobInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&trainingv1alpha1.XGBoostJob{}, f.defaultInformer) +} + +func (f *xGBoostJobInformer) Lister() v1alpha1.XGBoostJobLister { + return v1alpha1.NewXGBoostJobLister(f.Informer().GetIndexer()) +} diff --git a/client/listers/training/v1alpha1/elasticdljob.go b/client/listers/training/v1alpha1/elasticdljob.go new file mode 100644 index 00000000..0e185d64 --- /dev/null +++ b/client/listers/training/v1alpha1/elasticdljob.go @@ -0,0 +1,93 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ElasticDLJobLister helps list ElasticDLJobs. +type ElasticDLJobLister interface { + // List lists all ElasticDLJobs in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.ElasticDLJob, err error) + // ElasticDLJobs returns an object that can list and get ElasticDLJobs. + ElasticDLJobs(namespace string) ElasticDLJobNamespaceLister + ElasticDLJobListerExpansion +} + +// elasticDLJobLister implements the ElasticDLJobLister interface. +type elasticDLJobLister struct { + indexer cache.Indexer +} + +// NewElasticDLJobLister returns a new ElasticDLJobLister. +func NewElasticDLJobLister(indexer cache.Indexer) ElasticDLJobLister { + return &elasticDLJobLister{indexer: indexer} +} + +// List lists all ElasticDLJobs in the indexer. +func (s *elasticDLJobLister) List(selector labels.Selector) (ret []*v1alpha1.ElasticDLJob, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ElasticDLJob)) + }) + return ret, err +} + +// ElasticDLJobs returns an object that can list and get ElasticDLJobs. +func (s *elasticDLJobLister) ElasticDLJobs(namespace string) ElasticDLJobNamespaceLister { + return elasticDLJobNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ElasticDLJobNamespaceLister helps list and get ElasticDLJobs. +type ElasticDLJobNamespaceLister interface { + // List lists all ElasticDLJobs in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.ElasticDLJob, err error) + // Get retrieves the ElasticDLJob from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.ElasticDLJob, error) + ElasticDLJobNamespaceListerExpansion +} + +// elasticDLJobNamespaceLister implements the ElasticDLJobNamespaceLister +// interface. +type elasticDLJobNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ElasticDLJobs in the indexer for a given namespace. +func (s elasticDLJobNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ElasticDLJob, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ElasticDLJob)) + }) + return ret, err +} + +// Get retrieves the ElasticDLJob from the indexer for a given namespace and name. +func (s elasticDLJobNamespaceLister) Get(name string) (*v1alpha1.ElasticDLJob, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("elasticdljob"), name) + } + return obj.(*v1alpha1.ElasticDLJob), nil +} diff --git a/client/listers/training/v1alpha1/expansion_generated.go b/client/listers/training/v1alpha1/expansion_generated.go new file mode 100644 index 00000000..4a171483 --- /dev/null +++ b/client/listers/training/v1alpha1/expansion_generated.go @@ -0,0 +1,74 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +// ElasticDLJobListerExpansion allows custom methods to be added to +// ElasticDLJobLister. +type ElasticDLJobListerExpansion interface{} + +// ElasticDLJobNamespaceListerExpansion allows custom methods to be added to +// ElasticDLJobNamespaceLister. +type ElasticDLJobNamespaceListerExpansion interface{} + +// MPIJobListerExpansion allows custom methods to be added to +// MPIJobLister. +type MPIJobListerExpansion interface{} + +// MPIJobNamespaceListerExpansion allows custom methods to be added to +// MPIJobNamespaceLister. +type MPIJobNamespaceListerExpansion interface{} + +// MarsJobListerExpansion allows custom methods to be added to +// MarsJobLister. +type MarsJobListerExpansion interface{} + +// MarsJobNamespaceListerExpansion allows custom methods to be added to +// MarsJobNamespaceLister. +type MarsJobNamespaceListerExpansion interface{} + +// PyTorchJobListerExpansion allows custom methods to be added to +// PyTorchJobLister. +type PyTorchJobListerExpansion interface{} + +// PyTorchJobNamespaceListerExpansion allows custom methods to be added to +// PyTorchJobNamespaceLister. +type PyTorchJobNamespaceListerExpansion interface{} + +// TFJobListerExpansion allows custom methods to be added to +// TFJobLister. +type TFJobListerExpansion interface{} + +// TFJobNamespaceListerExpansion allows custom methods to be added to +// TFJobNamespaceLister. +type TFJobNamespaceListerExpansion interface{} + +// XDLJobListerExpansion allows custom methods to be added to +// XDLJobLister. +type XDLJobListerExpansion interface{} + +// XDLJobNamespaceListerExpansion allows custom methods to be added to +// XDLJobNamespaceLister. +type XDLJobNamespaceListerExpansion interface{} + +// XGBoostJobListerExpansion allows custom methods to be added to +// XGBoostJobLister. +type XGBoostJobListerExpansion interface{} + +// XGBoostJobNamespaceListerExpansion allows custom methods to be added to +// XGBoostJobNamespaceLister. +type XGBoostJobNamespaceListerExpansion interface{} diff --git a/client/listers/training/v1alpha1/marsjob.go b/client/listers/training/v1alpha1/marsjob.go new file mode 100644 index 00000000..beab3154 --- /dev/null +++ b/client/listers/training/v1alpha1/marsjob.go @@ -0,0 +1,93 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// MarsJobLister helps list MarsJobs. +type MarsJobLister interface { + // List lists all MarsJobs in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.MarsJob, err error) + // MarsJobs returns an object that can list and get MarsJobs. + MarsJobs(namespace string) MarsJobNamespaceLister + MarsJobListerExpansion +} + +// marsJobLister implements the MarsJobLister interface. +type marsJobLister struct { + indexer cache.Indexer +} + +// NewMarsJobLister returns a new MarsJobLister. +func NewMarsJobLister(indexer cache.Indexer) MarsJobLister { + return &marsJobLister{indexer: indexer} +} + +// List lists all MarsJobs in the indexer. +func (s *marsJobLister) List(selector labels.Selector) (ret []*v1alpha1.MarsJob, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.MarsJob)) + }) + return ret, err +} + +// MarsJobs returns an object that can list and get MarsJobs. +func (s *marsJobLister) MarsJobs(namespace string) MarsJobNamespaceLister { + return marsJobNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// MarsJobNamespaceLister helps list and get MarsJobs. +type MarsJobNamespaceLister interface { + // List lists all MarsJobs in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.MarsJob, err error) + // Get retrieves the MarsJob from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.MarsJob, error) + MarsJobNamespaceListerExpansion +} + +// marsJobNamespaceLister implements the MarsJobNamespaceLister +// interface. +type marsJobNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all MarsJobs in the indexer for a given namespace. +func (s marsJobNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.MarsJob, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.MarsJob)) + }) + return ret, err +} + +// Get retrieves the MarsJob from the indexer for a given namespace and name. +func (s marsJobNamespaceLister) Get(name string) (*v1alpha1.MarsJob, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("marsjob"), name) + } + return obj.(*v1alpha1.MarsJob), nil +} diff --git a/client/listers/training/v1alpha1/mpijob.go b/client/listers/training/v1alpha1/mpijob.go new file mode 100644 index 00000000..f3c1d6c0 --- /dev/null +++ b/client/listers/training/v1alpha1/mpijob.go @@ -0,0 +1,93 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// MPIJobLister helps list MPIJobs. +type MPIJobLister interface { + // List lists all MPIJobs in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.MPIJob, err error) + // MPIJobs returns an object that can list and get MPIJobs. + MPIJobs(namespace string) MPIJobNamespaceLister + MPIJobListerExpansion +} + +// mPIJobLister implements the MPIJobLister interface. +type mPIJobLister struct { + indexer cache.Indexer +} + +// NewMPIJobLister returns a new MPIJobLister. +func NewMPIJobLister(indexer cache.Indexer) MPIJobLister { + return &mPIJobLister{indexer: indexer} +} + +// List lists all MPIJobs in the indexer. +func (s *mPIJobLister) List(selector labels.Selector) (ret []*v1alpha1.MPIJob, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.MPIJob)) + }) + return ret, err +} + +// MPIJobs returns an object that can list and get MPIJobs. +func (s *mPIJobLister) MPIJobs(namespace string) MPIJobNamespaceLister { + return mPIJobNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// MPIJobNamespaceLister helps list and get MPIJobs. +type MPIJobNamespaceLister interface { + // List lists all MPIJobs in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.MPIJob, err error) + // Get retrieves the MPIJob from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.MPIJob, error) + MPIJobNamespaceListerExpansion +} + +// mPIJobNamespaceLister implements the MPIJobNamespaceLister +// interface. +type mPIJobNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all MPIJobs in the indexer for a given namespace. +func (s mPIJobNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.MPIJob, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.MPIJob)) + }) + return ret, err +} + +// Get retrieves the MPIJob from the indexer for a given namespace and name. +func (s mPIJobNamespaceLister) Get(name string) (*v1alpha1.MPIJob, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("mpijob"), name) + } + return obj.(*v1alpha1.MPIJob), nil +} diff --git a/client/listers/training/v1alpha1/pytorchjob.go b/client/listers/training/v1alpha1/pytorchjob.go new file mode 100644 index 00000000..b1ee4c6f --- /dev/null +++ b/client/listers/training/v1alpha1/pytorchjob.go @@ -0,0 +1,93 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// PyTorchJobLister helps list PyTorchJobs. +type PyTorchJobLister interface { + // List lists all PyTorchJobs in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.PyTorchJob, err error) + // PyTorchJobs returns an object that can list and get PyTorchJobs. + PyTorchJobs(namespace string) PyTorchJobNamespaceLister + PyTorchJobListerExpansion +} + +// pyTorchJobLister implements the PyTorchJobLister interface. +type pyTorchJobLister struct { + indexer cache.Indexer +} + +// NewPyTorchJobLister returns a new PyTorchJobLister. +func NewPyTorchJobLister(indexer cache.Indexer) PyTorchJobLister { + return &pyTorchJobLister{indexer: indexer} +} + +// List lists all PyTorchJobs in the indexer. +func (s *pyTorchJobLister) List(selector labels.Selector) (ret []*v1alpha1.PyTorchJob, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.PyTorchJob)) + }) + return ret, err +} + +// PyTorchJobs returns an object that can list and get PyTorchJobs. +func (s *pyTorchJobLister) PyTorchJobs(namespace string) PyTorchJobNamespaceLister { + return pyTorchJobNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// PyTorchJobNamespaceLister helps list and get PyTorchJobs. +type PyTorchJobNamespaceLister interface { + // List lists all PyTorchJobs in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.PyTorchJob, err error) + // Get retrieves the PyTorchJob from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.PyTorchJob, error) + PyTorchJobNamespaceListerExpansion +} + +// pyTorchJobNamespaceLister implements the PyTorchJobNamespaceLister +// interface. +type pyTorchJobNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all PyTorchJobs in the indexer for a given namespace. +func (s pyTorchJobNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.PyTorchJob, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.PyTorchJob)) + }) + return ret, err +} + +// Get retrieves the PyTorchJob from the indexer for a given namespace and name. +func (s pyTorchJobNamespaceLister) Get(name string) (*v1alpha1.PyTorchJob, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("pytorchjob"), name) + } + return obj.(*v1alpha1.PyTorchJob), nil +} diff --git a/client/listers/training/v1alpha1/tfjob.go b/client/listers/training/v1alpha1/tfjob.go new file mode 100644 index 00000000..15ad93d9 --- /dev/null +++ b/client/listers/training/v1alpha1/tfjob.go @@ -0,0 +1,93 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// TFJobLister helps list TFJobs. +type TFJobLister interface { + // List lists all TFJobs in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.TFJob, err error) + // TFJobs returns an object that can list and get TFJobs. + TFJobs(namespace string) TFJobNamespaceLister + TFJobListerExpansion +} + +// tFJobLister implements the TFJobLister interface. +type tFJobLister struct { + indexer cache.Indexer +} + +// NewTFJobLister returns a new TFJobLister. +func NewTFJobLister(indexer cache.Indexer) TFJobLister { + return &tFJobLister{indexer: indexer} +} + +// List lists all TFJobs in the indexer. +func (s *tFJobLister) List(selector labels.Selector) (ret []*v1alpha1.TFJob, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.TFJob)) + }) + return ret, err +} + +// TFJobs returns an object that can list and get TFJobs. +func (s *tFJobLister) TFJobs(namespace string) TFJobNamespaceLister { + return tFJobNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// TFJobNamespaceLister helps list and get TFJobs. +type TFJobNamespaceLister interface { + // List lists all TFJobs in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.TFJob, err error) + // Get retrieves the TFJob from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.TFJob, error) + TFJobNamespaceListerExpansion +} + +// tFJobNamespaceLister implements the TFJobNamespaceLister +// interface. +type tFJobNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all TFJobs in the indexer for a given namespace. +func (s tFJobNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.TFJob, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.TFJob)) + }) + return ret, err +} + +// Get retrieves the TFJob from the indexer for a given namespace and name. +func (s tFJobNamespaceLister) Get(name string) (*v1alpha1.TFJob, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("tfjob"), name) + } + return obj.(*v1alpha1.TFJob), nil +} diff --git a/client/listers/training/v1alpha1/xdljob.go b/client/listers/training/v1alpha1/xdljob.go new file mode 100644 index 00000000..d120aaf7 --- /dev/null +++ b/client/listers/training/v1alpha1/xdljob.go @@ -0,0 +1,93 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// XDLJobLister helps list XDLJobs. +type XDLJobLister interface { + // List lists all XDLJobs in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.XDLJob, err error) + // XDLJobs returns an object that can list and get XDLJobs. + XDLJobs(namespace string) XDLJobNamespaceLister + XDLJobListerExpansion +} + +// xDLJobLister implements the XDLJobLister interface. +type xDLJobLister struct { + indexer cache.Indexer +} + +// NewXDLJobLister returns a new XDLJobLister. +func NewXDLJobLister(indexer cache.Indexer) XDLJobLister { + return &xDLJobLister{indexer: indexer} +} + +// List lists all XDLJobs in the indexer. +func (s *xDLJobLister) List(selector labels.Selector) (ret []*v1alpha1.XDLJob, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.XDLJob)) + }) + return ret, err +} + +// XDLJobs returns an object that can list and get XDLJobs. +func (s *xDLJobLister) XDLJobs(namespace string) XDLJobNamespaceLister { + return xDLJobNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// XDLJobNamespaceLister helps list and get XDLJobs. +type XDLJobNamespaceLister interface { + // List lists all XDLJobs in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.XDLJob, err error) + // Get retrieves the XDLJob from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.XDLJob, error) + XDLJobNamespaceListerExpansion +} + +// xDLJobNamespaceLister implements the XDLJobNamespaceLister +// interface. +type xDLJobNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all XDLJobs in the indexer for a given namespace. +func (s xDLJobNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.XDLJob, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.XDLJob)) + }) + return ret, err +} + +// Get retrieves the XDLJob from the indexer for a given namespace and name. +func (s xDLJobNamespaceLister) Get(name string) (*v1alpha1.XDLJob, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("xdljob"), name) + } + return obj.(*v1alpha1.XDLJob), nil +} diff --git a/client/listers/training/v1alpha1/xgboostjob.go b/client/listers/training/v1alpha1/xgboostjob.go new file mode 100644 index 00000000..89d033ea --- /dev/null +++ b/client/listers/training/v1alpha1/xgboostjob.go @@ -0,0 +1,93 @@ +/* +Copyright 2021 The Alibaba Authors. + +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. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// XGBoostJobLister helps list XGBoostJobs. +type XGBoostJobLister interface { + // List lists all XGBoostJobs in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.XGBoostJob, err error) + // XGBoostJobs returns an object that can list and get XGBoostJobs. + XGBoostJobs(namespace string) XGBoostJobNamespaceLister + XGBoostJobListerExpansion +} + +// xGBoostJobLister implements the XGBoostJobLister interface. +type xGBoostJobLister struct { + indexer cache.Indexer +} + +// NewXGBoostJobLister returns a new XGBoostJobLister. +func NewXGBoostJobLister(indexer cache.Indexer) XGBoostJobLister { + return &xGBoostJobLister{indexer: indexer} +} + +// List lists all XGBoostJobs in the indexer. +func (s *xGBoostJobLister) List(selector labels.Selector) (ret []*v1alpha1.XGBoostJob, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.XGBoostJob)) + }) + return ret, err +} + +// XGBoostJobs returns an object that can list and get XGBoostJobs. +func (s *xGBoostJobLister) XGBoostJobs(namespace string) XGBoostJobNamespaceLister { + return xGBoostJobNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// XGBoostJobNamespaceLister helps list and get XGBoostJobs. +type XGBoostJobNamespaceLister interface { + // List lists all XGBoostJobs in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.XGBoostJob, err error) + // Get retrieves the XGBoostJob from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.XGBoostJob, error) + XGBoostJobNamespaceListerExpansion +} + +// xGBoostJobNamespaceLister implements the XGBoostJobNamespaceLister +// interface. +type xGBoostJobNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all XGBoostJobs in the indexer for a given namespace. +func (s xGBoostJobNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.XGBoostJob, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.XGBoostJob)) + }) + return ret, err +} + +// Get retrieves the XGBoostJob from the indexer for a given namespace and name. +func (s xGBoostJobNamespaceLister) Get(name string) (*v1alpha1.XGBoostJob, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("xgboostjob"), name) + } + return obj.(*v1alpha1.XGBoostJob), nil +} diff --git a/config/crd/bases/elasticdl.org_elasticdljobs.yaml b/config/crd/bases/training.kubedl.io_elasticdljobs.yaml similarity index 99% rename from config/crd/bases/elasticdl.org_elasticdljobs.yaml rename to config/crd/bases/training.kubedl.io_elasticdljobs.yaml index 103e736e..b25bffb6 100644 --- a/config/crd/bases/elasticdl.org_elasticdljobs.yaml +++ b/config/crd/bases/training.kubedl.io_elasticdljobs.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.4.1 creationTimestamp: null - name: elasticdljobs.elasticdl.org + name: elasticdljobs.training.kubedl.io spec: - group: elasticdl.org + group: training.kubedl.io names: kind: ElasticDLJob listKind: ElasticDLJobList diff --git a/config/crd/bases/kubedl.io_marsjobs.yaml b/config/crd/bases/training.kubedl.io_marsjobs.yaml similarity index 99% rename from config/crd/bases/kubedl.io_marsjobs.yaml rename to config/crd/bases/training.kubedl.io_marsjobs.yaml index a7a5e3c0..d4b8129b 100644 --- a/config/crd/bases/kubedl.io_marsjobs.yaml +++ b/config/crd/bases/training.kubedl.io_marsjobs.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.4.1 creationTimestamp: null - name: marsjobs.kubedl.io + name: marsjobs.training.kubedl.io spec: - group: kubedl.io + group: training.kubedl.io names: kind: MarsJob listKind: MarsJobList diff --git a/config/crd/bases/kubeflow.org_mpijobs.yaml b/config/crd/bases/training.kubedl.io_mpijobs.yaml similarity index 99% rename from config/crd/bases/kubeflow.org_mpijobs.yaml rename to config/crd/bases/training.kubedl.io_mpijobs.yaml index 88a76f70..18e616b9 100644 --- a/config/crd/bases/kubeflow.org_mpijobs.yaml +++ b/config/crd/bases/training.kubedl.io_mpijobs.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.4.1 creationTimestamp: null - name: mpijobs.kubeflow.org + name: mpijobs.training.kubedl.io spec: - group: kubeflow.org + group: training.kubedl.io names: kind: MPIJob listKind: MPIJobList @@ -29,7 +29,7 @@ spec: - jsonPath: .spec.activeDeadlineSeconds name: Max-Lifetime type: integer - name: v1 + name: v1alpha1 schema: openAPIV3Schema: properties: diff --git a/config/crd/bases/kubeflow.org_pytorchjobs.yaml b/config/crd/bases/training.kubedl.io_pytorchjobs.yaml similarity index 99% rename from config/crd/bases/kubeflow.org_pytorchjobs.yaml rename to config/crd/bases/training.kubedl.io_pytorchjobs.yaml index 086e23b9..2eeaf332 100644 --- a/config/crd/bases/kubeflow.org_pytorchjobs.yaml +++ b/config/crd/bases/training.kubedl.io_pytorchjobs.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.4.1 creationTimestamp: null - name: pytorchjobs.kubeflow.org + name: pytorchjobs.training.kubedl.io spec: - group: kubeflow.org + group: training.kubedl.io names: kind: PyTorchJob listKind: PyTorchJobList @@ -29,7 +29,7 @@ spec: - jsonPath: .spec.activeDeadlineSeconds name: Max-Lifetime type: integer - name: v1 + name: v1alpha1 schema: openAPIV3Schema: properties: diff --git a/config/crd/bases/kubeflow.org_tfjobs.yaml b/config/crd/bases/training.kubedl.io_tfjobs.yaml similarity index 99% rename from config/crd/bases/kubeflow.org_tfjobs.yaml rename to config/crd/bases/training.kubedl.io_tfjobs.yaml index ef24a119..0176a6a3 100644 --- a/config/crd/bases/kubeflow.org_tfjobs.yaml +++ b/config/crd/bases/training.kubedl.io_tfjobs.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.4.1 creationTimestamp: null - name: tfjobs.kubeflow.org + name: tfjobs.training.kubedl.io spec: - group: kubeflow.org + group: training.kubedl.io names: kind: TFJob listKind: TFJobList @@ -29,7 +29,7 @@ spec: - jsonPath: .spec.activeDeadlineSeconds name: Max-Lifetime type: integer - name: v1 + name: v1alpha1 schema: openAPIV3Schema: properties: diff --git a/config/crd/bases/xdl.kubedl.io_xdljobs.yaml b/config/crd/bases/training.kubedl.io_xdljobs.yaml similarity index 99% rename from config/crd/bases/xdl.kubedl.io_xdljobs.yaml rename to config/crd/bases/training.kubedl.io_xdljobs.yaml index 36b98f7a..4c04e499 100644 --- a/config/crd/bases/xdl.kubedl.io_xdljobs.yaml +++ b/config/crd/bases/training.kubedl.io_xdljobs.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.4.1 creationTimestamp: null - name: xdljobs.xdl.kubedl.io + name: xdljobs.training.kubedl.io spec: - group: xdl.kubedl.io + group: training.kubedl.io names: kind: XDLJob listKind: XDLJobList diff --git a/config/crd/bases/xgboostjob.kubeflow.org_xgboostjobs.yaml b/config/crd/bases/training.kubedl.io_xgboostjobs.yaml similarity index 99% rename from config/crd/bases/xgboostjob.kubeflow.org_xgboostjobs.yaml rename to config/crd/bases/training.kubedl.io_xgboostjobs.yaml index 48e2962d..6860f2e5 100644 --- a/config/crd/bases/xgboostjob.kubeflow.org_xgboostjobs.yaml +++ b/config/crd/bases/training.kubedl.io_xgboostjobs.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.4.1 creationTimestamp: null - name: xgboostjobs.xgboostjob.kubeflow.org + name: xgboostjobs.training.kubedl.io spec: - group: xgboostjob.kubeflow.org + group: training.kubedl.io names: kind: XGBoostJob listKind: XGBoostJobList diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 2481ac87..0053b404 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -2,24 +2,36 @@ # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default resources: -- bases/kubeflow.org_tfjobs.yaml -- bases/kubeflow.org_pytorchjobs.yaml -- bases/xdl.kubedl.io_xdljobs.yaml -- bases/xgboostjob.kubeflow.org_xgboostjobs.yaml -- bases/elasticdl.org_elasticdljobs.yaml -- bases/kubedl.io_marsjobs.yaml -- bases/kubeflow.org_mpijobs.yaml +- bases/training.kubedl.io_xdljobs.yaml +- bases/training.kubedl.io_xgboostjobs.yaml +- bases/training.kubedl.io_tfjobs.yaml +- bases/training.kubedl.io_pytorchjobs.yaml +- bases/training.kubedl.io_mpijobs.yaml +- bases/training.kubedl.io_marsjobs.yaml +- bases/training.kubedl.io_elasticdljobs.yaml # +kubebuilder:scaffold:crdkustomizeresource patchesStrategicMerge: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD #- patches/webhook_in_tfjobs.yaml +#- patches/webhook_in_xdljobs.yaml +#- patches/webhook_in_xgboostjobs.yaml +#- patches/webhook_in_pytorchjobs.yaml +#- patches/webhook_in_mpijobs.yaml +#- patches/webhook_in_marsjobs.yaml +#- patches/webhook_in_elasticdljobs.yaml # +kubebuilder:scaffold:crdkustomizewebhookpatch # [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix. # patches here are for enabling the CA injection for each CRD #- patches/cainjection_in_tfjobs.yaml +#- patches/cainjection_in_xdljobs.yaml +#- patches/cainjection_in_xgboostjobs.yaml +#- patches/cainjection_in_pytorchjobs.yaml +#- patches/cainjection_in_mpijobs.yaml +#- patches/cainjection_in_marsjobs.yaml +#- patches/cainjection_in_elasticdljobs.yaml # +kubebuilder:scaffold:crdkustomizecainjectionpatch # the following config is for teaching kustomize how to do kustomization for CRDs. diff --git a/config/crd/patches/cainjection_in_elasticdljobs.yaml b/config/crd/patches/cainjection_in_elasticdljobs.yaml new file mode 100644 index 00000000..73fd5ebb --- /dev/null +++ b/config/crd/patches/cainjection_in_elasticdljobs.yaml @@ -0,0 +1,8 @@ +# The following patch adds a directive for certmanager to inject CA into the CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + name: elasticdljobs.training.kubedl.io diff --git a/config/crd/patches/cainjection_in_marsjobs.yaml b/config/crd/patches/cainjection_in_marsjobs.yaml new file mode 100644 index 00000000..e3c14d69 --- /dev/null +++ b/config/crd/patches/cainjection_in_marsjobs.yaml @@ -0,0 +1,8 @@ +# The following patch adds a directive for certmanager to inject CA into the CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + name: marsjobs.training.kubedl.io diff --git a/config/crd/patches/cainjection_in_mpijobs.yaml b/config/crd/patches/cainjection_in_mpijobs.yaml new file mode 100644 index 00000000..c5b3fdf8 --- /dev/null +++ b/config/crd/patches/cainjection_in_mpijobs.yaml @@ -0,0 +1,8 @@ +# The following patch adds a directive for certmanager to inject CA into the CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + name: mpijobs.training.kubedl.io diff --git a/config/crd/patches/cainjection_in_pytorchjobs.yaml b/config/crd/patches/cainjection_in_pytorchjobs.yaml new file mode 100644 index 00000000..8677a481 --- /dev/null +++ b/config/crd/patches/cainjection_in_pytorchjobs.yaml @@ -0,0 +1,8 @@ +# The following patch adds a directive for certmanager to inject CA into the CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + name: pytorchjobs.training.kubedl.io diff --git a/config/crd/patches/cainjection_in_tfjobs.yaml b/config/crd/patches/cainjection_in_tfjobs.yaml index 8c07c675..d65d6a1d 100644 --- a/config/crd/patches/cainjection_in_tfjobs.yaml +++ b/config/crd/patches/cainjection_in_tfjobs.yaml @@ -5,4 +5,4 @@ kind: CustomResourceDefinition metadata: annotations: certmanager.k8s.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) - name: tfjobs.kubeflow.alibaba-inc.com + name: tfjobs.training.kubedl.io diff --git a/config/crd/patches/cainjection_in_xdljobs.yaml b/config/crd/patches/cainjection_in_xdljobs.yaml new file mode 100644 index 00000000..5a187835 --- /dev/null +++ b/config/crd/patches/cainjection_in_xdljobs.yaml @@ -0,0 +1,8 @@ +# The following patch adds a directive for certmanager to inject CA into the CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + name: xdljobs.training.kubedl.io diff --git a/config/crd/patches/cainjection_in_xgboostjobs.yaml b/config/crd/patches/cainjection_in_xgboostjobs.yaml new file mode 100644 index 00000000..b0c3a097 --- /dev/null +++ b/config/crd/patches/cainjection_in_xgboostjobs.yaml @@ -0,0 +1,8 @@ +# The following patch adds a directive for certmanager to inject CA into the CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + name: xgboostjobs.training.kubedl.io diff --git a/config/crd/patches/webhook_in_elasticdljobs.yaml b/config/crd/patches/webhook_in_elasticdljobs.yaml new file mode 100644 index 00000000..cc35d255 --- /dev/null +++ b/config/crd/patches/webhook_in_elasticdljobs.yaml @@ -0,0 +1,17 @@ +# The following patch enables conversion webhook for CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: elasticdljobs.training.kubedl.io +spec: + conversion: + strategy: Webhook + webhookClientConfig: + # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, + # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) + caBundle: Cg== + service: + namespace: system + name: webhook-service + path: /convert diff --git a/config/crd/patches/webhook_in_marsjobs.yaml b/config/crd/patches/webhook_in_marsjobs.yaml new file mode 100644 index 00000000..aa983e3d --- /dev/null +++ b/config/crd/patches/webhook_in_marsjobs.yaml @@ -0,0 +1,17 @@ +# The following patch enables conversion webhook for CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: marsjobs.training.kubedl.io +spec: + conversion: + strategy: Webhook + webhookClientConfig: + # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, + # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) + caBundle: Cg== + service: + namespace: system + name: webhook-service + path: /convert diff --git a/config/crd/patches/webhook_in_mpijobs.yaml b/config/crd/patches/webhook_in_mpijobs.yaml new file mode 100644 index 00000000..72219c97 --- /dev/null +++ b/config/crd/patches/webhook_in_mpijobs.yaml @@ -0,0 +1,17 @@ +# The following patch enables conversion webhook for CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: mpijobs.training.kubedl.io +spec: + conversion: + strategy: Webhook + webhookClientConfig: + # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, + # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) + caBundle: Cg== + service: + namespace: system + name: webhook-service + path: /convert diff --git a/config/crd/patches/webhook_in_pytorchjobs.yaml b/config/crd/patches/webhook_in_pytorchjobs.yaml new file mode 100644 index 00000000..63636daa --- /dev/null +++ b/config/crd/patches/webhook_in_pytorchjobs.yaml @@ -0,0 +1,17 @@ +# The following patch enables conversion webhook for CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: pytorchjobs.training.kubedl.io +spec: + conversion: + strategy: Webhook + webhookClientConfig: + # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, + # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) + caBundle: Cg== + service: + namespace: system + name: webhook-service + path: /convert diff --git a/config/crd/patches/webhook_in_tfjobs.yaml b/config/crd/patches/webhook_in_tfjobs.yaml index c0caf1fe..2de4d325 100644 --- a/config/crd/patches/webhook_in_tfjobs.yaml +++ b/config/crd/patches/webhook_in_tfjobs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: tfjobs.kubeflow.alibaba-inc.com + name: tfjobs.training.kubedl.io spec: conversion: strategy: Webhook diff --git a/config/crd/patches/webhook_in_xdljobs.yaml b/config/crd/patches/webhook_in_xdljobs.yaml new file mode 100644 index 00000000..f4d90afa --- /dev/null +++ b/config/crd/patches/webhook_in_xdljobs.yaml @@ -0,0 +1,17 @@ +# The following patch enables conversion webhook for CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: xdljobs.training.kubedl.io +spec: + conversion: + strategy: Webhook + webhookClientConfig: + # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, + # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) + caBundle: Cg== + service: + namespace: system + name: webhook-service + path: /convert diff --git a/config/crd/patches/webhook_in_xgboostjobs.yaml b/config/crd/patches/webhook_in_xgboostjobs.yaml new file mode 100644 index 00000000..ff8f40b9 --- /dev/null +++ b/config/crd/patches/webhook_in_xgboostjobs.yaml @@ -0,0 +1,17 @@ +# The following patch enables conversion webhook for CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: xgboostjobs.training.kubedl.io +spec: + conversion: + strategy: Webhook + webhookClientConfig: + # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, + # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) + caBundle: Cg== + service: + namespace: system + name: webhook-service + path: /convert diff --git a/config/manager/all_in_one.yaml b/config/manager/all_in_one.yaml index 3297e7c5..83d3b0e8 100644 --- a/config/manager/all_in_one.yaml +++ b/config/manager/all_in_one.yaml @@ -8,6 +8,7 @@ kind: Namespace metadata: name: kubedl-system --- + apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -15,176 +16,187 @@ metadata: name: kubedl-manager-role rules: - apiGroups: - - kubeflow.org + - "" resources: - - tfjobs - - pytorchjobs - - mpijobs + - configmaps verbs: + - create + - delete - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - - kubeflow.org + - "" resources: - - tfjobs/status - - pytorchjobs/status - - mpijobs/status + - configmaps/status verbs: - get - - list - - watch - - create - - update - patch - - delete + - update - apiGroups: - - xdl.kubedl.io + - "" resources: - - xdljobs + - events verbs: - - get - - list - - watch - create - - update - - patch - - delete - apiGroups: - - xdl.kubedl.io + - "" resources: - - xdljobs/status + - pods verbs: + - create + - delete - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - - xgboostjob.kubeflow.org + - "" resources: - - xgboostjobs + - pods/status verbs: - get - - list - - watch - - create - - update - patch - - delete + - update - apiGroups: - - xgboostjob.kubeflow.org + - "" resources: - - xgboostjobs/status + - services verbs: + - create + - delete - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - "" resources: - - pods - - pods/status - - configmaps - - events - - persistentvolumeclaims - - secrets - - services + - services/status verbs: - get - - list - - watch - - create - - update - patch - - delete + - update - apiGroups: - - "" + - networking.k8s.io resources: - - nodes + - ingresses verbs: + - create + - delete - get - list + - patch + - update - watch - apiGroups: - - "" + - training.kubedl.io resources: - - pods/status + - elasticdljobs verbs: + - create + - delete - get + - list + - patch - update + - watch +- apiGroups: + - training.kubedl.io + resources: + - elasticdljobs/status + verbs: + - get - patch + - update - apiGroups: - - apps + - training.kubedl.io resources: - - controllerrevisions + - marsjobs verbs: + - create + - delete - get - list - - watch - - create + - patch - update + - watch +- apiGroups: + - training.kubedl.io + resources: + - marsjobs/status + verbs: + - get - patch - - delete + - update - apiGroups: - - apps.kruise.io + - training.kubedl.io resources: - - statefulsets + - mpijobs verbs: + - create + - delete - get - list - - watch - - create + - patch - update + - watch +- apiGroups: + - training.kubedl.io + resources: + - mpijobs/status + verbs: + - get - patch - - delete + - update - apiGroups: - - apps + - training.kubedl.io resources: - - statefulsets + - pytorchjobs verbs: + - create + - delete - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - - apps + - training.kubedl.io resources: - - statefulsets/status + - pytorchjobs/status verbs: - get - - update - patch + - update - apiGroups: - - admissionregistration.k8s.io + - training.kubedl.io resources: - - mutatingwebhookconfigurations - - validatingwebhookconfigurations + - tfjobs verbs: + - create + - delete - get - list - - watch - - create + - patch - update + - watch +- apiGroups: + - training.kubedl.io + resources: + - tfjobs/status + verbs: + - get - patch - - delete + - update - apiGroups: - - kubedl.io + - training.kubedl.io resources: - - marsjobs + - xdljobs verbs: - create - delete @@ -194,17 +206,17 @@ rules: - update - watch - apiGroups: - - kubedl.io + - training.kubedl.io resources: - - marsjobs/status + - xdljobs/status verbs: - get - patch - update - apiGroups: - - elasticdl.org + - training.kubedl.io resources: - - elasticdljobs + - xgboostjobs verbs: - create - delete @@ -214,14 +226,15 @@ rules: - update - watch - apiGroups: - - elasticdl.org + - training.kubedl.io resources: - - elasticdljobs/status + - xgboostjobs/status verbs: - get - patch - update + --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -237,6 +250,52 @@ subjects: name: default namespace: kubedl-system --- +# permissions to do leader election. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: leader-election-role +rules: + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch + - apiGroups: + - "" + resources: + - events + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: leader-election-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: leader-election-role +subjects: + - kind: ServiceAccount + name: default + namespace: kubedl-system +--- apiVersion: apps/v1 kind: Deployment metadata: diff --git a/config/rbac/elasticdljob_editor_role.yaml b/config/rbac/elasticdljob_editor_role.yaml new file mode 100644 index 00000000..31b0def1 --- /dev/null +++ b/config/rbac/elasticdljob_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit elasticdljobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: elasticdljob-editor-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - elasticdljobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - training.kubedl.io + resources: + - elasticdljobs/status + verbs: + - get diff --git a/config/rbac/elasticdljob_viewer_role.yaml b/config/rbac/elasticdljob_viewer_role.yaml new file mode 100644 index 00000000..594f296e --- /dev/null +++ b/config/rbac/elasticdljob_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view elasticdljobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: elasticdljob-viewer-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - elasticdljobs + verbs: + - get + - list + - watch +- apiGroups: + - training.kubedl.io + resources: + - elasticdljobs/status + verbs: + - get diff --git a/config/rbac/leader_election_role.yaml b/config/rbac/leader_election_role.yaml index eaa79158..51c7d453 100644 --- a/config/rbac/leader_election_role.yaml +++ b/config/rbac/leader_election_role.yaml @@ -1,6 +1,6 @@ # permissions to do leader election. apiVersion: rbac.authorization.k8s.io/v1 -kind: Role +kind: ClusterRole metadata: name: leader-election-role rules: diff --git a/config/rbac/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml index eed16906..2626b975 100644 --- a/config/rbac/leader_election_role_binding.yaml +++ b/config/rbac/leader_election_role_binding.yaml @@ -1,10 +1,10 @@ apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding +kind: ClusterRoleBinding metadata: name: leader-election-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io - kind: Role + kind: ClusterRole name: leader-election-role subjects: - kind: ServiceAccount diff --git a/config/rbac/marsjob_editor_role.yaml b/config/rbac/marsjob_editor_role.yaml new file mode 100644 index 00000000..67c52aa2 --- /dev/null +++ b/config/rbac/marsjob_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit marsjobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: marsjob-editor-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - marsjobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - training.kubedl.io + resources: + - marsjobs/status + verbs: + - get diff --git a/config/rbac/marsjob_viewer_role.yaml b/config/rbac/marsjob_viewer_role.yaml new file mode 100644 index 00000000..304e77f1 --- /dev/null +++ b/config/rbac/marsjob_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view marsjobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: marsjob-viewer-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - marsjobs + verbs: + - get + - list + - watch +- apiGroups: + - training.kubedl.io + resources: + - marsjobs/status + verbs: + - get diff --git a/config/rbac/mpijob_editor_role.yaml b/config/rbac/mpijob_editor_role.yaml new file mode 100644 index 00000000..0089f90e --- /dev/null +++ b/config/rbac/mpijob_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit mpijobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: mpijob-editor-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - mpijobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - training.kubedl.io + resources: + - mpijobs/status + verbs: + - get diff --git a/config/rbac/mpijob_viewer_role.yaml b/config/rbac/mpijob_viewer_role.yaml new file mode 100644 index 00000000..16923973 --- /dev/null +++ b/config/rbac/mpijob_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view mpijobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: mpijob-viewer-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - mpijobs + verbs: + - get + - list + - watch +- apiGroups: + - training.kubedl.io + resources: + - mpijobs/status + verbs: + - get diff --git a/config/rbac/pytorchjob_editor_role.yaml b/config/rbac/pytorchjob_editor_role.yaml new file mode 100644 index 00000000..0bc39ca7 --- /dev/null +++ b/config/rbac/pytorchjob_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit pytorchjobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: pytorchjob-editor-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - pytorchjobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - training.kubedl.io + resources: + - pytorchjobs/status + verbs: + - get diff --git a/config/rbac/pytorchjob_viewer_role.yaml b/config/rbac/pytorchjob_viewer_role.yaml new file mode 100644 index 00000000..d47b70eb --- /dev/null +++ b/config/rbac/pytorchjob_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view pytorchjobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: pytorchjob-viewer-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - pytorchjobs + verbs: + - get + - list + - watch +- apiGroups: + - training.kubedl.io + resources: + - pytorchjobs/status + verbs: + - get diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index d320d398..c8b47968 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -6,6 +6,32 @@ metadata: creationTimestamp: null name: manager-role rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - patch + - update +- apiGroups: + - "" + resources: + - events + verbs: + - create - apiGroups: - "" resources: @@ -47,7 +73,19 @@ rules: - patch - update - apiGroups: - - elasticdl.org + - networking.k8s.io + resources: + - ingresses + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - training.kubedl.io resources: - elasticdljobs verbs: @@ -59,7 +97,7 @@ rules: - update - watch - apiGroups: - - elasticdl.org + - training.kubedl.io resources: - elasticdljobs/status verbs: @@ -67,7 +105,7 @@ rules: - patch - update - apiGroups: - - kubedl.io + - training.kubedl.io resources: - marsjobs verbs: @@ -79,7 +117,7 @@ rules: - update - watch - apiGroups: - - kubedl.io + - training.kubedl.io resources: - marsjobs/status verbs: @@ -87,7 +125,7 @@ rules: - patch - update - apiGroups: - - kubeflow.org + - training.kubedl.io resources: - mpijobs verbs: @@ -99,7 +137,7 @@ rules: - update - watch - apiGroups: - - kubeflow.org + - training.kubedl.io resources: - mpijobs/status verbs: @@ -107,7 +145,7 @@ rules: - patch - update - apiGroups: - - kubeflow.org + - training.kubedl.io resources: - pytorchjobs verbs: @@ -119,7 +157,7 @@ rules: - update - watch - apiGroups: - - kubeflow.org + - training.kubedl.io resources: - pytorchjobs/status verbs: @@ -127,7 +165,7 @@ rules: - patch - update - apiGroups: - - kubeflow.org + - training.kubedl.io resources: - tfjobs verbs: @@ -139,7 +177,7 @@ rules: - update - watch - apiGroups: - - kubeflow.org + - training.kubedl.io resources: - tfjobs/status verbs: @@ -147,19 +185,7 @@ rules: - patch - update - apiGroups: - - networking.k8s.io - resources: - - ingresses - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - xdl.kubedl.io + - training.kubedl.io resources: - xdljobs verbs: @@ -171,7 +197,7 @@ rules: - update - watch - apiGroups: - - xdl.kubedl.io + - training.kubedl.io resources: - xdljobs/status verbs: @@ -179,7 +205,7 @@ rules: - patch - update - apiGroups: - - xgboostjob.kubeflow.org + - training.kubedl.io resources: - xgboostjobs verbs: @@ -191,7 +217,7 @@ rules: - update - watch - apiGroups: - - xgboostjob.kubeflow.org + - training.kubedl.io resources: - xgboostjobs/status verbs: diff --git a/config/rbac/tfjob_editor_role.yaml b/config/rbac/tfjob_editor_role.yaml new file mode 100644 index 00000000..f1651cee --- /dev/null +++ b/config/rbac/tfjob_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit tfjobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: tfjob-editor-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - tfjobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - training.kubedl.io + resources: + - tfjobs/status + verbs: + - get diff --git a/config/rbac/tfjob_viewer_role.yaml b/config/rbac/tfjob_viewer_role.yaml new file mode 100644 index 00000000..b8a6b2d5 --- /dev/null +++ b/config/rbac/tfjob_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view tfjobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: tfjob-viewer-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - tfjobs + verbs: + - get + - list + - watch +- apiGroups: + - training.kubedl.io + resources: + - tfjobs/status + verbs: + - get diff --git a/config/rbac/xdljob_editor_role.yaml b/config/rbac/xdljob_editor_role.yaml new file mode 100644 index 00000000..f22de921 --- /dev/null +++ b/config/rbac/xdljob_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit xdljobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: xdljob-editor-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - xdljobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - training.kubedl.io + resources: + - xdljobs/status + verbs: + - get diff --git a/config/rbac/xdljob_viewer_role.yaml b/config/rbac/xdljob_viewer_role.yaml new file mode 100644 index 00000000..29fa6c34 --- /dev/null +++ b/config/rbac/xdljob_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view xdljobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: xdljob-viewer-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - xdljobs + verbs: + - get + - list + - watch +- apiGroups: + - training.kubedl.io + resources: + - xdljobs/status + verbs: + - get diff --git a/config/rbac/xgboostjob_editor_role.yaml b/config/rbac/xgboostjob_editor_role.yaml new file mode 100644 index 00000000..5057d320 --- /dev/null +++ b/config/rbac/xgboostjob_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit xgboostjobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: xgboostjob-editor-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - xgboostjobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - training.kubedl.io + resources: + - xgboostjobs/status + verbs: + - get diff --git a/config/rbac/xgboostjob_viewer_role.yaml b/config/rbac/xgboostjob_viewer_role.yaml new file mode 100644 index 00000000..a6bc39a6 --- /dev/null +++ b/config/rbac/xgboostjob_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view xgboostjobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: xgboostjob-viewer-role +rules: +- apiGroups: + - training.kubedl.io + resources: + - xgboostjobs + verbs: + - get + - list + - watch +- apiGroups: + - training.kubedl.io + resources: + - xgboostjobs/status + verbs: + - get diff --git a/config/samples/training_v1alpha1_elasticdljob.yaml b/config/samples/training_v1alpha1_elasticdljob.yaml new file mode 100644 index 00000000..27ff475c --- /dev/null +++ b/config/samples/training_v1alpha1_elasticdljob.yaml @@ -0,0 +1,7 @@ +apiVersion: training.kubedl.io/v1alpha1 +kind: ElasticDLJob +metadata: + name: elasticdljob-sample +spec: + # Add fields here + foo: bar diff --git a/config/samples/training_v1alpha1_marsjob.yaml b/config/samples/training_v1alpha1_marsjob.yaml new file mode 100644 index 00000000..5a83558a --- /dev/null +++ b/config/samples/training_v1alpha1_marsjob.yaml @@ -0,0 +1,7 @@ +apiVersion: training.kubedl.io/v1alpha1 +kind: MarsJob +metadata: + name: marsjob-sample +spec: + # Add fields here + foo: bar diff --git a/config/samples/training_v1alpha1_mpijob.yaml b/config/samples/training_v1alpha1_mpijob.yaml new file mode 100644 index 00000000..24d11ae0 --- /dev/null +++ b/config/samples/training_v1alpha1_mpijob.yaml @@ -0,0 +1,7 @@ +apiVersion: training.kubedl.io/v1alpha1 +kind: MPIJob +metadata: + name: mpijob-sample +spec: + # Add fields here + foo: bar diff --git a/config/samples/training_v1alpha1_pytorchjob.yaml b/config/samples/training_v1alpha1_pytorchjob.yaml new file mode 100644 index 00000000..62de2a97 --- /dev/null +++ b/config/samples/training_v1alpha1_pytorchjob.yaml @@ -0,0 +1,7 @@ +apiVersion: training.kubedl.io/v1alpha1 +kind: PyTorchJob +metadata: + name: pytorchjob-sample +spec: + # Add fields here + foo: bar diff --git a/config/samples/kubeflow_v1_tfjob.yaml b/config/samples/training_v1alpha1_tfjob.yaml similarity index 56% rename from config/samples/kubeflow_v1_tfjob.yaml rename to config/samples/training_v1alpha1_tfjob.yaml index 65211775..4ed5fb6e 100644 --- a/config/samples/kubeflow_v1_tfjob.yaml +++ b/config/samples/training_v1alpha1_tfjob.yaml @@ -1,5 +1,5 @@ -apiVersion: kubeflow.alibaba-inc.com/v1 -kind: Tfjob +apiVersion: training.kubedl.io/v1alpha1 +kind: TFJob metadata: name: tfjob-sample spec: diff --git a/config/samples/training_v1alpha1_xdljob.yaml b/config/samples/training_v1alpha1_xdljob.yaml new file mode 100644 index 00000000..a6c258dd --- /dev/null +++ b/config/samples/training_v1alpha1_xdljob.yaml @@ -0,0 +1,7 @@ +apiVersion: training.kubedl.io/v1alpha1 +kind: XDLJob +metadata: + name: xdljob-sample +spec: + # Add fields here + foo: bar diff --git a/config/samples/training_v1alpha1_xgboostjob.yaml b/config/samples/training_v1alpha1_xgboostjob.yaml new file mode 100644 index 00000000..2cea8cdd --- /dev/null +++ b/config/samples/training_v1alpha1_xgboostjob.yaml @@ -0,0 +1,7 @@ +apiVersion: training.kubedl.io/v1alpha1 +kind: XGBoostJob +metadata: + name: xgboostjob-sample +spec: + # Add fields here + foo: bar diff --git a/controllers/add_elasticdl.go b/controllers/add_elasticdl.go index 37153f7c..c4c30e45 100644 --- a/controllers/add_elasticdl.go +++ b/controllers/add_elasticdl.go @@ -17,7 +17,7 @@ limitations under the License. package controllers import ( - "github.com/alibaba/kubedl/apis/elasticdl/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" controllers "github.com/alibaba/kubedl/controllers/elasticdl" controllerruntime "sigs.k8s.io/controller-runtime" diff --git a/controllers/add_mars.go b/controllers/add_mars.go index 8a6d5169..55001028 100644 --- a/controllers/add_mars.go +++ b/controllers/add_mars.go @@ -14,7 +14,7 @@ limitations under the License. package controllers import ( - "github.com/alibaba/kubedl/apis/mars/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" controllers "github.com/alibaba/kubedl/controllers/mars" controllerruntime "sigs.k8s.io/controller-runtime" diff --git a/controllers/add_mpi.go b/controllers/add_mpi.go index 339c48e9..85445355 100644 --- a/controllers/add_mpi.go +++ b/controllers/add_mpi.go @@ -17,14 +17,14 @@ limitations under the License. package controllers import ( - mpiv1 "github.com/alibaba/kubedl/apis/mpi/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/controllers/mpi" "github.com/alibaba/kubedl/pkg/job_controller" ctrl "sigs.k8s.io/controller-runtime" ) func init() { - SetupWithManagerMap[&mpiv1.MPIJob{}] = func(mgr ctrl.Manager, config job_controller.JobControllerConfiguration) error { + SetupWithManagerMap[&training.MPIJob{}] = func(mgr ctrl.Manager, config job_controller.JobControllerConfiguration) error { return mpi.NewReconciler(mgr, config).SetupWithManager(mgr) } } diff --git a/controllers/add_pytorch.go b/controllers/add_pytorch.go index fefaa3b7..7cbf2dd2 100644 --- a/controllers/add_pytorch.go +++ b/controllers/add_pytorch.go @@ -17,7 +17,7 @@ limitations under the License. package controllers import ( - pytorchv1 "github.com/alibaba/kubedl/apis/pytorch/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/controllers/pytorch" "github.com/alibaba/kubedl/pkg/job_controller" @@ -25,7 +25,7 @@ import ( ) func init() { - SetupWithManagerMap[&pytorchv1.PyTorchJob{}] = func(mgr controllerruntime.Manager, config job_controller.JobControllerConfiguration) error { + SetupWithManagerMap[&training.PyTorchJob{}] = func(mgr controllerruntime.Manager, config job_controller.JobControllerConfiguration) error { return pytorch.NewReconciler(mgr, config).SetupWithManager(mgr) } } diff --git a/controllers/add_tensorflow.go b/controllers/add_tensorflow.go index 0751296a..d03679a0 100644 --- a/controllers/add_tensorflow.go +++ b/controllers/add_tensorflow.go @@ -17,15 +17,14 @@ limitations under the License. package controllers import ( - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/controllers/tensorflow" "github.com/alibaba/kubedl/pkg/job_controller" - - "sigs.k8s.io/controller-runtime" + controllerruntime "sigs.k8s.io/controller-runtime" ) func init() { - SetupWithManagerMap[&tfv1.TFJob{}] = func(mgr controllerruntime.Manager, config job_controller.JobControllerConfiguration) error { + SetupWithManagerMap[&training.TFJob{}] = func(mgr controllerruntime.Manager, config job_controller.JobControllerConfiguration) error { return tensorflow.NewReconciler(mgr, config).SetupWithManager(mgr) } } diff --git a/controllers/add_xdl.go b/controllers/add_xdl.go index 3a42cb3a..5371c3a1 100644 --- a/controllers/add_xdl.go +++ b/controllers/add_xdl.go @@ -17,11 +17,10 @@ limitations under the License. package controllers import ( - xdlv1alpha1 "github.com/alibaba/kubedl/apis/xdl/v1alpha1" + xdlv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" xdljob "github.com/alibaba/kubedl/controllers/xdl" "github.com/alibaba/kubedl/pkg/job_controller" - - "sigs.k8s.io/controller-runtime" + controllerruntime "sigs.k8s.io/controller-runtime" ) func init() { diff --git a/controllers/add_xgboostjob.go b/controllers/add_xgboostjob.go index 37711e52..b480e397 100644 --- a/controllers/add_xgboostjob.go +++ b/controllers/add_xgboostjob.go @@ -16,7 +16,7 @@ limitations under the License. package controllers import ( - "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" xgboostjob "github.com/alibaba/kubedl/controllers/xgboost" "github.com/alibaba/kubedl/pkg/job_controller" diff --git a/controllers/elasticdl/elasticdljob_controller.go b/controllers/elasticdl/elasticdljob_controller.go index e1fa9f3f..50c27b1e 100644 --- a/controllers/elasticdl/elasticdljob_controller.go +++ b/controllers/elasticdl/elasticdljob_controller.go @@ -19,7 +19,7 @@ package elasticdl import ( "context" - elasticdlv1alpha1 "github.com/alibaba/kubedl/apis/elasticdl/v1alpha1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" @@ -52,7 +52,7 @@ func NewReconciler(mgr ctrl.Manager, config job_controller.JobControllerConfigur scheme: mgr.GetScheme(), } r.recorder = mgr.GetEventRecorderFor(r.ControllerName()) - r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(elasticdlv1alpha1.Kind, r.Client)) + r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(training.ElasticDLJobKind, r.Client)) return r } @@ -68,12 +68,16 @@ type ElasticDLJobReconciler struct { } // +kubebuilder:rbac:groups="",resources=pods,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=elasticdl.org,resources=elasticdljobs,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=elasticdl.org,resources=elasticdljobs/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=pods/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="",resources=services/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=events,verbs=create +// +kubebuilder:rbac:groups=training.kubedl.io,resources=elasticdljobs,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=training.kubedl.io,resources=elasticdljobs/status,verbs=get;update;patch func (r *ElasticDLJobReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { // Fetch latest elasticdl job instance. - sharedElasticDLJob := &elasticdlv1alpha1.ElasticDLJob{} + sharedElasticDLJob := &training.ElasticDLJob{} err := r.Get(context.Background(), req.NamespacedName, sharedElasticDLJob) if err != nil { if errors.IsNotFound(err) { @@ -117,7 +121,7 @@ func (r *ElasticDLJobReconciler) SetupWithManager(mgr ctrl.Manager) error { } // Watch owner resource with create event filter. - if err = c.Watch(&source.Kind{Type: &elasticdlv1alpha1.ElasticDLJob{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{ + if err = c.Watch(&source.Kind{Type: &training.ElasticDLJob{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{ CreateFunc: onOwnerCreateFunc(r), }); err != nil { return err @@ -125,7 +129,7 @@ func (r *ElasticDLJobReconciler) SetupWithManager(mgr ctrl.Manager) error { // Watch managed resource with owner and create/delete event filter. if err = c.Watch(&source.Kind{Type: &corev1.Pod{}}, &handler.EnqueueRequestForOwner{ - OwnerType: &elasticdlv1alpha1.ElasticDLJob{}, + OwnerType: &training.ElasticDLJob{}, IsController: true, }, predicate.Funcs{ CreateFunc: r.ctrl.OnPodCreateFunc, @@ -136,7 +140,7 @@ func (r *ElasticDLJobReconciler) SetupWithManager(mgr ctrl.Manager) error { } return c.Watch(&source.Kind{Type: &corev1.Service{}}, &handler.EnqueueRequestForOwner{ - OwnerType: &elasticdlv1alpha1.ElasticDLJob{}, + OwnerType: &training.ElasticDLJob{}, IsController: true, }, predicate.Funcs{ CreateFunc: r.ctrl.OnServiceCreateFunc, @@ -151,43 +155,43 @@ func (r *ElasticDLJobReconciler) ControllerName() string { // GetAPIGroupVersionKind returns the GroupVersionKind of the API func (r *ElasticDLJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind { - return elasticdlv1alpha1.GroupVersionKind + return training.SchemeGroupVersion.WithKind(training.ElasticDLJobKind) } // GetAPIGroupVersion returns the GroupVersion of the API func (r *ElasticDLJobReconciler) GetAPIGroupVersion() schema.GroupVersion { - return elasticdlv1alpha1.SchemeGroupVersion + return training.SchemeGroupVersion } // GetGroupNameLabelValue returns the Group Name(value) in the labels of the job func (r *ElasticDLJobReconciler) GetGroupNameLabelValue() string { - return elasticdlv1alpha1.GroupName + return training.SchemeGroupVersion.Group } // GetDefaultContainerName returns the default container name in pod func (r *ElasticDLJobReconciler) GetDefaultContainerName() string { - return elasticdlv1alpha1.DefaultContainerName + return training.ElasticDLJobDefaultContainerName } // GetDefaultContainerPortName Get the default container port name func (r *ElasticDLJobReconciler) GetDefaultContainerPortName() string { - return elasticdlv1alpha1.DefaultPortName + return training.ElasticDLJobDefaultPortName } // GetDefaultContainerPortNumber get the default container port number func (r *ElasticDLJobReconciler) GetDefaultContainerPortNumber() int32 { - return elasticdlv1alpha1.DefaultPort + return training.ElasticDLJobDefaultPort } func (r *ElasticDLJobReconciler) GetReconcileOrders() []v1.ReplicaType { return []v1.ReplicaType{ - elasticdlv1alpha1.ElasticDLReplicaTypeMaster, + training.ElasticDLReplicaTypeMaster, } } func (r *ElasticDLJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, rtype v1.ReplicaType, index int) bool { - _, ok := replicas[elasticdlv1alpha1.ElasticDLReplicaTypeMaster] - return ok && rtype == elasticdlv1alpha1.ElasticDLReplicaTypeMaster + _, ok := replicas[training.ElasticDLReplicaTypeMaster] + return ok && rtype == training.ElasticDLReplicaTypeMaster } // SetClusterSpec sets the cluster spec for the pod diff --git a/controllers/elasticdl/job.go b/controllers/elasticdl/job.go index d78e19f1..d321da53 100644 --- a/controllers/elasticdl/job.go +++ b/controllers/elasticdl/job.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - elasticdlv1alpha1 "github.com/alibaba/kubedl/apis/elasticdl/v1alpha1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/util" @@ -32,7 +32,7 @@ import ( // GetJobFromInformerCache returns the Job from Informer Cache func (r *ElasticDLJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error) { - job := &elasticdlv1alpha1.ElasticDLJob{} + job := &training.ElasticDLJob{} // Default reader for ElasticDLJob is cache reader. err := r.Get(context.Background(), types.NamespacedName{Namespace: namespace, Name: name}, job) if err != nil { @@ -48,7 +48,7 @@ func (r *ElasticDLJobReconciler) GetJobFromInformerCache(namespace, name string) // GetJobFromAPIClient returns the Job from API server func (r *ElasticDLJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error) { - job := &elasticdlv1alpha1.ElasticDLJob{} + job := &training.ElasticDLJob{} // Forcibly use client reader. clientReader, err := util.GetClientReaderFromClient(r.Client) if err != nil { @@ -68,7 +68,7 @@ func (r *ElasticDLJobReconciler) GetJobFromAPIClient(namespace, name string) (me // DeleteJob deletes the job func (r *ElasticDLJobReconciler) DeleteJob(job interface{}) error { - elasticdlJob, ok := job.(*elasticdlv1alpha1.ElasticDLJob) + elasticdlJob, ok := job.(*training.ElasticDLJob) if !ok { return fmt.Errorf("%+v is not a type of ElasticDLJob", elasticdlJob) } @@ -84,7 +84,7 @@ func (r *ElasticDLJobReconciler) DeleteJob(job interface{}) error { // UpdateJobStatus updates the job status and job conditions func (r *ElasticDLJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error { - elasticdlJob, ok := job.(*elasticdlv1alpha1.ElasticDLJob) + elasticdlJob, ok := job.(*training.ElasticDLJob) if !ok { return fmt.Errorf("%+v is not a type of ElasticDLJob", elasticdlJob) } @@ -93,11 +93,11 @@ func (r *ElasticDLJobReconciler) UpdateJobStatus(job interface{}, replicas map[v // UpdateJobStatusInApiServer updates the job status in API server func (r *ElasticDLJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error { - elasticdlJob, ok := job.(*elasticdlv1alpha1.ElasticDLJob) + elasticdlJob, ok := job.(*training.ElasticDLJob) if !ok { return fmt.Errorf("%+v is not a type of ElasticDLJob", elasticdlJob) } - var jobCpy *elasticdlv1alpha1.ElasticDLJob + var jobCpy *training.ElasticDLJob // Job status passed in differs with status in job, update in basis of the passed in one. jobCpy = elasticdlJob.DeepCopy() jobCpy.Status = *jobStatus.DeepCopy() diff --git a/controllers/elasticdl/pod.go b/controllers/elasticdl/pod.go index f1ffa388..e73cff4a 100644 --- a/controllers/elasticdl/pod.go +++ b/controllers/elasticdl/pod.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/client" - elasticdlv1alpha1 "github.com/alibaba/kubedl/apis/elasticdl/v1alpha1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" "github.com/alibaba/kubedl/pkg/util" ) @@ -73,7 +73,7 @@ func (r *ElasticDLJobReconciler) CreatePod(job interface{}, pod *corev1.Pod) err // DeletePod deletes the pod func (r *ElasticDLJobReconciler) DeletePod(job interface{}, pod *corev1.Pod) error { - elasticdlJob, ok := job.(*elasticdlv1alpha1.ElasticDLJob) + elasticdlJob, ok := job.(*training.ElasticDLJob) if !ok { return fmt.Errorf("%+v is not a type of ElasticDLJob", job) } diff --git a/controllers/elasticdl/service.go b/controllers/elasticdl/service.go index e1d95a44..416496cf 100644 --- a/controllers/elasticdl/service.go +++ b/controllers/elasticdl/service.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - elasticdlv1alpha1 "github.com/alibaba/kubedl/apis/elasticdl/v1alpha1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" ) @@ -41,7 +41,7 @@ func (r *ElasticDLJobReconciler) CreateService(job interface{}, service *corev1. // DeleteService deletes the service func (r *ElasticDLJobReconciler) DeleteService(job interface{}, name string, namespace string) error { - elasticdlJob, ok := job.(*elasticdlv1alpha1.ElasticDLJob) + elasticdlJob, ok := job.(*training.ElasticDLJob) if !ok { return fmt.Errorf("%+v is not a type of ElasticDLJob", job) } diff --git a/controllers/elasticdl/status.go b/controllers/elasticdl/status.go index 86d4f5c8..202c0236 100644 --- a/controllers/elasticdl/status.go +++ b/controllers/elasticdl/status.go @@ -25,13 +25,13 @@ import ( "sigs.k8s.io/controller-runtime/pkg/event" "sigs.k8s.io/controller-runtime/pkg/reconcile" - elasticdlv1alpha1 "github.com/alibaba/kubedl/apis/elasticdl/v1alpha1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" commonutil "github.com/alibaba/kubedl/pkg/util" ) // updateGeneralJobStatus updates the status of job with given replica specs and job status. -func (r *ElasticDLJobReconciler) updateGeneralJobStatus(elasticdlJob *elasticdlv1alpha1.ElasticDLJob, +func (r *ElasticDLJobReconciler) updateGeneralJobStatus(elasticdlJob *training.ElasticDLJob, replicaSpecs map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error { log.Info("Updating status", "ElasticDLJob name", elasticdlJob.Name, "restart", restart) @@ -45,7 +45,7 @@ func (r *ElasticDLJobReconciler) updateGeneralJobStatus(elasticdlJob *elasticdlv previousFailed := commonutil.IsFailed(*jobStatus) // An ElasticDLJob only contains a master replica spec. - rtype := elasticdlv1alpha1.ElasticDLReplicaTypeMaster + rtype := training.ElasticDLReplicaTypeMaster if ContainMasterSpec(elasticdlJob) { replicas := *replicaSpecs[rtype].Replicas status := jobStatus.ReplicaStatuses[rtype] @@ -118,7 +118,7 @@ func (r *ElasticDLJobReconciler) updateGeneralJobStatus(elasticdlJob *elasticdlv func onOwnerCreateFunc(r reconcile.Reconciler) func(e event.CreateEvent) bool { return func(e event.CreateEvent) bool { - elasticdlJob, ok := e.Meta.(*elasticdlv1alpha1.ElasticDLJob) + elasticdlJob, ok := e.Meta.(*training.ElasticDLJob) if !ok { return true } diff --git a/controllers/elasticdl/util.go b/controllers/elasticdl/util.go index b0da3501..1d577444 100644 --- a/controllers/elasticdl/util.go +++ b/controllers/elasticdl/util.go @@ -16,7 +16,7 @@ limitations under the License. package elasticdl -import v1alpha1 "github.com/alibaba/kubedl/apis/elasticdl/v1alpha1" +import v1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" func ContainMasterSpec(job *v1alpha1.ElasticDLJob) bool { _, ok := job.Spec.ElasticDLReplicaSpecs[v1alpha1.ElasticDLReplicaTypeMaster] diff --git a/controllers/mars/ingress.go b/controllers/mars/ingress.go index 737e8d90..70ff20c7 100644 --- a/controllers/mars/ingress.go +++ b/controllers/mars/ingress.go @@ -22,7 +22,7 @@ import ( "path" "strings" - "github.com/alibaba/kubedl/apis/mars/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" apiv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" v1 "k8s.io/api/core/v1" @@ -153,7 +153,7 @@ func (r *MarsJobReconciler) createNewIngressForWebservice(svc *v1.Service, host func (r *MarsJobReconciler) findDefaultPort(svc *v1.Service) int32 { if len(svc.Spec.Ports) == 0 { - return v1alpha1.DefaultPort + return v1alpha1.MarsJobDefaultPort } port := svc.Spec.Ports[0].Port for i := 1; i < len(svc.Spec.Ports); i++ { diff --git a/controllers/mars/job.go b/controllers/mars/job.go index 872ffbb9..d2485952 100644 --- a/controllers/mars/job.go +++ b/controllers/mars/job.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/alibaba/kubedl/apis/mars/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/util" diff --git a/controllers/mars/mars.go b/controllers/mars/mars.go index 86cc3c61..1a49831f 100644 --- a/controllers/mars/mars.go +++ b/controllers/mars/mars.go @@ -25,7 +25,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/alibaba/kubedl/apis/mars/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" commonutil "github.com/alibaba/kubedl/pkg/util" "github.com/alibaba/kubedl/pkg/util/quota" @@ -108,7 +108,7 @@ func genClusterSpec(marsJob *v1alpha1.MarsJob) (ClusterSpec, error) { rt := strings.ToLower(string(rtype)) endpoints := make([]string, 0, *spec.Replicas) - port, err := job_controller.GetPortFromJob(marsJob.Spec.MarsReplicaSpecs, rtype, v1alpha1.DefaultContainerName, v1alpha1.DefaultPortName) + port, err := job_controller.GetPortFromJob(marsJob.Spec.MarsReplicaSpecs, rtype, v1alpha1.MarsJobDefaultContainerName, v1alpha1.MarsJobDefaultPortName) if err != nil { return nil, err } diff --git a/controllers/mars/marsjob_controller.go b/controllers/mars/marsjob_controller.go index c4b88d05..1edf0cb6 100644 --- a/controllers/mars/marsjob_controller.go +++ b/controllers/mars/marsjob_controller.go @@ -22,7 +22,7 @@ import ( "strconv" "strings" - kubedliov1beta1 "github.com/alibaba/kubedl/apis/mars/v1alpha1" + kubedliov1beta1 "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/cmd/options" "github.com/alibaba/kubedl/pkg/gang_schedule/registry" "github.com/alibaba/kubedl/pkg/job_controller" @@ -56,7 +56,7 @@ func NewReconciler(mgr ctrl.Manager, config job_controller.JobControllerConfigur scheme: mgr.GetScheme(), } r.recorder = mgr.GetEventRecorderFor(r.ControllerName()) - r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(kubedliov1beta1.Kind, r.Client)) + r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(kubedliov1beta1.MarsJobKind, r.Client)) if r.ctrl.Config.EnableGangScheduling { r.ctrl.GangScheduler = registry.Get(r.ctrl.Config.GangSchedulerName) } @@ -73,8 +73,14 @@ type MarsJobReconciler struct { ctrl job_controller.JobController } -// +kubebuilder:rbac:groups=kubedl.io,resources=marsjobs,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=kubedl.io,resources=marsjobs/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=pods,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="",resources=pods/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="",resources=services/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=events,verbs=create +// +kubebuilder:rbac:groups="networking.k8s.io",resources=ingresses,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=training.kubedl.io,resources=marsjobs,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=training.kubedl.io,resources=marsjobs/status,verbs=get;update;patch func (r *MarsJobReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { // Fetch latest mars job instance. @@ -158,7 +164,7 @@ func (r *MarsJobReconciler) ControllerName() string { } func (r *MarsJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind { - return kubedliov1beta1.GroupVersionKind + return kubedliov1beta1.SchemeGroupVersion.WithKind(kubedliov1beta1.MarsJobKind) } func (r *MarsJobReconciler) GetAPIGroupVersion() schema.GroupVersion { @@ -166,7 +172,7 @@ func (r *MarsJobReconciler) GetAPIGroupVersion() schema.GroupVersion { } func (r *MarsJobReconciler) GetGroupNameLabelValue() string { - return kubedliov1beta1.GroupName + return kubedliov1beta1.SchemeGroupVersion.Group } func (r *MarsJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error { @@ -183,7 +189,7 @@ func (r *MarsJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, // Inject MARS_CONFIG env variable to mars container in the pod. for i := range podTemplate.Spec.Containers { - if podTemplate.Spec.Containers[i].Name == kubedliov1beta1.DefaultContainerName { + if podTemplate.Spec.Containers[i].Name == kubedliov1beta1.MarsJobDefaultContainerName { if len(podTemplate.Spec.Containers[i].Env) == 0 { podTemplate.Spec.Containers[i].Env = make([]corev1.EnvVar, 0) } @@ -195,7 +201,7 @@ func (r *MarsJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, {Name: "MARS_MEMORY_TOTAL", Value: strconv.Itoa(memLimit)}, {Name: "MARS_CPU_USE_PROCESS_STAT", Value: "1"}, {Name: "MARS_MEM_USE_CGROUP_STAT", Value: "1"}, - {Name: "MARS_BIND_PORT", Value: strconv.Itoa(kubedliov1beta1.DefaultPort)}, + {Name: "MARS_BIND_PORT", Value: strconv.Itoa(kubedliov1beta1.MarsJobDefaultPort)}, {Name: "MARS_K8S_GROUP_LABELS", Value: v1.JobNameLabel}, {Name: "MARS_CONTAINER_IP", ValueFrom: &corev1.EnvVarSource{ FieldRef: &corev1.ObjectFieldSelector{FieldPath: "status.podIP"}}}, @@ -243,7 +249,7 @@ func (r *MarsJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, Name: "MARS_CACHE_MEM_SIZE", Value: strconv.Itoa(cacheSize), }) - mountPath := kubedliov1beta1.DefaultCacheMountPath + mountPath := kubedliov1beta1.MarsJobDefaultCacheMountPath if memTuningPolicy.PlasmaStore != nil { mountPath = *memTuningPolicy.PlasmaStore } @@ -258,15 +264,15 @@ func (r *MarsJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, } func (r *MarsJobReconciler) GetDefaultContainerName() string { - return kubedliov1beta1.DefaultContainerName + return kubedliov1beta1.MarsJobDefaultContainerName } func (r *MarsJobReconciler) GetDefaultContainerPortName() string { - return kubedliov1beta1.DefaultPortName + return kubedliov1beta1.MarsJobDefaultPortName } func (r *MarsJobReconciler) GetDefaultContainerPortNumber() int32 { - return kubedliov1beta1.DefaultPort + return kubedliov1beta1.MarsJobDefaultPort } func (r *MarsJobReconciler) GetReconcileOrders() []v1.ReplicaType { diff --git a/controllers/mars/pod.go b/controllers/mars/pod.go index fec0eea5..95386363 100644 --- a/controllers/mars/pod.go +++ b/controllers/mars/pod.go @@ -19,11 +19,11 @@ package controllers import ( "context" "fmt" - "github.com/alibaba/kubedl/apis/mars/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" + "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" "github.com/alibaba/kubedl/pkg/util" + "k8s.io/apimachinery/pkg/api/errors" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" diff --git a/controllers/mars/service.go b/controllers/mars/service.go index c5558839..60281372 100644 --- a/controllers/mars/service.go +++ b/controllers/mars/service.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/alibaba/kubedl/apis/mars/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" "github.com/alibaba/kubedl/pkg/util" diff --git a/controllers/mars/status.go b/controllers/mars/status.go index 70ae7e3b..0c934648 100644 --- a/controllers/mars/status.go +++ b/controllers/mars/status.go @@ -19,7 +19,7 @@ package controllers import ( "fmt" - "github.com/alibaba/kubedl/apis/mars/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" commonutil "github.com/alibaba/kubedl/pkg/util" diff --git a/controllers/mars/suite_test.go b/controllers/mars/suite_test.go index 11442712..9fbd0c5d 100644 --- a/controllers/mars/suite_test.go +++ b/controllers/mars/suite_test.go @@ -17,9 +17,10 @@ limitations under the License. package controllers import ( - "sigs.k8s.io/controller-runtime/pkg/client/fake" "testing" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" @@ -28,7 +29,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - kubedliov1beta1 "github.com/alibaba/kubedl/apis/mars/v1alpha1" + kubedliov1beta1 "github.com/alibaba/kubedl/apis/training/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/controllers/mpi/job.go b/controllers/mpi/job.go index 3e796682..2f95b5bf 100644 --- a/controllers/mpi/job.go +++ b/controllers/mpi/job.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - mpiv1 "github.com/alibaba/kubedl/apis/mpi/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/util" @@ -34,7 +34,7 @@ import ( ) func (r *MPIJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error) { - job := &mpiv1.MPIJob{} + job := &training.MPIJob{} // Default reader for PytorchJob is cache reader. err := r.Get(context.Background(), types.NamespacedName{Namespace: namespace, Name: name}, job) if err != nil { @@ -49,7 +49,7 @@ func (r *MPIJobReconciler) GetJobFromInformerCache(namespace, name string) (meta } func (r *MPIJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error) { - job := &mpiv1.MPIJob{} + job := &training.MPIJob{} // Forcibly use client reader. clientReader, err := util.GetClientReaderFromClient(r.Client) if err != nil { @@ -68,7 +68,7 @@ func (r *MPIJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.O } func (r *MPIJobReconciler) DeleteJob(job interface{}) error { - mpiJob, ok := job.(*mpiv1.MPIJob) + mpiJob, ok := job.(*training.MPIJob) if !ok { return fmt.Errorf("%+v is not a type of MPIJob", mpiJob) } @@ -83,15 +83,15 @@ func (r *MPIJobReconciler) DeleteJob(job interface{}) error { } func (r *MPIJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error { - mpiJob, ok := job.(*mpiv1.MPIJob) + mpiJob, ok := job.(*training.MPIJob) if !ok { return fmt.Errorf("%+v is not type of MPIJob", job) } previousRestarting := util.IsRestarting(*jobStatus) previousFailed := util.IsFailed(*jobStatus) - launcherStatus := jobStatus.ReplicaStatuses[mpiv1.MPIReplicaTypeLauncher] - workerStatus := jobStatus.ReplicaStatuses[mpiv1.MPIReplicaTypeWorker] + launcherStatus := jobStatus.ReplicaStatuses[training.MPIReplicaTypeLauncher] + workerStatus := jobStatus.ReplicaStatuses[training.MPIReplicaTypeWorker] if launcherStatus != nil { if launcherStatus.Succeeded > 0 { @@ -132,7 +132,7 @@ func (r *MPIJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.Repl } if workerStatus != nil { - workerReplicas := *replicas[mpiv1.MPIReplicaTypeWorker].Replicas + workerReplicas := *replicas[training.MPIReplicaTypeWorker].Replicas // Append and broadcast Evict event if evicted workers occurs. if workerStatus.Evicted > 0 { msg := fmt.Sprintf("%d/%d workers are evicted.", workerStatus.Evicted, workerReplicas) @@ -169,12 +169,12 @@ func (r *MPIJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.Repl } func (r *MPIJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error { - mpiJob, ok := job.(*mpiv1.MPIJob) + mpiJob, ok := job.(*training.MPIJob) if !ok { return fmt.Errorf("%+v is not type of MarsJob", mpiJob) } - var jobCpy *mpiv1.MPIJob + var jobCpy *training.MPIJob jobCpy = mpiJob.DeepCopy() jobCpy.Status = *jobStatus.DeepCopy() return r.Status().Update(context.Background(), jobCpy) @@ -182,7 +182,7 @@ func (r *MPIJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus func onOwnerCreateFunc(r reconcile.Reconciler) func(e event.CreateEvent) bool { return func(e event.CreateEvent) bool { - mpiJob, ok := e.Meta.(*mpiv1.MPIJob) + mpiJob, ok := e.Meta.(*training.MPIJob) if !ok { return false } diff --git a/controllers/mpi/legacy.go b/controllers/mpi/legacy.go index 5ec7acb9..bd899c6a 100644 --- a/controllers/mpi/legacy.go +++ b/controllers/mpi/legacy.go @@ -19,7 +19,7 @@ package mpi import ( "fmt" - mpiv1 "github.com/alibaba/kubedl/apis/mpi/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" apiv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" v1 "k8s.io/api/core/v1" @@ -29,7 +29,7 @@ import ( // LegacyMPIJobToV1MPIJob handles legacy fields deserialized from json object // and transferred to a combined v1 mpi-job to be reconciled. -func LegacyMPIJobToV1MPIJob(mpiJob *mpiv1.MPIJob) error { +func LegacyMPIJobToV1MPIJob(mpiJob *training.MPIJob) error { if mpiJob.Spec.MPIJobLegacySpec == nil { return nil } @@ -52,18 +52,18 @@ func LegacyMPIJobToV1MPIJob(mpiJob *mpiv1.MPIJob) error { mpiJob.Spec.SlotsPerWorker = &unitsPerWorker } // The computed worker will be converted to MPIReplicaSpecs struct. - if spec := mpiJob.Spec.MPIReplicaSpecs[mpiv1.MPIReplicaTypeWorker]; (spec == nil || spec.Replicas == nil) && + if spec := mpiJob.Spec.MPIReplicaSpecs[training.MPIReplicaTypeWorker]; (spec == nil || spec.Replicas == nil) && workerReplicas > 0 { if spec == nil { spec = &apiv1.ReplicaSpec{} } spec.Replicas = &workerReplicas spec.Template = v1alpha1.Template - mpiJob.Spec.MPIReplicaSpecs[mpiv1.MPIReplicaTypeWorker] = spec + mpiJob.Spec.MPIReplicaSpecs[training.MPIReplicaTypeWorker] = spec } - if spec := mpiJob.Spec.MPIReplicaSpecs[mpiv1.MPIReplicaTypeLauncher]; spec == nil { - mpiJob.Spec.MPIReplicaSpecs[mpiv1.MPIReplicaTypeLauncher] = &apiv1.ReplicaSpec{ + if spec := mpiJob.Spec.MPIReplicaSpecs[training.MPIReplicaTypeLauncher]; spec == nil { + mpiJob.Spec.MPIReplicaSpecs[training.MPIReplicaTypeLauncher] = &apiv1.ReplicaSpec{ Replicas: pointer.Int32Ptr(1), Template: v1alpha1.Template, } @@ -77,7 +77,7 @@ func LegacyMPIJobToV1MPIJob(mpiJob *mpiv1.MPIJob) error { return nil } -func processingUnitsPerWorker(v1alpha1 *mpiv1.LegacyV1Alpha1) (workerReplicas, unitsPerWorker int32, err error) { +func processingUnitsPerWorker(v1alpha1 *training.LegacyV1Alpha1) (workerReplicas, unitsPerWorker int32, err error) { if v1alpha1.DeprecatedGPUs != nil && v1alpha1.ProcessingUnits != nil { return 0, 0, fmt.Errorf("cannot specify both GPUs and ProcessingUnits at the same time") } diff --git a/controllers/mpi/mpi_config.go b/controllers/mpi/mpi_config.go index c364f884..6efab4ca 100644 --- a/controllers/mpi/mpi_config.go +++ b/controllers/mpi/mpi_config.go @@ -20,12 +20,13 @@ import ( "bytes" "context" "fmt" - mpiv1 "github.com/alibaba/kubedl/apis/mpi/v1" + "strings" + + training "github.com/alibaba/kubedl/apis/training/v1alpha1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "strings" ) const ( @@ -40,11 +41,11 @@ const ( ) var ( - launcherSuffix = "-" + strings.ToLower(string(mpiv1.MPIReplicaTypeLauncher)) - workerSuffix = "-" + strings.ToLower(string(mpiv1.MPIReplicaTypeWorker)) + launcherSuffix = "-" + strings.ToLower(string(training.MPIReplicaTypeLauncher)) + workerSuffix = "-" + strings.ToLower(string(training.MPIReplicaTypeWorker)) ) -func (r *MPIJobReconciler) getOrCreateJobConfig(mpiJob *mpiv1.MPIJob, workerReplicas int32, isGPULauncher bool) (*corev1.ConfigMap, error) { +func (r *MPIJobReconciler) getOrCreateJobConfig(mpiJob *training.MPIJob, workerReplicas int32, isGPULauncher bool) (*corev1.ConfigMap, error) { cm := corev1.ConfigMap{} err := r.Client.Get(context.Background(), types.NamespacedName{ Namespace: mpiJob.Namespace, @@ -64,7 +65,7 @@ func (r *MPIJobReconciler) getOrCreateJobConfig(mpiJob *mpiv1.MPIJob, workerRepl // newConfigMap creates a new ConfigMap containing configurations for an MPIJob // resource. It also sets the appropriate OwnerReferences on the resource so // handleObject can discover the MPIJob resource that 'owns' it. -func newJobConfigMap(mpiJob *mpiv1.MPIJob, workerReplicas int32, isGPULauncher bool) *corev1.ConfigMap { +func newJobConfigMap(mpiJob *training.MPIJob, workerReplicas int32, isGPULauncher bool) *corev1.ConfigMap { kubexec := fmt.Sprintf(`#!/bin/sh set -x POD_NAME=$1 @@ -91,8 +92,8 @@ shift // But for Open MPI, use "slots=" syntax to achieve this function. if mpiJob.Spec.MPIJobLegacySpec != nil && mpiJob.Spec.MPIJobLegacySpec.LegacyV1Alpha2 != nil && mpiJob.Spec.MPIJobLegacySpec.LegacyV1Alpha2.MPIDistribution != nil && - (*mpiJob.Spec.MPIJobLegacySpec.LegacyV1Alpha2.MPIDistribution == mpiv1.MPIDistributionTypeIntelMPI || - *mpiJob.Spec.MPIJobLegacySpec.LegacyV1Alpha2.MPIDistribution == mpiv1.MPIDistributionTypeMPICH) { + (*mpiJob.Spec.MPIJobLegacySpec.LegacyV1Alpha2.MPIDistribution == training.MPIDistributionTypeIntelMPI || + *mpiJob.Spec.MPIJobLegacySpec.LegacyV1Alpha2.MPIDistribution == training.MPIDistributionTypeMPICH) { buffer.WriteString(fmt.Sprintf("%s%s-%d:%d\n", mpiJob.Name, workerSuffix, i, slots)) } else { buffer.WriteString(fmt.Sprintf("%s%s-%d slots=%d\n", mpiJob.Name, workerSuffix, i, slots)) @@ -107,7 +108,7 @@ shift "app": mpiJob.Name, }, OwnerReferences: []metav1.OwnerReference{ - *metav1.NewControllerRef(mpiJob, mpiv1.SchemeGroupVersionKind), + *metav1.NewControllerRef(mpiJob, training.SchemeGroupVersion.WithKind(training.MPIJobKind)), }, }, Data: map[string]string{ @@ -117,6 +118,6 @@ shift } } -func jobConfigName(mpiJob *mpiv1.MPIJob) string { +func jobConfigName(mpiJob *training.MPIJob) string { return fmt.Sprintf("%s-config", mpiJob.Name) } diff --git a/controllers/mpi/mpijob_controller.go b/controllers/mpi/mpijob_controller.go index 31683ed6..fb4e240a 100644 --- a/controllers/mpi/mpijob_controller.go +++ b/controllers/mpi/mpijob_controller.go @@ -38,7 +38,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "sigs.k8s.io/controller-runtime/pkg/source" - mpiv1 "github.com/alibaba/kubedl/apis/mpi/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/cmd/options" "github.com/alibaba/kubedl/pkg/gang_schedule/registry" "github.com/alibaba/kubedl/pkg/job_controller" @@ -70,7 +70,7 @@ func NewReconciler(mgr ctrl.Manager, config job_controller.JobControllerConfigur scheme: mgr.GetScheme(), } r.recorder = mgr.GetEventRecorderFor(r.ControllerName()) - r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(mpiv1.Kind, r.Client)) + r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(training.MPIJobKind, r.Client)) if r.ctrl.Config.EnableGangScheduling { r.ctrl.GangScheduler = registry.Get(r.ctrl.Config.GangSchedulerName) } @@ -92,8 +92,11 @@ type MPIJobReconciler struct { // +kubebuilder:rbac:groups="",resources=pods/status,verbs=get;update;patch // +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups="",resources=services/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=kubeflow.org,resources=mpijobs,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=kubeflow.org,resources=mpijobs/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="",resources=configmaps/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=events,verbs=create +// +kubebuilder:rbac:groups=training.kubedl.io,resources=mpijobs,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=training.kubedl.io,resources=mpijobs/status,verbs=get;update;patch // Reconcile reads that state of the cluster for a MPIJob object and makes changes based on the state read // and what is in the MPIJob.Spec @@ -104,7 +107,7 @@ func (r *MPIJobReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { ) // Fetch the latest mpi job. - sharedMPIJob := &mpiv1.MPIJob{} + sharedMPIJob := &training.MPIJob{} err = r.Get(context.Background(), req.NamespacedName, sharedMPIJob) if err != nil { if errors.IsNotFound(err) { @@ -157,7 +160,7 @@ func (r *MPIJobReconciler) SetupWithManager(mgr ctrl.Manager) error { } // Watch owner resource with create event filter. - if err = c.Watch(&source.Kind{Type: &mpiv1.MPIJob{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{ + if err = c.Watch(&source.Kind{Type: &training.MPIJob{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{ CreateFunc: onOwnerCreateFunc(r), }); err != nil { return err @@ -165,7 +168,7 @@ func (r *MPIJobReconciler) SetupWithManager(mgr ctrl.Manager) error { // Watch managed resource with owner and create/delete event filter. if err = c.Watch(&source.Kind{Type: &corev1.Pod{}}, &handler.EnqueueRequestForOwner{ - OwnerType: &mpiv1.MPIJob{}, + OwnerType: &training.MPIJob{}, IsController: true, }, predicate.Funcs{ CreateFunc: r.ctrl.OnPodCreateFunc, @@ -176,7 +179,7 @@ func (r *MPIJobReconciler) SetupWithManager(mgr ctrl.Manager) error { } if err = c.Watch(&source.Kind{Type: &corev1.ConfigMap{}}, &handler.EnqueueRequestForOwner{ - OwnerType: &mpiv1.MPIJob{}, + OwnerType: &training.MPIJob{}, IsController: true, }); err != nil { return err @@ -191,30 +194,30 @@ func (r *MPIJobReconciler) ControllerName() string { // GetAPIGroupVersionKind returns the GroupVersionKind of the API func (r *MPIJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind { - return mpiv1.SchemeGroupVersionKind + return training.SchemeGroupVersion.WithKind(training.MPIJobKind) } // GetAPIGroupVersion returns the GroupVersion of the API func (r *MPIJobReconciler) GetAPIGroupVersion() schema.GroupVersion { - return mpiv1.SchemeGroupVersion + return training.SchemeGroupVersion } // GetGroupNameLabelValue returns the Group Name(value) in the labels of the job func (r *MPIJobReconciler) GetGroupNameLabelValue() string { - return mpiv1.GroupName + return training.SchemeGroupVersion.Group } // SetClusterSpec generates and sets for the given podTemplateSpec. func (r *MPIJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, podTemplateSpec *corev1.PodTemplateSpec, rt, index string) error { - mpiJob, ok := job.(*mpiv1.MPIJob) + mpiJob, ok := job.(*training.MPIJob) if !ok { return fmt.Errorf("%+v is not a type of MPIJob", job) } switch rt { - case strings.ToLower(string(mpiv1.MPIReplicaTypeWorker)): + case strings.ToLower(string(training.MPIReplicaTypeWorker)): r.setupMPIWorker(mpiJob, podTemplateSpec) - case strings.ToLower(string(mpiv1.MPIReplicaTypeLauncher)): + case strings.ToLower(string(training.MPIReplicaTypeLauncher)): r.setupMPILauncher(mpiJob, podTemplateSpec) } @@ -223,25 +226,25 @@ func (r *MPIJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, // GetDefaultContainerName returns the default container name in pod func (r *MPIJobReconciler) GetDefaultContainerName() string { - return mpiv1.DefaultContainerName + return training.MPIJobDefaultContainerName } // GetDefaultContainerPortName Get the default container port name func (r *MPIJobReconciler) GetDefaultContainerPortName() string { - return mpiv1.DefaultPortName + return training.MPIJobDefaultPortName } // GetDefaultContainerPortNumber get the default container port number func (r *MPIJobReconciler) GetDefaultContainerPortNumber() int32 { - return mpiv1.DefaultPort + return training.MPIJobDefaultPort } // Get replicas reconcile orders so that replica type with higher priority can be created earlier. func (r *MPIJobReconciler) GetReconcileOrders() []v1.ReplicaType { // MPI requires worker created before launcher. return []v1.ReplicaType{ - mpiv1.MPIReplicaTypeWorker, - mpiv1.MPIReplicaTypeLauncher, + training.MPIReplicaTypeWorker, + training.MPIReplicaTypeLauncher, } } @@ -251,7 +254,7 @@ func (r *MPIJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaS return false } -func (r *MPIJobReconciler) setupMPIWorker(mpiJob *mpiv1.MPIJob, podTemplateSpec *corev1.PodTemplateSpec) { +func (r *MPIJobReconciler) setupMPIWorker(mpiJob *training.MPIJob, podTemplateSpec *corev1.PodTemplateSpec) { // We need the kubexec.sh script here because Open MPI checks for the path // in every rank. mode := int32(0555) @@ -286,7 +289,7 @@ func (r *MPIJobReconciler) setupMPIWorker(mpiJob *mpiv1.MPIJob, podTemplateSpec } } -func (r *MPIJobReconciler) setupMPILauncher(mpiJob *mpiv1.MPIJob, podTemplateSpec *corev1.PodTemplateSpec) { +func (r *MPIJobReconciler) setupMPILauncher(mpiJob *training.MPIJob, podTemplateSpec *corev1.PodTemplateSpec) { if len(podTemplateSpec.Spec.Containers) == 0 { msg := fmt.Sprintf("launcher pod does not have any containers in its spec") log.Error(stderrors.New(msg), msg) @@ -360,7 +363,7 @@ func (r *MPIJobReconciler) setupMPILauncher(mpiJob *mpiv1.MPIJob, podTemplateSpe }) } -func setupLauncherMainContainers(mpiJob *mpiv1.MPIJob, container *corev1.Container) { +func setupLauncherMainContainers(mpiJob *training.MPIJob, container *corev1.Container) { // Different MPI frameworks use different environment variables // to specify the path of the remote task launcher and hostfile file. mpiRshExecPathEnvName := "OMPI_MCA_plm_rsh_agent" @@ -371,10 +374,10 @@ func setupLauncherMainContainers(mpiJob *mpiv1.MPIJob, container *corev1.Contain mpiJob.Spec.MPIJobLegacySpec.LegacyV1Alpha2.MPIDistribution != nil { distribution := *mpiJob.Spec.MPIJobLegacySpec.LegacyV1Alpha2.MPIDistribution - if distribution == mpiv1.MPIDistributionTypeIntelMPI { + if distribution == training.MPIDistributionTypeIntelMPI { mpiRshExecPathEnvName = "I_MPI_HYDRA_BOOTSTRAP_EXEC" mpiHostfilePathEnvName = "I_MPI_HYDRA_HOST_FILE" - } else if distribution == mpiv1.MPIDistributionTypeMPICH { + } else if distribution == training.MPIDistributionTypeMPICH { mpiRshExecPathEnvName = "HYDRA_LAUNCHER_EXEC" mpiHostfilePathEnvName = "HYDRA_HOST_FILE" } diff --git a/controllers/mpi/pod.go b/controllers/mpi/pod.go index e5d6dd27..b2036d38 100644 --- a/controllers/mpi/pod.go +++ b/controllers/mpi/pod.go @@ -19,11 +19,12 @@ package mpi import ( "context" "fmt" + "strings" + "k8s.io/klog" "k8s.io/kubernetes/pkg/controller" - "strings" - mpiv1 "github.com/alibaba/kubedl/apis/mpi/v1" + mpiv1 "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" apiv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/util" diff --git a/controllers/persist/object/job/marsjob_persist_controller.go b/controllers/persist/object/job/marsjob_persist_controller.go index 29795765..602b8d2a 100644 --- a/controllers/persist/object/job/marsjob_persist_controller.go +++ b/controllers/persist/object/job/marsjob_persist_controller.go @@ -18,7 +18,7 @@ package job import ( "context" - "github.com/alibaba/kubedl/apis/mars/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/controllers/persist/util" "k8s.io/apimachinery/pkg/api/errors" diff --git a/controllers/persist/object/job/pytorchjob_persist_controller.go b/controllers/persist/object/job/pytorchjob_persist_controller.go index 13a2e3a8..7e63f3cb 100644 --- a/controllers/persist/object/job/pytorchjob_persist_controller.go +++ b/controllers/persist/object/job/pytorchjob_persist_controller.go @@ -19,7 +19,7 @@ package job import ( "context" - v1 "github.com/alibaba/kubedl/apis/pytorch/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/controllers/persist/util" "k8s.io/apimachinery/pkg/api/errors" @@ -32,7 +32,7 @@ import ( ) func init() { - jobPersistCtrlMap[&v1.PyTorchJob{}] = NewPytorchJobPersistController + jobPersistCtrlMap[&training.PyTorchJob{}] = NewPytorchJobPersistController } func NewPytorchJobPersistController(mgr ctrl.Manager, handler *jobPersistHandler) PersistController { @@ -57,7 +57,7 @@ func (pc *PytorchJobPersistController) Reconcile(req ctrl.Request) (ctrl.Result, return ctrl.Result{}, err } - pytorchJob := v1.PyTorchJob{} + pytorchJob := training.PyTorchJob{} err = pc.client.Get(context.Background(), types.NamespacedName{ Namespace: req.Namespace, Name: name, @@ -87,7 +87,7 @@ func (pc *PytorchJobPersistController) SetupWithManager(mgr ctrl.Manager) error } // Watch events with event events-handler. - if err = c.Watch(&source.Kind{Type: &v1.PyTorchJob{}}, &enqueueForJob{}); err != nil { + if err = c.Watch(&source.Kind{Type: &training.PyTorchJob{}}, &enqueueForJob{}); err != nil { return err } return nil diff --git a/controllers/persist/object/job/tfjob_persist_controller.go b/controllers/persist/object/job/tfjob_persist_controller.go index f704bf45..45dac452 100644 --- a/controllers/persist/object/job/tfjob_persist_controller.go +++ b/controllers/persist/object/job/tfjob_persist_controller.go @@ -19,7 +19,7 @@ package job import ( "context" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/controllers/persist/util" "k8s.io/apimachinery/pkg/api/errors" @@ -32,7 +32,7 @@ import ( ) func init() { - jobPersistCtrlMap[&tfv1.TFJob{}] = NewTFJobPersistController + jobPersistCtrlMap[&training.TFJob{}] = NewTFJobPersistController } func NewTFJobPersistController(mgr ctrl.Manager, handler *jobPersistHandler) PersistController { @@ -57,7 +57,7 @@ func (pc *TFJobPersistController) Reconcile(req ctrl.Request) (ctrl.Result, erro return ctrl.Result{}, err } - tfJob := tfv1.TFJob{} + tfJob := training.TFJob{} err = pc.client.Get(context.Background(), types.NamespacedName{ Namespace: req.Namespace, Name: name, @@ -87,7 +87,7 @@ func (pc *TFJobPersistController) SetupWithManager(mgr ctrl.Manager) error { } // Watch events with event events-handler. - if err = c.Watch(&source.Kind{Type: &tfv1.TFJob{}}, &enqueueForJob{}); err != nil { + if err = c.Watch(&source.Kind{Type: &training.TFJob{}}, &enqueueForJob{}); err != nil { return err } return nil diff --git a/controllers/persist/object/job/xdljob_persist_controller.go b/controllers/persist/object/job/xdljob_persist_controller.go index f07457da..f922d0f7 100644 --- a/controllers/persist/object/job/xdljob_persist_controller.go +++ b/controllers/persist/object/job/xdljob_persist_controller.go @@ -19,7 +19,7 @@ package job import ( "context" - "github.com/alibaba/kubedl/apis/xdl/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/controllers/persist/util" "k8s.io/apimachinery/pkg/api/errors" diff --git a/controllers/persist/object/job/xgboostjob_persist_controller.go b/controllers/persist/object/job/xgboostjob_persist_controller.go index 4fe714eb..8798a551 100644 --- a/controllers/persist/object/job/xgboostjob_persist_controller.go +++ b/controllers/persist/object/job/xgboostjob_persist_controller.go @@ -19,7 +19,7 @@ package job import ( "context" - "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/controllers/persist/util" "k8s.io/apimachinery/pkg/api/errors" diff --git a/controllers/persist/object/pod/pod_persist_controller.go b/controllers/persist/object/pod/pod_persist_controller.go index f5c8d883..e16dc18c 100644 --- a/controllers/persist/object/pod/pod_persist_controller.go +++ b/controllers/persist/object/pod/pod_persist_controller.go @@ -21,10 +21,7 @@ import ( stderrors "errors" "fmt" - pytorchv1 "github.com/alibaba/kubedl/apis/pytorch/v1" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" - xdlv1alpha1 "github.com/alibaba/kubedl/apis/xdl/v1alpha1" - xgboostv1alpha1 "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" persistutil "github.com/alibaba/kubedl/controllers/persist/util" "github.com/alibaba/kubedl/pkg/storage/backends" "github.com/alibaba/kubedl/pkg/storage/backends/registry" @@ -127,14 +124,14 @@ func (pc *PodPersistController) SetupWithManager(mgr ctrl.Manager) error { func matchDefaultContainerName(kind string) string { switch kind { - case tfv1.Kind: - return tfv1.DefaultContainerName - case pytorchv1.Kind: - return pytorchv1.DefaultContainerName - case xdlv1alpha1.Kind: - return xdlv1alpha1.DefaultContainerName - case xgboostv1alpha1.Kind: - return xgboostv1alpha1.DefaultContainerName + case trainingv1alpha1.TFJobKind: + return trainingv1alpha1.TFJobDefaultContainerName + case trainingv1alpha1.PyTorchJobKind: + return trainingv1alpha1.PyTorchJobDefaultContainerName + case trainingv1alpha1.XDLJobKind: + return trainingv1alpha1.XDLJobDefaultContainerName + case trainingv1alpha1.XGBoostJobKind: + return trainingv1alpha1.XGBoostJobDefaultContainerName } return "" } diff --git a/controllers/persist/util/filter.go b/controllers/persist/util/filter.go index 447e0208..b7e0e19f 100644 --- a/controllers/persist/util/filter.go +++ b/controllers/persist/util/filter.go @@ -17,10 +17,7 @@ limitations under the License. package util import ( - pytorchv1 "github.com/alibaba/kubedl/apis/pytorch/v1" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" - xdlv1alpha1 "github.com/alibaba/kubedl/apis/xdl/v1alpha1" - xgboostv1alpha1 "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" apiv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/util" @@ -28,7 +25,7 @@ import ( ) func IsKubeDLManagedJobKind(kind string) bool { - return kind == tfv1.Kind || kind == pytorchv1.Kind || kind == xdlv1alpha1.Kind || kind == xgboostv1alpha1.Kind + return kind == trainingv1alpha1.TFJobKind || kind == trainingv1alpha1.PyTorchJobKind || kind == trainingv1alpha1.XDLJobKind || kind == trainingv1alpha1.XGBoostJobKind } func IsKubeDLManagedPod(pod *corev1.Pod) bool { diff --git a/controllers/pytorch/job.go b/controllers/pytorch/job.go index 4975ac7a..564e11e1 100644 --- a/controllers/pytorch/job.go +++ b/controllers/pytorch/job.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - pytorchv1 "github.com/alibaba/kubedl/apis/pytorch/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/util" @@ -32,7 +32,7 @@ import ( // GetJobFromInformerCache returns the Job from Informer Cache func (r *PytorchJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error) { - job := &pytorchv1.PyTorchJob{} + job := &training.PyTorchJob{} // Default reader for PytorchJob is cache reader. err := r.Get(context.Background(), types.NamespacedName{Namespace: namespace, Name: name}, job) if err != nil { @@ -48,7 +48,7 @@ func (r *PytorchJobReconciler) GetJobFromInformerCache(namespace, name string) ( // GetJobFromAPIClient returns the Job from API server func (r *PytorchJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error) { - job := &pytorchv1.PyTorchJob{} + job := &training.PyTorchJob{} // Forcibly use client reader. clientReader, err := util.GetClientReaderFromClient(r.Client) if err != nil { @@ -68,7 +68,7 @@ func (r *PytorchJobReconciler) GetJobFromAPIClient(namespace, name string) (meta // DeleteJob deletes the job func (r *PytorchJobReconciler) DeleteJob(job interface{}) error { - pytorchJob, ok := job.(*pytorchv1.PyTorchJob) + pytorchJob, ok := job.(*training.PyTorchJob) if !ok { return fmt.Errorf("%+v is not a type of PytorchJob", pytorchJob) } @@ -84,7 +84,7 @@ func (r *PytorchJobReconciler) DeleteJob(job interface{}) error { // UpdateJobStatus updates the job status and job conditions func (r *PytorchJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error { - pytorchJob, ok := job.(*pytorchv1.PyTorchJob) + pytorchJob, ok := job.(*training.PyTorchJob) if !ok { return fmt.Errorf("%+v is not a type of PytorchJob", pytorchJob) } @@ -93,11 +93,11 @@ func (r *PytorchJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1. // UpdateJobStatusInApiServer updates the job status in API server func (r *PytorchJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error { - pytorchJob, ok := job.(*pytorchv1.PyTorchJob) + pytorchJob, ok := job.(*training.PyTorchJob) if !ok { return fmt.Errorf("%+v is not a type of PytorchJob", pytorchJob) } - var jobCpy *pytorchv1.PyTorchJob + var jobCpy *training.PyTorchJob // Job status passed in differs with status in job, update in basis of the passed in one. jobCpy = pytorchJob.DeepCopy() jobCpy.Status = *jobStatus.DeepCopy() diff --git a/controllers/pytorch/pod.go b/controllers/pytorch/pod.go index 73c58563..87168395 100644 --- a/controllers/pytorch/pod.go +++ b/controllers/pytorch/pod.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/client" - pytorchv1 "github.com/alibaba/kubedl/apis/pytorch/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" "github.com/alibaba/kubedl/pkg/util" ) @@ -73,7 +73,7 @@ func (r *PytorchJobReconciler) CreatePod(job interface{}, pod *corev1.Pod) error // DeletePod deletes the pod func (r *PytorchJobReconciler) DeletePod(job interface{}, pod *corev1.Pod) error { - pytorchJob, ok := job.(*pytorchv1.PyTorchJob) + pytorchJob, ok := job.(*training.PyTorchJob) if !ok { return fmt.Errorf("%+v is not a type of PytorchJob", job) } diff --git a/controllers/pytorch/pytorchjob_controller.go b/controllers/pytorch/pytorchjob_controller.go index ba58bd37..ed93ddaf 100644 --- a/controllers/pytorch/pytorchjob_controller.go +++ b/controllers/pytorch/pytorchjob_controller.go @@ -36,7 +36,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "sigs.k8s.io/controller-runtime/pkg/source" - pytorchv1 "github.com/alibaba/kubedl/apis/pytorch/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/cmd/options" "github.com/alibaba/kubedl/pkg/gang_schedule/registry" "github.com/alibaba/kubedl/pkg/job_controller" @@ -58,7 +58,7 @@ func NewReconciler(mgr ctrl.Manager, config job_controller.JobControllerConfigur scheme: mgr.GetScheme(), } r.recorder = mgr.GetEventRecorderFor(r.ControllerName()) - r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(pytorchv1.Kind, r.Client)) + r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(training.PyTorchJobKind, r.Client)) if r.ctrl.Config.EnableGangScheduling { r.ctrl.GangScheduler = registry.Get(r.ctrl.Config.GangSchedulerName) } @@ -82,12 +82,13 @@ type PytorchJobReconciler struct { // +kubebuilder:rbac:groups="",resources=pods/status,verbs=get;update;patch // +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups="",resources=services/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=kubeflow.org,resources=pytorchjobs,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=kubeflow.org,resources=pytorchjobs/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=events,verbs=create +// +kubebuilder:rbac:groups=training.kubedl.io,resources=pytorchjobs,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=training.kubedl.io,resources=pytorchjobs/status,verbs=get;update;patch func (r *PytorchJobReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { // Fetch latest pytorch job instance. - sharedPytorchJob := &pytorchv1.PyTorchJob{} + sharedPytorchJob := &training.PyTorchJob{} err := r.Get(context.Background(), req.NamespacedName, sharedPytorchJob) if err != nil { if errors.IsNotFound(err) { @@ -131,7 +132,7 @@ func (r *PytorchJobReconciler) SetupWithManager(mgr ctrl.Manager) error { } // Watch owner resource with create event filter. - if err = c.Watch(&source.Kind{Type: &pytorchv1.PyTorchJob{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{ + if err = c.Watch(&source.Kind{Type: &training.PyTorchJob{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{ CreateFunc: onOwnerCreateFunc(r), }); err != nil { return err @@ -139,7 +140,7 @@ func (r *PytorchJobReconciler) SetupWithManager(mgr ctrl.Manager) error { // Watch managed resource with owner and create/delete event filter. if err = c.Watch(&source.Kind{Type: &corev1.Pod{}}, &handler.EnqueueRequestForOwner{ - OwnerType: &pytorchv1.PyTorchJob{}, + OwnerType: &training.PyTorchJob{}, IsController: true, }, predicate.Funcs{ CreateFunc: r.ctrl.OnPodCreateFunc, @@ -150,7 +151,7 @@ func (r *PytorchJobReconciler) SetupWithManager(mgr ctrl.Manager) error { } return c.Watch(&source.Kind{Type: &corev1.Service{}}, &handler.EnqueueRequestForOwner{ - OwnerType: &pytorchv1.PyTorchJob{}, + OwnerType: &training.PyTorchJob{}, IsController: true, }, predicate.Funcs{ CreateFunc: r.ctrl.OnServiceCreateFunc, @@ -165,22 +166,22 @@ func (r *PytorchJobReconciler) ControllerName() string { // GetAPIGroupVersionKind returns the GroupVersionKind of the API func (r *PytorchJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind { - return pytorchv1.SchemeGroupVersionKind + return training.SchemeGroupVersion.WithKind(training.PyTorchJobKind) } // GetAPIGroupVersion returns the GroupVersion of the API func (r *PytorchJobReconciler) GetAPIGroupVersion() schema.GroupVersion { - return pytorchv1.SchemeGroupVersion + return training.SchemeGroupVersion } // GetGroupNameLabelValue returns the Group Name(value) in the labels of the job func (r *PytorchJobReconciler) GetGroupNameLabelValue() string { - return pytorchv1.GroupName + return training.SchemeGroupVersion.Group } // SetClusterSpec sets the cluster spec for the pod func (r *PytorchJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error { - pytorchJob, ok := job.(*pytorchv1.PyTorchJob) + pytorchJob, ok := job.(*training.PyTorchJob) if !ok { return fmt.Errorf("%+v is not a type of PytorchJob", job) } @@ -189,13 +190,13 @@ func (r *PytorchJobReconciler) SetClusterSpec(ctx context.Context, job interface return err } - masterPort, err := job_controller.GetPortFromJob(pytorchJob.Spec.PyTorchReplicaSpecs, pytorchv1.PyTorchReplicaTypeMaster, pytorchv1.DefaultContainerName, pytorchv1.DefaultPortName) + masterPort, err := job_controller.GetPortFromJob(pytorchJob.Spec.PyTorchReplicaSpecs, training.PyTorchReplicaTypeMaster, training.PyTorchJobDefaultContainerName, training.PyTorchJobDefaultPortName) if err != nil { return err } - masterAddr := commonutil.GenGeneralName(pytorchJob.Name, strings.ToLower(string(pytorchv1.PyTorchReplicaTypeMaster)), strconv.Itoa(0)) - if rtype == strings.ToLower(string(pytorchv1.PyTorchReplicaTypeMaster)) { + masterAddr := commonutil.GenGeneralName(pytorchJob.Name, strings.ToLower(string(training.PyTorchReplicaTypeMaster)), strconv.Itoa(0)) + if rtype == strings.ToLower(string(training.PyTorchReplicaTypeMaster)) { if rank != 0 { return fmt.Errorf("invalid config: There should be only a single master with index=0") } @@ -236,29 +237,29 @@ func (r *PytorchJobReconciler) SetClusterSpec(ctx context.Context, job interface // GetDefaultContainerName returns the default container name in pod func (r *PytorchJobReconciler) GetDefaultContainerName() string { - return pytorchv1.DefaultContainerName + return training.PyTorchJobDefaultContainerName } // GetDefaultContainerPortName Get the default container port name func (r *PytorchJobReconciler) GetDefaultContainerPortName() string { - return pytorchv1.DefaultPortName + return training.PyTorchJobDefaultPortName } // GetDefaultContainerPortNumber get the default container port number func (r *PytorchJobReconciler) GetDefaultContainerPortNumber() int32 { - return pytorchv1.DefaultPort + return training.PyTorchJobDefaultPort } func (r *PytorchJobReconciler) GetReconcileOrders() []v1.ReplicaType { return []v1.ReplicaType{ - pytorchv1.PyTorchReplicaTypeMaster, - pytorchv1.PyTorchReplicaTypeWorker, + training.PyTorchReplicaTypeMaster, + training.PyTorchReplicaTypeWorker, } } // IsMasterRole returns if this replica type with index specified is a master role. // MasterRole pod will have "job-role=master" set in its label func (r *PytorchJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, rtype v1.ReplicaType, index int) bool { - _, ok := replicas[pytorchv1.PyTorchReplicaTypeMaster] - return ok && rtype == pytorchv1.PyTorchReplicaTypeMaster + _, ok := replicas[training.PyTorchReplicaTypeMaster] + return ok && rtype == training.PyTorchReplicaTypeMaster } diff --git a/controllers/pytorch/service.go b/controllers/pytorch/service.go index f6d30900..6370f021 100644 --- a/controllers/pytorch/service.go +++ b/controllers/pytorch/service.go @@ -26,7 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - pytorchv1 "github.com/alibaba/kubedl/apis/pytorch/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" "github.com/alibaba/kubedl/pkg/util" ) @@ -72,7 +72,7 @@ func (r *PytorchJobReconciler) CreateService(job interface{}, service *corev1.Se // DeleteService deletes the service func (r *PytorchJobReconciler) DeleteService(job interface{}, name string, namespace string) error { - pytorchJob, ok := job.(*pytorchv1.PyTorchJob) + pytorchJob, ok := job.(*training.PyTorchJob) if !ok { return fmt.Errorf("%+v is not a type of PytorchJob", job) } diff --git a/controllers/pytorch/status.go b/controllers/pytorch/status.go index 7979efca..cac23e3b 100644 --- a/controllers/pytorch/status.go +++ b/controllers/pytorch/status.go @@ -25,13 +25,13 @@ import ( "sigs.k8s.io/controller-runtime/pkg/event" "sigs.k8s.io/controller-runtime/pkg/reconcile" - pytorchv1 "github.com/alibaba/kubedl/apis/pytorch/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" commonutil "github.com/alibaba/kubedl/pkg/util" ) // updateGeneralJobStatus updates the status of job with given replica specs and job status. -func (r *PytorchJobReconciler) updateGeneralJobStatus(pytorchJob *pytorchv1.PyTorchJob, +func (r *PytorchJobReconciler) updateGeneralJobStatus(pytorchJob *training.PyTorchJob, replicaSpecs map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error { log.Info("Updating status", "PytorchJob name", pytorchJob.Name, "restart", restart) @@ -61,7 +61,7 @@ func (r *PytorchJobReconciler) updateGeneralJobStatus(pytorchJob *pytorchv1.PyTo "ReplicaType", rtype, "expected", expected, "running", running, "failed", failed) if ContainMasterSpec(pytorchJob) { - if rtype == pytorchv1.PyTorchReplicaTypeMaster { + if rtype == training.PyTorchReplicaTypeMaster { if running > 0 { msg := fmt.Sprintf("PyTorchJob %s is running.", pytorchJob.Name) err := commonutil.UpdateJobConditions(jobStatus, v1.JobRunning, commonutil.JobRunningReason, msg) @@ -126,7 +126,7 @@ func (r *PytorchJobReconciler) updateGeneralJobStatus(pytorchJob *pytorchv1.PyTo func onOwnerCreateFunc(r reconcile.Reconciler) func(e event.CreateEvent) bool { return func(e event.CreateEvent) bool { - pytorchJob, ok := e.Meta.(*pytorchv1.PyTorchJob) + pytorchJob, ok := e.Meta.(*training.PyTorchJob) if !ok { return true } diff --git a/controllers/pytorch/util.go b/controllers/pytorch/util.go index 05605401..6880fb19 100644 --- a/controllers/pytorch/util.go +++ b/controllers/pytorch/util.go @@ -16,9 +16,9 @@ limitations under the License. package pytorch -import v1 "github.com/alibaba/kubedl/apis/pytorch/v1" +import training "github.com/alibaba/kubedl/apis/training/v1alpha1" -func ContainMasterSpec(job *v1.PyTorchJob) bool { - _, ok := job.Spec.PyTorchReplicaSpecs[v1.PyTorchReplicaTypeMaster] +func ContainMasterSpec(job *training.PyTorchJob) bool { + _, ok := job.Spec.PyTorchReplicaSpecs[training.PyTorchReplicaTypeMaster] return ok } diff --git a/controllers/suite_tests/pytorchjob_controller_test.go b/controllers/suite_tests/pytorchjob_controller_test.go index da5d2100..b380e145 100644 --- a/controllers/suite_tests/pytorchjob_controller_test.go +++ b/controllers/suite_tests/pytorchjob_controller_test.go @@ -1,7 +1,7 @@ package suite_tests import ( - v1 "github.com/alibaba/kubedl/apis/pytorch/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "golang.org/x/net/context" @@ -29,7 +29,7 @@ var _ = Describe("PytorchJob Controller", func() { Namespace: "default", } - instance := &v1.PyTorchJob{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}} + instance := &training.PyTorchJob{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}} // Create err := k8sClient.Create(context.Background(), instance) @@ -43,14 +43,14 @@ var _ = Describe("PytorchJob Controller", func() { // Get By("Expecting created tf job") Eventually(func() error { - job := &v1.PyTorchJob{} + job := &training.PyTorchJob{} return k8sClient.Get(context.Background(), key, job) }, timeout).Should(BeNil()) // Delete By("Deleting tf job") Eventually(func() error { - job := &v1.PyTorchJob{} + job := &training.PyTorchJob{} err := k8sClient.Get(context.Background(), key, job) if err != nil { return err diff --git a/controllers/suite_tests/tfjob_controller_test.go b/controllers/suite_tests/tfjob_controller_test.go index 8878cecd..b39ddacd 100644 --- a/controllers/suite_tests/tfjob_controller_test.go +++ b/controllers/suite_tests/tfjob_controller_test.go @@ -1,7 +1,7 @@ package suite_tests import ( - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "golang.org/x/net/context" @@ -29,7 +29,7 @@ var _ = Describe("TFJob Controller", func() { Namespace: "default", } - instance := &tfv1.TFJob{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}} + instance := &training.TFJob{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}} // Create err := k8sClient.Create(context.Background(), instance) @@ -43,14 +43,14 @@ var _ = Describe("TFJob Controller", func() { // Get By("Expecting created tf job") Eventually(func() error { - job := &tfv1.TFJob{} + job := &training.TFJob{} return k8sClient.Get(context.Background(), key, job) }, timeout).Should(BeNil()) // Delete By("Deleting tf job") Eventually(func() error { - job := &tfv1.TFJob{} + job := &training.TFJob{} err := k8sClient.Get(context.Background(), key, job) if err != nil { return err diff --git a/controllers/suite_tests/xdljob_controller_test.go b/controllers/suite_tests/xdljob_controller_test.go index 7fb4685f..8ffc65e8 100644 --- a/controllers/suite_tests/xdljob_controller_test.go +++ b/controllers/suite_tests/xdljob_controller_test.go @@ -19,7 +19,7 @@ package suite_tests import ( "time" - xdlv1alpha1 "github.com/alibaba/kubedl/apis/xdl/v1alpha1" + xdlv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "golang.org/x/net/context" diff --git a/controllers/suite_tests/xgboostjob_controller_test.go b/controllers/suite_tests/xgboostjob_controller_test.go index 1e9d475c..74962d28 100644 --- a/controllers/suite_tests/xgboostjob_controller_test.go +++ b/controllers/suite_tests/xgboostjob_controller_test.go @@ -1,7 +1,7 @@ package suite_tests import ( - "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "golang.org/x/net/context" diff --git a/controllers/tensorflow/job.go b/controllers/tensorflow/job.go index b2fe4072..3a870235 100644 --- a/controllers/tensorflow/job.go +++ b/controllers/tensorflow/job.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/util" @@ -32,7 +32,7 @@ import ( // GetJobFromInformerCache returns the Job from Informer Cache func (r *TFJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error) { - job := &tfv1.TFJob{} + job := &training.TFJob{} // Default reader for TFJob is cache reader. err := r.Get(context.Background(), types.NamespacedName{Namespace: namespace, Name: name}, job) if err != nil { @@ -48,7 +48,7 @@ func (r *TFJobReconciler) GetJobFromInformerCache(namespace, name string) (metav // GetJobFromAPIClient returns the Job from API server func (r *TFJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error) { - job := &tfv1.TFJob{} + job := &training.TFJob{} // Forcibly use client reader. clientReader, err := util.GetClientReaderFromClient(r.Client) if err != nil { @@ -68,7 +68,7 @@ func (r *TFJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Ob // DeleteJob deletes the job func (r *TFJobReconciler) DeleteJob(job interface{}) error { - tfJob, ok := job.(*tfv1.TFJob) + tfJob, ok := job.(*training.TFJob) if !ok { return fmt.Errorf("%+v is not a type of TFJob", tfJob) } @@ -84,7 +84,7 @@ func (r *TFJobReconciler) DeleteJob(job interface{}) error { // UpdateJobStatus updates the job status and job conditions func (r *TFJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error { - tfJob, ok := job.(*tfv1.TFJob) + tfJob, ok := job.(*training.TFJob) if !ok { return fmt.Errorf("%+v is not a type of TFJob", tfJob) } @@ -93,11 +93,11 @@ func (r *TFJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.Repli // UpdateJobStatusInApiServer updates the job status in API server func (r *TFJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error { - tfJob, ok := job.(*tfv1.TFJob) + tfJob, ok := job.(*training.TFJob) if !ok { return fmt.Errorf("%+v is not a type of TFJob", tfJob) } - var jobCpy *tfv1.TFJob + var jobCpy *training.TFJob // Job status passed in differs with status in job, update in basis of the passed in one. jobCpy = tfJob.DeepCopy() jobCpy.Status = *jobStatus.DeepCopy() diff --git a/controllers/tensorflow/pod.go b/controllers/tensorflow/pod.go index fda602c3..00c161a3 100644 --- a/controllers/tensorflow/pod.go +++ b/controllers/tensorflow/pod.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/client" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" "github.com/alibaba/kubedl/pkg/util" ) @@ -72,7 +72,7 @@ func (r *TFJobReconciler) CreatePod(job interface{}, pod *corev1.Pod) error { // DeletePod deletes the pod func (r *TFJobReconciler) DeletePod(job interface{}, pod *corev1.Pod) error { - tfJob, ok := job.(*tfv1.TFJob) + tfJob, ok := job.(*training.TFJob) if !ok { return fmt.Errorf("%+v is not a type of TFJob", job) } diff --git a/controllers/tensorflow/service.go b/controllers/tensorflow/service.go index 2b571657..2fccfa0d 100644 --- a/controllers/tensorflow/service.go +++ b/controllers/tensorflow/service.go @@ -26,7 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" "github.com/alibaba/kubedl/pkg/util" ) @@ -72,7 +72,7 @@ func (r *TFJobReconciler) CreateService(job interface{}, service *corev1.Service // DeleteService deletes the service func (r *TFJobReconciler) DeleteService(job interface{}, name string, namespace string) error { - tfJob, ok := job.(*tfv1.TFJob) + tfJob, ok := job.(*training.TFJob) if !ok { return fmt.Errorf("%+v is not a type of TFJob", job) } diff --git a/controllers/tensorflow/status.go b/controllers/tensorflow/status.go index 463b76dd..597774c4 100644 --- a/controllers/tensorflow/status.go +++ b/controllers/tensorflow/status.go @@ -20,7 +20,7 @@ import ( "strconv" "strings" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" commonutil "github.com/alibaba/kubedl/pkg/util" corev1 "k8s.io/api/core/v1" @@ -32,7 +32,7 @@ import ( // onOwnerCreateFunc modify creation condition. func onOwnerCreateFunc(r reconcile.Reconciler) func(event.CreateEvent) bool { return func(e event.CreateEvent) bool { - tfJob, ok := e.Meta.(*tfv1.TFJob) + tfJob, ok := e.Meta.(*training.TFJob) if !ok { return true } @@ -53,7 +53,7 @@ func onOwnerCreateFunc(r reconcile.Reconciler) func(event.CreateEvent) bool { } // updateGeneralJobStatus updates the status of job with given replica specs and job status. -func (r *TFJobReconciler) updateGeneralJobStatus(tfJob *tfv1.TFJob, replicaSpecs map[v1.ReplicaType]*v1.ReplicaSpec, +func (r *TFJobReconciler) updateGeneralJobStatus(tfJob *training.TFJob, replicaSpecs map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error { log.Info("Updating status", "TFJob name", tfJob.Name) @@ -71,7 +71,7 @@ func (r *TFJobReconciler) updateGeneralJobStatus(tfJob *tfv1.TFJob, replicaSpecs } // Get all pods for workers. - pods, err = r.ctrl.FilterPodsForReplicaType(pods, strings.ToLower(string(tfv1.TFReplicaTypeWorker))) + pods, err = r.ctrl.FilterPodsForReplicaType(pods, strings.ToLower(string(training.TFReplicaTypeWorker))) if err != nil { log.Error(err, "FilterPodsForReplicaType error") return err @@ -88,7 +88,7 @@ func (r *TFJobReconciler) updateGeneralJobStatus(tfJob *tfv1.TFJob, replicaSpecs var exitCode int32 = 0xbeef // magic number for _, status := range pod.Status.ContainerStatuses { state := status.State - if status.Name == tfv1.DefaultContainerName && state.Terminated != nil { + if status.Name == training.TFJobDefaultContainerName && state.Terminated != nil { exitCode = state.Terminated.ExitCode break } @@ -125,7 +125,7 @@ func (r *TFJobReconciler) updateGeneralJobStatus(tfJob *tfv1.TFJob, replicaSpecs // If the TFJob contains Chief or Master spec, then we will update the status // according to the Chief/Master spec. if ContainChieforMasterSpec(tfJob) { - if tfv1.IsChieforMaster(rtype) { + if training.IsTFJobChieforMaster(rtype) { if running > 0 { msg := fmt.Sprintf("TFJob %s is running.", tfJob.Name) err := commonutil.UpdateJobConditions(jobStatus, v1.JobRunning, commonutil.JobRunningReason, msg) @@ -150,12 +150,12 @@ func (r *TFJobReconciler) updateGeneralJobStatus(tfJob *tfv1.TFJob, replicaSpecs } } } else { - if rtype == tfv1.TFReplicaTypeWorker { + if rtype == training.TFReplicaTypeWorker { // All workers are succeeded or worker 0 completed, leave a succeeded condition. // Leave a succeeded condition for the following two cases: // 1. If default success policy is used and worker 0 has completed. // 2. If `SuccessPolicyAllWorkers` success policy is used and all workers are succeeded. - if expected == 0 || (worker0Completed && *tfJob.Spec.SuccessPolicy != tfv1.SuccessPolicyAllWorkers) { + if expected == 0 || (worker0Completed && *tfJob.Spec.SuccessPolicy != training.SuccessPolicyAllWorkers) { msg := fmt.Sprintf("TFJob %s successfully completed.", tfJob.Name) r.recorder.Event(tfJob, corev1.EventTypeNormal, commonutil.JobSucceededReason, msg) if jobStatus.CompletionTime == nil { diff --git a/controllers/tensorflow/tensorflow.go b/controllers/tensorflow/tensorflow.go index 87c08d66..5682b27d 100644 --- a/controllers/tensorflow/tensorflow.go +++ b/controllers/tensorflow/tensorflow.go @@ -23,7 +23,7 @@ import ( "strconv" "strings" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" commonutil "github.com/alibaba/kubedl/pkg/util" ) @@ -72,7 +72,7 @@ type TaskSpec struct { // }, // } // } -func genTFConfigJSONStr(ctx context.Context, tfjob *tfv1.TFJob, rtype, index string) (string, error) { +func genTFConfigJSONStr(ctx context.Context, tfjob *training.TFJob, rtype, index string) (string, error) { // Configure the TFCONFIG environment variable. i, err := strconv.ParseInt(index, 0, 32) if err != nil { @@ -105,11 +105,11 @@ func genTFConfigJSONStr(ctx context.Context, tfjob *tfv1.TFJob, rtype, index str } // genClusterSpec will generate ClusterSpec. -func genClusterSpec(ctx context.Context, tfJob *tfv1.TFJob, selfType, selfIndex string) (ClusterSpec, error) { +func genClusterSpec(ctx context.Context, tfJob *training.TFJob, selfType, selfIndex string) (ClusterSpec, error) { clusterSpec := make(ClusterSpec) for rtype, spec := range tfJob.Spec.TFReplicaSpecs { - if rtype == tfv1.TFReplicaTypeEval { + if rtype == training.TFReplicaTypeEval { // https://www.tensorflow.org/api_docs/python/tf/estimator/RunConfig // evaluator is not part of training cluster continue @@ -117,7 +117,7 @@ func genClusterSpec(ctx context.Context, tfJob *tfv1.TFJob, selfType, selfIndex rt := strings.ToLower(string(rtype)) replicaNames := make([]string, 0, *spec.Replicas) - port, err := job_controller.GetPortFromJob(tfJob.Spec.TFReplicaSpecs, rtype, tfv1.DefaultContainerName, tfv1.DefaultPortName) + port, err := job_controller.GetPortFromJob(tfJob.Spec.TFReplicaSpecs, rtype, training.TFJobDefaultContainerName, training.TFJobDefaultPortName) if err != nil { return nil, err } diff --git a/controllers/tensorflow/tfjob_controller.go b/controllers/tensorflow/tfjob_controller.go index 25b71324..1804a80c 100644 --- a/controllers/tensorflow/tfjob_controller.go +++ b/controllers/tensorflow/tfjob_controller.go @@ -35,7 +35,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "sigs.k8s.io/controller-runtime/pkg/source" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/cmd/options" "github.com/alibaba/kubedl/pkg/gang_schedule/registry" "github.com/alibaba/kubedl/pkg/job_controller" @@ -62,7 +62,7 @@ func NewReconciler(mgr ctrl.Manager, config job_controller.JobControllerConfigur scheme: mgr.GetScheme(), } r.recorder = mgr.GetEventRecorderFor(r.ControllerName()) - r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(tfv1.Kind, r.Client)) + r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(training.TFJobKind, r.Client)) if r.ctrl.Config.EnableGangScheduling { r.ctrl.GangScheduler = registry.Get(r.ctrl.Config.GangSchedulerName) } @@ -86,13 +86,14 @@ type TFJobReconciler struct { // +kubebuilder:rbac:groups="",resources=pods/status,verbs=get;update;patch // +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups="",resources=services/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=kubeflow.org,resources=tfjobs,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=kubeflow.org,resources=tfjobs/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=events,verbs=create +// +kubebuilder:rbac:groups=training.kubedl.io,resources=tfjobs,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=training.kubedl.io,resources=tfjobs/status,verbs=get;update;patch // +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete func (r *TFJobReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { // Fetch the TFJob tfJob - sharedTfJob := &tfv1.TFJob{} + sharedTfJob := &training.TFJob{} err := r.Get(context.Background(), req.NamespacedName, sharedTfJob) if err != nil { if errors.IsNotFound(err) { @@ -146,7 +147,7 @@ func (r *TFJobReconciler) SetupWithManager(mgr ctrl.Manager) error { } // Watch owner resource with create event filter. - if err = c.Watch(&source.Kind{Type: &tfv1.TFJob{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{ + if err = c.Watch(&source.Kind{Type: &training.TFJob{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{ CreateFunc: onOwnerCreateFunc(r), }); err != nil { return err @@ -154,7 +155,7 @@ func (r *TFJobReconciler) SetupWithManager(mgr ctrl.Manager) error { // Watch managed resource with owner and create/delete event filter. if err = c.Watch(&source.Kind{Type: &corev1.Pod{}}, &handler.EnqueueRequestForOwner{ - OwnerType: &tfv1.TFJob{}, + OwnerType: &training.TFJob{}, IsController: true, }, predicate.Funcs{ CreateFunc: r.ctrl.OnPodCreateFunc, @@ -165,7 +166,7 @@ func (r *TFJobReconciler) SetupWithManager(mgr ctrl.Manager) error { } return c.Watch(&source.Kind{Type: &corev1.Service{}}, &handler.EnqueueRequestForOwner{ - OwnerType: &tfv1.TFJob{}, + OwnerType: &training.TFJob{}, IsController: true, }, predicate.Funcs{ CreateFunc: r.ctrl.OnServiceCreateFunc, @@ -181,22 +182,22 @@ func (r *TFJobReconciler) ControllerName() string { // GetAPIGroupVersionKind returns the GroupVersionKind of the API func (r *TFJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind { - return tfv1.SchemeGroupVersionKind + return training.SchemeGroupVersion.WithKind(training.TFJobKind) } // GetAPIGroupVersion returns the GroupVersion of the API func (r *TFJobReconciler) GetAPIGroupVersion() schema.GroupVersion { - return tfv1.SchemeGroupVersion + return training.SchemeGroupVersion } // GetGroupNameLabelValue returns the Group Name(value) in the labels of the job func (r *TFJobReconciler) GetGroupNameLabelValue() string { - return tfv1.GroupName + return training.SchemeGroupVersion.Group } // SetClusterSpec generates and sets TF_CONFIG for the given podTemplateSpec. func (r *TFJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, podTemplateSpec *corev1.PodTemplateSpec, rt, index string) error { - tfJob, ok := job.(*tfv1.TFJob) + tfJob, ok := job.(*training.TFJob) if !ok { return fmt.Errorf("%+v is not a type of TFJob", job) } @@ -216,7 +217,7 @@ func (r *TFJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, p } // Add TF_CONFIG environment variable to tensorflow container in the pod. for i := range podTemplateSpec.Spec.Containers { - if podTemplateSpec.Spec.Containers[i].Name == tfv1.DefaultContainerName { + if podTemplateSpec.Spec.Containers[i].Name == training.TFJobDefaultContainerName { if len(podTemplateSpec.Spec.Containers[i].Env) == 0 { podTemplateSpec.Spec.Containers[i].Env = make([]corev1.EnvVar, 0) } @@ -232,15 +233,15 @@ func (r *TFJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, p // isDistributed returns if the TFJob is a distributed training job. // Ref https://github.com/kubeflow/tf-operator/issues/1078. -func isDistributed(tfJob *tfv1.TFJob) bool { +func isDistributed(tfJob *training.TFJob) bool { replicas := tfJob.Spec.TFReplicaSpecs distributionCount := 0 allTypes := []v1.ReplicaType{ - tfv1.TFReplicaTypeChief, - tfv1.TFReplicaTypeEval, - tfv1.TFReplicaTypeMaster, - tfv1.TFReplicaTypePS, - tfv1.TFReplicaTypeWorker, + training.TFReplicaTypeChief, + training.TFReplicaTypeEval, + training.TFReplicaTypeMaster, + training.TFReplicaTypePS, + training.TFReplicaTypeWorker, } // Check if there is only one replica. for _, typ := range allTypes { @@ -257,42 +258,42 @@ func isDistributed(tfJob *tfv1.TFJob) bool { // GetDefaultContainerName returns the default container name in pod func (r *TFJobReconciler) GetDefaultContainerName() string { - return tfv1.DefaultContainerName + return training.TFJobDefaultContainerName } // GetDefaultContainerPortName Get the default container port name func (r *TFJobReconciler) GetDefaultContainerPortName() string { - return tfv1.DefaultPortName + return training.TFJobDefaultPortName } // GetDefaultContainerPortNumber get the default container port number func (r *TFJobReconciler) GetDefaultContainerPortNumber() int32 { - return tfv1.DefaultPort + return training.TFJobDefaultPort } // Get replicas reconcile orders so that replica type with higher priority can be created earlier. func (r *TFJobReconciler) GetReconcileOrders() []v1.ReplicaType { return []v1.ReplicaType{ - tfv1.TFReplicaTypePS, - tfv1.TFReplicaTypeMaster, - tfv1.TFReplicaTypeChief, - tfv1.TFReplicaTypeWorker, + training.TFReplicaTypePS, + training.TFReplicaTypeMaster, + training.TFReplicaTypeChief, + training.TFReplicaTypeWorker, } } // IsMasterRole returns if this replica type with index specified is a master role. // MasterRole pod will have "job-role=master" set in its label func (r *TFJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, rtype v1.ReplicaType, index int) bool { - return tfv1.IsChieforMaster(rtype) + return training.IsTFJobChieforMaster(rtype) } // getMasterSpec returns chief or worker spec. func (r *TFJobReconciler) getMasterSpec(replicas map[v1.ReplicaType]*v1.ReplicaSpec) (v1.ReplicaType, *v1.ReplicaSpec) { - if spec, ok := replicas[tfv1.TFReplicaTypeChief]; ok { - return tfv1.TFReplicaTypeChief, spec + if spec, ok := replicas[training.TFReplicaTypeChief]; ok { + return training.TFReplicaTypeChief, spec } - if spec, ok := replicas[tfv1.TFReplicaTypeMaster]; ok { - return tfv1.TFReplicaTypeMaster, spec + if spec, ok := replicas[training.TFReplicaTypeMaster]; ok { + return training.TFReplicaTypeMaster, spec } - return tfv1.TFReplicaTypeWorker, replicas[tfv1.TFReplicaTypeWorker] + return training.TFReplicaTypeWorker, replicas[training.TFReplicaTypeWorker] } diff --git a/controllers/tensorflow/tfjob_controller_test.go b/controllers/tensorflow/tfjob_controller_test.go index 037e8520..133c5d3a 100644 --- a/controllers/tensorflow/tfjob_controller_test.go +++ b/controllers/tensorflow/tfjob_controller_test.go @@ -7,10 +7,10 @@ import ( "testing" "github.com/alibaba/kubedl/apis" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/gang_schedule/registry" "github.com/alibaba/kubedl/pkg/job_controller" - "github.com/alibaba/kubedl/pkg/job_controller/api/v1" + v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/metrics" "github.com/alibaba/kubedl/pkg/util" "github.com/stretchr/testify/assert" @@ -37,12 +37,12 @@ type TFJobReconcilerTest struct { } func (r *TFJobReconcilerTest) GetJobFromAPIClient(namespace, name string) (metav1.Object, error) { - job := &tfv1.TFJob{} + job := &training.TFJob{} err := r.Get(context.Background(), types.NamespacedName{Namespace: namespace, Name: name}, job) return job, err } -func (r *TFJobReconcilerTest) satisfiedExpectations(tfJob *tfv1.TFJob) bool { +func (r *TFJobReconcilerTest) satisfiedExpectations(tfJob *training.TFJob) bool { // during unit test, no watch events will happen, hence always return true to trigger reconcile return true } @@ -74,7 +74,7 @@ func NewReconcilerTest(client client.Client, scheme *runtime.Scheme, Config: config, BackoffStatesQueue: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), Recorder: r.recorder, - Metrics: metrics.NewJobMetrics(tfv1.Kind, r.Client), + Metrics: metrics.NewJobMetrics(training.TFJobKind, r.Client), } if r.ctrl.Config.EnableGangScheduling { r.ctrl.GangScheduler = registry.Get(r.ctrl.Config.GangSchedulerName) @@ -179,16 +179,16 @@ func markPodStatus(podName string, status corev1.PodPhase, tfJobReconciler *TFJo _ = tfJobReconciler.Status().Update(context.Background(), pod) } -func createTFJob(jobName string, replicas int32) *tfv1.TFJob { - successPolicy := tfv1.SuccessPolicyAllWorkers - tfjob1 := &tfv1.TFJob{ +func createTFJob(jobName string, replicas int32) *training.TFJob { + successPolicy := training.SuccessPolicyAllWorkers + tfjob1 := &training.TFJob{ ObjectMeta: metav1.ObjectMeta{ Name: jobName, Namespace: "default", UID: "12345", }, - Spec: tfv1.TFJobSpec{ + Spec: training.TFJobSpec{ TFReplicaSpecs: map[v1.ReplicaType]*v1.ReplicaSpec{ "Worker": { Replicas: &replicas, @@ -213,10 +213,10 @@ func createTFJob(jobName string, replicas int32) *tfv1.TFJob { } // not used, maybe using later.. -func createPodForJob(podName string, job *tfv1.TFJob) *corev1.Pod { +func createPodForJob(podName string, job *training.TFJob) *corev1.Pod { labelGroupName := v1.GroupNameLabel labelJobName := v1.JobNameLabel - groupName := tfv1.GroupName + groupName := training.SchemeGroupVersion.Group labels := map[string]string{ labelGroupName: groupName, labelJobName: strings.Replace(job.Name, "/", "-", -1), diff --git a/controllers/tensorflow/util.go b/controllers/tensorflow/util.go index 404628ec..3b76b8f8 100644 --- a/controllers/tensorflow/util.go +++ b/controllers/tensorflow/util.go @@ -16,7 +16,7 @@ package tensorflow import ( - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" + tfv1 "github.com/alibaba/kubedl/apis/training/v1alpha1" ) // ContainChieforMasterSpec returns true if the tfjob contains chief or master spec. diff --git a/controllers/xdl/job.go b/controllers/xdl/job.go index cc31327f..bf613255 100644 --- a/controllers/xdl/job.go +++ b/controllers/xdl/job.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - xdlv1alpha1 "github.com/alibaba/kubedl/apis/xdl/v1alpha1" + xdlv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" commonutil "github.com/alibaba/kubedl/pkg/util" diff --git a/controllers/xdl/pod.go b/controllers/xdl/pod.go index 220e75b8..ebf58a70 100644 --- a/controllers/xdl/pod.go +++ b/controllers/xdl/pod.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/client" - xdlv1alpha1 "github.com/alibaba/kubedl/apis/xdl/v1alpha1" + xdlv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" "github.com/alibaba/kubedl/pkg/util" ) diff --git a/controllers/xdl/service.go b/controllers/xdl/service.go index e0bfbf62..b2484390 100644 --- a/controllers/xdl/service.go +++ b/controllers/xdl/service.go @@ -26,7 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - xdlv1alpha1 "github.com/alibaba/kubedl/apis/xdl/v1alpha1" + xdlv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" "github.com/alibaba/kubedl/pkg/util" ) diff --git a/controllers/xdl/status.go b/controllers/xdl/status.go index 3f6e23b8..cc8d5107 100644 --- a/controllers/xdl/status.go +++ b/controllers/xdl/status.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/event" "sigs.k8s.io/controller-runtime/pkg/reconcile" - xdlv1alpha1 "github.com/alibaba/kubedl/apis/xdl/v1alpha1" + xdlv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" commonutil "github.com/alibaba/kubedl/pkg/util" ) diff --git a/controllers/xdl/xdl.go b/controllers/xdl/xdl.go index 3e92e779..91d62289 100644 --- a/controllers/xdl/xdl.go +++ b/controllers/xdl/xdl.go @@ -22,7 +22,7 @@ import ( "strconv" "strings" - "github.com/alibaba/kubedl/apis/xdl/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" commonutil "github.com/alibaba/kubedl/pkg/util" ) @@ -88,7 +88,7 @@ func genClusterSpec(xdlJob *v1alpha1.XDLJob) (ClusterSpec, error) { rt := strings.ToLower(string(rtype)) replicaNames := make([]string, 0, *spec.Replicas) - port, err := job_controller.GetPortFromJob(xdlJob.Spec.XDLReplicaSpecs, rtype, v1alpha1.DefaultContainerName, v1alpha1.DefaultContainerPortName) + port, err := job_controller.GetPortFromJob(xdlJob.Spec.XDLReplicaSpecs, rtype, v1alpha1.XDLJobDefaultContainerName, v1alpha1.XDLJobDefaultContainerPortName) if err != nil { return nil, err } diff --git a/controllers/xdl/xdljob_controller.go b/controllers/xdl/xdljob_controller.go index e25ea77c..b85f985f 100644 --- a/controllers/xdl/xdljob_controller.go +++ b/controllers/xdl/xdljob_controller.go @@ -36,7 +36,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "sigs.k8s.io/controller-runtime/pkg/source" - xdlv1alpha1 "github.com/alibaba/kubedl/apis/xdl/v1alpha1" + xdlv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/cmd/options" "github.com/alibaba/kubedl/pkg/gang_schedule/registry" "github.com/alibaba/kubedl/pkg/job_controller" @@ -65,7 +65,7 @@ func NewReconciler(mgr manager.Manager, config job_controller.JobControllerConfi scheme: mgr.GetScheme(), } r.recorder = mgr.GetEventRecorderFor(r.ControllerName()) - r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(xdlv1alpha1.Kind, r.Client)) + r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(xdlv1alpha1.XDLJobKind, r.Client)) if r.ctrl.Config.EnableGangScheduling { r.ctrl.GangScheduler = registry.Get(r.ctrl.Config.GangSchedulerName) } @@ -89,8 +89,9 @@ type XDLJobReconciler struct { // +kubebuilder:rbac:groups="",resources=pods/status,verbs=get;update;patch // +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups="",resources=services/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=xdl.kubedl.io,resources=xdljobs,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=xdl.kubedl.io,resources=xdljobs/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=events,verbs=create +// +kubebuilder:rbac:groups=training.kubedl.io,resources=xdljobs,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=training.kubedl.io,resources=xdljobs/status,verbs=get;update;patch func (r *XDLJobReconciler) Reconcile(request reconcile.Request) (reconcile.Result, error) { // Fetch the latest xdlJob instance. @@ -175,7 +176,7 @@ func (r *XDLJobReconciler) ControllerName() string { // GetAPIGroupVersionKind returns the GroupVersionKind of the API func (r *XDLJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind { - return xdlv1alpha1.SchemeGroupVersionKind + return xdlv1alpha1.SchemeGroupVersion.WithKind(xdlv1alpha1.XDLJobKind) } // GetAPIGroupVersion returns the GroupVersion of the API @@ -185,7 +186,7 @@ func (r *XDLJobReconciler) GetAPIGroupVersion() schema.GroupVersion { // GetGroupNameLabelValue returns the Group Name(value) in the labels of the job func (r *XDLJobReconciler) GetGroupNameLabelValue() string { - return xdlv1alpha1.GroupName + return r.GetAPIGroupVersion().Group } // SetClusterSpec sets the cluster spec for the pod @@ -219,17 +220,17 @@ func (r *XDLJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, // GetDefaultContainerName returns the default container name in pod func (r *XDLJobReconciler) GetDefaultContainerName() string { - return xdlv1alpha1.DefaultContainerName + return xdlv1alpha1.XDLJobDefaultContainerName } // GetDefaultContainerPortName Get the default container port name func (r *XDLJobReconciler) GetDefaultContainerPortName() string { - return xdlv1alpha1.DefaultContainerPortName + return xdlv1alpha1.XDLJobDefaultContainerPortName } // GetDefaultContainerPortNumber get the default container port number func (r *XDLJobReconciler) GetDefaultContainerPortNumber() int32 { - return xdlv1alpha1.DefaultPort + return xdlv1alpha1.XDLJobDefaultPort } func (r *XDLJobReconciler) GetReconcileOrders() []v1.ReplicaType { diff --git a/controllers/xgboost/job.go b/controllers/xgboost/job.go index 89b62802..95301ecd 100644 --- a/controllers/xgboost/job.go +++ b/controllers/xgboost/job.go @@ -19,7 +19,7 @@ import ( "context" "fmt" - "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" commonutil "github.com/alibaba/kubedl/pkg/util" diff --git a/controllers/xgboost/pod.go b/controllers/xgboost/pod.go index b65e8b61..738b0306 100644 --- a/controllers/xgboost/pod.go +++ b/controllers/xgboost/pod.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" "github.com/alibaba/kubedl/pkg/util" commonutil "github.com/alibaba/kubedl/pkg/util" @@ -116,7 +116,7 @@ func SetPodEnv(job interface{}, podTemplate *corev1.PodTemplateSpec, index strin } masterAddr := commonutil.GenGeneralName(xgboostjob.Name, strings.ToLower(string(v1alpha1.XGBoostReplicaTypeMaster)), strconv.Itoa(0)) - masterPort, err := job_controller.GetPortFromJob(xgboostjob.Spec.XGBReplicaSpecs, v1alpha1.XGBoostReplicaTypeMaster, v1alpha1.DefaultContainerName, v1alpha1.DefaultContainerPortName) + masterPort, err := job_controller.GetPortFromJob(xgboostjob.Spec.XGBReplicaSpecs, v1alpha1.XGBoostReplicaTypeMaster, v1alpha1.XGBoostJobDefaultContainerName, v1alpha1.XGBoostJobDefaultContainerPortName) if err != nil { return err } diff --git a/controllers/xgboost/pod_test.go b/controllers/xgboost/pod_test.go index f82dfa27..d1fc42c0 100644 --- a/controllers/xgboost/pod_test.go +++ b/controllers/xgboost/pod_test.go @@ -16,11 +16,12 @@ limitations under the License. package xgboostjob import ( - "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" + "testing" + + "github.com/alibaba/kubedl/apis/training/v1alpha1" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "testing" ) func NewXGBoostJobWithMaster(worker int) *v1alpha1.XGBoostJob { @@ -38,7 +39,7 @@ func NewXGoostJob(worker int) *v1alpha1.XGBoostJob { job := &v1alpha1.XGBoostJob{ TypeMeta: metav1.TypeMeta{ - Kind: v1alpha1.Kind, + Kind: v1alpha1.XGBoostJobKind, }, ObjectMeta: metav1.ObjectMeta{ Name: "test-xgboostjob", @@ -66,13 +67,13 @@ func NewXGBoostReplicaSpecTemplate() corev1.PodTemplateSpec { Spec: corev1.PodSpec{ Containers: []corev1.Container{ corev1.Container{ - Name: v1alpha1.DefaultContainerName, + Name: v1alpha1.XGBoostJobDefaultContainerName, Image: "test-image-for-kubeflow-xgboost-operator:latest", Args: []string{"Fake", "Fake"}, Ports: []corev1.ContainerPort{ corev1.ContainerPort{ - Name: v1alpha1.DefaultContainerPortName, - ContainerPort: v1alpha1.DefaultPort, + Name: v1alpha1.XGBoostJobDefaultContainerPortName, + ContainerPort: v1alpha1.XGBoostJobDefaultPort, }, }, }, diff --git a/controllers/xgboost/service.go b/controllers/xgboost/service.go index f0bd0062..a81f528b 100644 --- a/controllers/xgboost/service.go +++ b/controllers/xgboost/service.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/job_controller" commonutil "github.com/alibaba/kubedl/pkg/util" ) diff --git a/controllers/xgboost/xgboostjob_controller.go b/controllers/xgboost/xgboostjob_controller.go index f52ff442..a4bdf5bc 100644 --- a/controllers/xgboost/xgboostjob_controller.go +++ b/controllers/xgboost/xgboostjob_controller.go @@ -30,7 +30,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "sigs.k8s.io/controller-runtime/pkg/source" - "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" + "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/cmd/options" "github.com/alibaba/kubedl/pkg/gang_schedule/registry" "github.com/alibaba/kubedl/pkg/job_controller" @@ -51,7 +51,7 @@ func NewReconciler(mgr manager.Manager, config job_controller.JobControllerConfi scheme: mgr.GetScheme(), } r.recorder = mgr.GetEventRecorderFor(r.ControllerName()) - r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(v1alpha1.Kind, r.Client)) + r.ctrl = job_controller.NewJobController(r.Client, r, config, r.recorder, metrics.NewJobMetrics(v1alpha1.XGBoostJobKind, r.Client)) if r.ctrl.Config.EnableGangScheduling { r.ctrl.GangScheduler = registry.Get(r.ctrl.Config.GangSchedulerName) } @@ -77,8 +77,9 @@ type XgboostJobReconciler struct { // +kubebuilder:rbac:groups="",resources=pods/status,verbs=get;update;patch // +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups="",resources=services/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=xgboostjob.kubeflow.org,resources=xgboostjobs,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=xgboostjob.kubeflow.org,resources=xgboostjobs/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=events,verbs=create +// +kubebuilder:rbac:groups=training.kubedl.io,resources=xgboostjobs,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=training.kubedl.io,resources=xgboostjobs/status,verbs=get;update;patch func (r *XgboostJobReconciler) Reconcile(req reconcile.Request) (reconcile.Result, error) { // Fetch the XGBoostJob instance @@ -159,7 +160,7 @@ func (r *XgboostJobReconciler) ControllerName() string { } func (r *XgboostJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind { - return v1alpha1.SchemeGroupVersionKind + return v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.XGBoostJobKind) } func (r *XgboostJobReconciler) GetAPIGroupVersion() schema.GroupVersion { @@ -167,19 +168,19 @@ func (r *XgboostJobReconciler) GetAPIGroupVersion() schema.GroupVersion { } func (r *XgboostJobReconciler) GetGroupNameLabelValue() string { - return v1alpha1.GroupName + return v1alpha1.SchemeGroupVersion.Group } func (r *XgboostJobReconciler) GetDefaultContainerName() string { - return v1alpha1.DefaultContainerName + return v1alpha1.XGBoostJobDefaultContainerName } func (r *XgboostJobReconciler) GetDefaultContainerPortNumber() int32 { - return v1alpha1.DefaultPort + return v1alpha1.XGBoostJobDefaultPort } func (r *XgboostJobReconciler) GetDefaultContainerPortName() string { - return v1alpha1.DefaultContainerPortName + return v1alpha1.XGBoostJobDefaultContainerPortName } func (r *XgboostJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, diff --git a/docs/sync_code.md b/docs/sync_code.md index f8f84faf..dc14b6af 100644 --- a/docs/sync_code.md +++ b/docs/sync_code.md @@ -12,7 +12,7 @@ downloaded and saved in the container's `working dir` by default. Please use the rather than the git repo's web url. ```yaml - apiVersion: "kubeflow.org/v1" + apiVersion: training.kubedl.io/v1alpha1 kind: "TFJob" metadata: name: "mnist" diff --git a/docs/tutorial/marsjob.md b/docs/tutorial/marsjob.md index be01c549..d13a4e08 100644 --- a/docs/tutorial/marsjob.md +++ b/docs/tutorial/marsjob.md @@ -59,7 +59,7 @@ kubectl apply -f https://raw.githubusercontent.com/alibaba/kubedl/master/config/ Create a YAML spec that describes the requirements of a MarsJob such as the worker, scheduler, WebService like below ```yaml -apiVersion: kubedl.io/v1alpha1 +apiVersion: training.kubedl.io/v1alpha1 kind: MarsJob metadata: name: mars-test-demo @@ -203,7 +203,7 @@ Mars supports running jobs in different memory usage scenarios. For example, swa users can set above options in `job.spec.memoryTuningPolicy` field: ```yaml -apiVersion: kubedl.io/v1alpha1 +apiVersion: training.kubedl.io/v1alpha1 kind: MarsJob metadata: name: mars-test-demo diff --git a/docs/tutorial/v1/xdl-job.yaml b/docs/tutorial/v1/xdl-job.yaml index ece2121b..3e6bd93c 100644 --- a/docs/tutorial/v1/xdl-job.yaml +++ b/docs/tutorial/v1/xdl-job.yaml @@ -22,7 +22,7 @@ data: } } --- -apiVersion: xdl.kubedl.io/v1alpha1 +apiVersion: training.kubedl.io/v1alpha1 kind: XDLJob metadata: name: xdl-mnist-example diff --git a/example/elasticdl/elasticdl_job_mnist.yaml b/example/elasticdl/elasticdl_job_mnist.yaml index a5b4d1fb..437964e9 100755 --- a/example/elasticdl/elasticdl_job_mnist.yaml +++ b/example/elasticdl/elasticdl_job_mnist.yaml @@ -1,4 +1,4 @@ -apiVersion: "elasticdl.org/v1alpha1" +apiVersion: training.kubedl.io/v1alpha1 kind: "ElasticDLJob" metadata: name: "test-mnist" diff --git a/example/pytorch/pytorch_job_mnist_mpi.yaml b/example/pytorch/pytorch_job_mnist_mpi.yaml index 228b6ad2..1de35a89 100644 --- a/example/pytorch/pytorch_job_mnist_mpi.yaml +++ b/example/pytorch/pytorch_job_mnist_mpi.yaml @@ -1,4 +1,4 @@ -apiVersion: "kubeflow.org/v1" +apiVersion: training.kubedl.io/v1alpha1 kind: "PyTorchJob" metadata: name: "pytorch-dist-sendrecv-example" diff --git a/example/tf/tf_job_mnist.yaml b/example/tf/tf_job_mnist.yaml index 288f20a0..81bd0c5c 100755 --- a/example/tf/tf_job_mnist.yaml +++ b/example/tf/tf_job_mnist.yaml @@ -1,4 +1,4 @@ -apiVersion: "kubeflow.org/v1" +apiVersion: training.kubedl.io/v1alpha1 kind: "TFJob" metadata: name: "mnist" diff --git a/example/xdl/xdl_job_mnist.yaml b/example/xdl/xdl_job_mnist.yaml index 1d97bb84..9c91710a 100644 --- a/example/xdl/xdl_job_mnist.yaml +++ b/example/xdl/xdl_job_mnist.yaml @@ -68,7 +68,7 @@ spec: value: '/data/zk-logs' --- -apiVersion: xdl.kubedl.io/v1alpha1 +apiVersion: training.kubedl.io/v1alpha1 kind: XDLJob metadata: name: xdl-mnist-example diff --git a/example/xgboost/xgboostjob_v1alpha1_iris_train.yaml b/example/xgboost/xgboostjob_v1alpha1_iris_train.yaml index 39020f11..79dcb832 100644 --- a/example/xgboost/xgboostjob_v1alpha1_iris_train.yaml +++ b/example/xgboost/xgboostjob_v1alpha1_iris_train.yaml @@ -1,4 +1,4 @@ -apiVersion: "xgboostjob.kubeflow.org/v1alpha1" +apiVersion: training.kubedl.io/v1alpha1 kind: "XGBoostJob" metadata: name: "xgboost-dist-iris-test-train" diff --git a/go.mod b/go.mod index 6147a578..564ab905 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,6 @@ require ( github.com/frankban/quicktest v1.7.3 // indirect github.com/go-kit/kit v0.9.0 // indirect github.com/go-logfmt/logfmt v0.5.0 // indirect - github.com/go-openapi/spec v0.19.3 github.com/go-sql-driver/mysql v1.4.1 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 // indirect @@ -28,6 +27,7 @@ require ( golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 // indirect golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect + golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5 // indirect google.golang.org/appengine v1.6.5 // indirect google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a // indirect k8s.io/api v0.20.2 @@ -35,12 +35,11 @@ require ( k8s.io/apimachinery v0.20.2 k8s.io/apiserver v0.18.15 k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible + k8s.io/code-generator v0.18.15 k8s.io/klog v1.0.0 - k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 k8s.io/kubernetes v1.18.15 k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 sigs.k8s.io/controller-runtime v0.6.2 - sigs.k8s.io/controller-tools v0.4.1 // indirect ) replace ( diff --git a/go.sum b/go.sum index 9485904e..374322e6 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,6 @@ bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690/go.mod h1:Ulb78X89vxKYgdL24HMTiXYHlyHEvruOj1ZPlqeNEZM= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= @@ -34,11 +32,9 @@ github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcy github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/hcsshim v0.0.0-20190417211021-672e52e9209d/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.0.0/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -67,7 +63,6 @@ github.com/bazelbuild/bazel-gazelle v0.19.1-0.20191105222053-70208cbdc798/go.mod github.com/bazelbuild/buildtools v0.0.0-20190731111112-f720930ceb60/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= github.com/bazelbuild/buildtools v0.0.0-20190917191645-69366ca98f89/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= github.com/bazelbuild/rules_go v0.0.0-20190719190356-6dae44dc5cab/go.mod h1:MC23Dc/wkXEyk3Wpq6lCqz0ZAYOZDw2DR5y3N1q2i7M= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -79,14 +74,12 @@ github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/caddyserver/caddy v1.0.3/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E= -github.com/cenkalti/backoff v1.0.0 h1:2XeuDgvPv/6QDyzIuxb6n36ADVocyqTLlOSpYBGYtvM= github.com/cenkalti/backoff v1.0.0/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/prettybench v0.0.0-20150116022406-03b8cfe5406c/go.mod h1:Xe6ZsFhtM8HrDku0pxJ3/Lr51rwykrzgFwpmTzleatY= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= github.com/checkpoint-restore/go-criu v0.0.0-20181120144056-17b0214f6c48/go.mod h1:TrMrLQfeENAPYPRsJuq3jsqdlRh3lvi6trTZJG8+tho= github.com/checkpoint-restore/go-criu v0.0.0-20190109184317-bdb7599cd87b/go.mod h1:TrMrLQfeENAPYPRsJuq3jsqdlRh3lvi6trTZJG8+tho= @@ -108,10 +101,8 @@ github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20/go.mod h1:Cm3kw github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/coredns/corefile-migration v1.0.2/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r5L0p0jDwIBc6j8NC8E= github.com/coredns/corefile-migration v1.0.6/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r5L0p0jDwIBc6j8NC8E= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.20+incompatible h1:jIrdkuJDHmyh6VZsxQQ3LQGfOrwgJx6sILz/lxzXsGw= github.com/coreos/etcd v3.3.20+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= @@ -119,18 +110,15 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d h1:t5Wuyh53qYyg9eqn4BbnlIT+vmhyww0TatL+zT3uWgI= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea h1:n2Ltr3SrfQlf/9nOna1DoGKxLx3qTSI8Ttl6Xrqp6mw= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/rkt v1.30.0/go.mod h1:O634mlH6U7qk87poQifK6M2rsFNt+FyUTWNMnP1hF1U= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -142,7 +130,6 @@ github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6RO github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= @@ -167,25 +154,21 @@ github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DP github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.6.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.7.3 h1:kV0lw0TH1j1hozahVmcpFCsbV5hcS4ZalH+U7UoeTow= github.com/frankban/quicktest v1.7.3/go.mod h1:V1d2J5pfxYH6EjBAgSK7YNXcXlTWxUHdE1sVDXkjnig= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= @@ -199,7 +182,6 @@ github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= @@ -219,14 +201,12 @@ github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= @@ -241,7 +221,6 @@ github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29g github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCrE= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= @@ -252,7 +231,6 @@ github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6 github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= @@ -277,8 +255,6 @@ github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoM github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/gobuffalo/flect v0.2.0 h1:EWCvMGGxOjsgwlWaP+f4+Hh6yrrte7JeFL2S6b+0hdM= -github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus v0.0.0-20181101234600-2ff6f7ffd60f/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= @@ -305,7 +281,6 @@ github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+ github.com/golang/protobuf v0.0.0-20170920220647-130e6b02ab05/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -334,7 +309,6 @@ github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -342,18 +316,14 @@ github.com/google/cadvisor v0.34.0/go.mod h1:1nql6U13uTHaLYB8rLS5x9IJc2qT6Xd/Tr1 github.com/google/cadvisor v0.35.0/go.mod h1:1nql6U13uTHaLYB8rLS5x9IJc2qT6Xd/Tr1sTX6NE48= github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -375,24 +345,20 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= @@ -401,12 +367,10 @@ github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce/go.mod h1:oZtUIOe8dh github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/heketi/heketi v9.0.1-0.20190917153846-c2e2a4ab7ab9+incompatible/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o= github.com/heketi/tests v0.0.0-20151005000721-f3775cbcefd6/go.mod h1:xGMAM8JLi7UkZt1i4FQeQy0R2T8GLUwQhOP5M1gBhy4= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a/go.mod h1:wK6yTYYcgjHE1Z1QtXACPDjcFJyBskHEdagmnq3vsP8= @@ -420,11 +384,8 @@ github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62Fo= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -443,7 +404,6 @@ github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM52 github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -470,23 +430,16 @@ github.com/magiconair/properties v1.7.6/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-shellwords v1.0.5/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= @@ -532,16 +485,12 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20160627004424-a22cb81b2ecd/go.mod h1:o96d github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= @@ -549,11 +498,8 @@ github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGV github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -565,18 +511,15 @@ github.com/opencontainers/runc v1.0.0-rc2.0.20190611121236-6cc515888830/go.mod h github.com/opencontainers/runtime-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.2.2/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs= github.com/opencontainers/selinux v1.3.1-0.20190929122143-5215b1806f52/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs= -github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.1.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pierrec/lz4 v2.0.2+incompatible h1:6spEXYEkGG74KeVRPzvSU0Fa3xO9DGO0bJcA6uIfwo8= github.com/pierrec/lz4 v2.0.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.4.1+incompatible h1:mFe7ttWaflA46Mhqh+jUfjp2qTbPYxLB2/OyBppH9dg= github.com/pierrec/lz4 v2.4.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/xxHash v0.0.0-20170714082455-a0006b13c722/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -586,31 +529,22 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 h1:PnBWHBf+6L0jOqq0gIVUe6Yk0/QMZ640k6NvkxcBf+8= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a h1:9a8MnZMP0X2nLJdBg+pBmGgkJlSaKC2KaQmTCk1XDtE= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= @@ -621,7 +555,6 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= @@ -630,10 +563,8 @@ github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7/go.mod h1:5b4v6he4 github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= @@ -644,7 +575,6 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9 github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.0/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= @@ -654,20 +584,16 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cobra v0.0.2/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.0.2/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -675,7 +601,6 @@ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoH github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.5-0.20171018052257-2aa2c176b9da/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -685,11 +610,9 @@ github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cb github.com/thecodeteam/goscaleio v0.1.0/go.mod h1:68sdkZAsK8bvEwBlbQnlLS+xU+hvLYM/iQ8KXej1AwM= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/timakin/bodyclose v0.0.0-20190721030226-87058b9bfcec/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ultraware/funlen v0.0.1/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= @@ -710,7 +633,6 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= @@ -720,13 +642,10 @@ go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qL go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -743,7 +662,6 @@ golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -751,7 +669,6 @@ golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 h1:1wopBVtVdWnn03fZelqdXTqk7U7zPQCb+T4rbU9ZEoU= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -775,7 +692,6 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= @@ -808,7 +724,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190502183928-7f726cade0ab/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -843,7 +758,6 @@ golang.org/x/sys v0.0.0-20190122071731-054c452bb702/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -862,7 +776,6 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -870,12 +783,10 @@ golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fq golang.org/x/text v0.0.0-20170915090833-1cbadb444a80/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= @@ -917,11 +828,9 @@ golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200401192744-099440627f01 h1:ysQJ/fU6laLOZJseIeOqXl6Mo+lw5z6b7QHnmUKjW+k= golang.org/x/tools v0.0.0-20200401192744-099440627f01/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5 h1:UaoXseXAWUJUcuJ2E2oczJdLxAJXL0lOmVaBl7kuk+I= golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -929,7 +838,6 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485 h1:OB/uP/Puiu5vS5QMRPrXCDWUPb+kt8f1KW8oQzFejQw= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= gonum.org/v1/gonum v0.6.2/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= @@ -942,7 +850,6 @@ google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEn google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= @@ -953,14 +860,12 @@ google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -976,13 +881,11 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= @@ -1002,12 +905,9 @@ gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bl gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966 h1:B0J02caTR6tpSJozBJyiAzT6CtBzjclw4pgm9gg8Ys0= -gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.1.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/gotestsum v0.3.5/go.mod h1:Mnf3e5FUzXbkCfynWBGOwLssY7gTQgCHObK9tMpAriY= @@ -1032,14 +932,15 @@ k8s.io/client-go v0.18.15 h1:WWjBKpfa2/qUDOsncXSmKRI4NeBvJgAP6SaCANajkao= k8s.io/client-go v0.18.15/go.mod h1:bXuohLq261L1NRWfTA0fjGyTixc01Rf1+yd+ie1ImUY= k8s.io/cloud-provider v0.18.15/go.mod h1:1sXwzIdPRYehpkS4AXfHd9TbOVmjrhOddFrO6qCBZp8= k8s.io/cluster-bootstrap v0.18.15/go.mod h1:yeKoqyrtsPEUKbx+FEoZDoz7hLedbNu826Y5vSlhCZY= +k8s.io/code-generator v0.18.15 h1:QMR5XU9DdJVyEy0SBpSdGcAK7y6lMfV4MsFTpOoashY= k8s.io/code-generator v0.18.15/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/component-base v0.18.15 h1:wSTtDjvZRyjCfa2BtNccVpfMMff4WagXql+PFqe7r/U= k8s.io/component-base v0.18.15/go.mod h1:a01S4J4mn+2UTx+H6iXe9eMnW/OFM+PAvbmd0dJQho0= k8s.io/cri-api v0.18.15/go.mod h1:OJtpjDvfsKoLGhvcc0qfygved0S0dGX56IJzPbqTG1s= k8s.io/csi-translation-lib v0.18.15/go.mod h1:JZgH+77hDH9ldp3L+hCHT5Jqtk3hY6IbUWF3D8zxi4M= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190822140433-26a664648505 h1:ZY6yclUKVbZ+SdWnkfY+Je5vrMpKOxmGeKRbsXVmqYM= k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 h1:RPscN6KhmG54S33L+lr3GS+oD1jmchIU0ll519K6FA4= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1083,15 +984,12 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7 h1:uuHDyjllyzRyCI sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/controller-runtime v0.6.2 h1:jkAnfdTYBpFwlmBn3pS5HFO06SfxvnTZ1p5PeEF/zAA= sigs.k8s.io/controller-runtime v0.6.2/go.mod h1:vhcq/rlnENJ09SIRp3EveTaZ0yqH526hjf9iJdbUJ/E= -sigs.k8s.io/controller-tools v0.4.1 h1:VkuV0MxlRPmRu5iTgBZU4UxUX2LiR99n3sdQGRxZF4w= -sigs.k8s.io/controller-tools v0.4.1/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb792X0kfOBBJUPFEyvVfQWrYT/l8h5EKA6JQ= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/hack/generate_client.sh b/hack/generate_client.sh new file mode 100644 index 00000000..9c629797 --- /dev/null +++ b/hack/generate_client.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +go mod vendor +retVal=$? +if [ $retVal -ne 0 ]; then + exit $retVal +fi + +set -e + +GO111MODULE=off /bin/bash vendor/k8s.io/code-generator/generate-groups.sh all \ +github.com/alibaba/kubedl/client github.com/alibaba/kubedl/apis "training:v1alpha1" -h ./hack/boilerplate.go.txt + +GO111MODULE=off /bin/bash vendor/k8s.io/code-generator/generate-internal-groups.sh defaulter \ +github.com/alibaba/kubedl/client github.com/alibaba/kubedl/apis github.com/alibaba/kubedl/apis "training:v1alpha1" -h ./hack/boilerplate.go.txt + +rm -rf ./vendor \ No newline at end of file diff --git a/apis/addtoscheme_pytorch_v1.go b/hack/tool.go similarity index 73% rename from apis/addtoscheme_pytorch_v1.go rename to hack/tool.go index 2c2924b7..dad34553 100644 --- a/apis/addtoscheme_pytorch_v1.go +++ b/hack/tool.go @@ -1,5 +1,7 @@ +// +build tools + /* -Copyright 2019 The Alibaba Authors. +Copyright 2019 Alibaba Cloud. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,12 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package apis - -import ( - "github.com/alibaba/kubedl/apis/pytorch/v1" -) +// This package imports things required by build scripts, to force `go mod` to see them as dependencies +package hack -func init() { - AddToSchemes = append(AddToSchemes, v1.SchemeBuilder.AddToScheme) -} +import _ "k8s.io/code-generator" diff --git a/hack/update_codegen.sh b/hack/update_codegen.sh new file mode 100644 index 00000000..9da4ec27 --- /dev/null +++ b/hack/update_codegen.sh @@ -0,0 +1,3 @@ +make manifests +make generate +bash ./hack/generate_client.sh \ No newline at end of file diff --git a/helm/kubedl/Chart.yaml b/helm/kubedl/Chart.yaml index 28af7883..dfead230 100644 --- a/helm/kubedl/Chart.yaml +++ b/helm/kubedl/Chart.yaml @@ -14,8 +14,11 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.1.0 +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.3.0 # This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: 0.1.0 +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: 0.3.0 diff --git a/helm/kubedl/crds/training.kubedl.io_elasticdljobs.yaml b/helm/kubedl/crds/training.kubedl.io_elasticdljobs.yaml new file mode 100644 index 00000000..b25bffb6 --- /dev/null +++ b/helm/kubedl/crds/training.kubedl.io_elasticdljobs.yaml @@ -0,0 +1,2826 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + creationTimestamp: null + name: elasticdljobs.training.kubedl.io +spec: + group: training.kubedl.io + names: + kind: ElasticDLJob + listKind: ElasticDLJobList + plural: elasticdljobs + singular: elasticdljob + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[-1:].type + name: State + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .spec.ttlSecondsAfterFinished + name: Finished-TTL + type: integer + - jsonPath: .spec.activeDeadlineSeconds + name: Max-Lifetime + type: integer + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + backoffLimit: + format: int32 + type: integer + cleanPodPolicy: + type: string + elasticdlReplicaSpecs: + additionalProperties: + properties: + replicas: + format: int32 + type: integer + restartPolicy: + type: string + template: + properties: + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostname: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + nodeName: + type: string + nodeSelector: + additionalProperties: + type: string + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + preemptionPolicy: + type: string + priority: + format: int32 + type: integer + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + serviceAccount: + type: string + serviceAccountName: + type: string + shareProcessNamespace: + type: boolean + subdomain: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + maxSkew: + format: int32 + type: integer + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - containers + type: object + type: object + type: object + type: object + schedulingPolicy: + properties: + minAvailable: + format: int32 + type: integer + type: object + ttlSecondsAfterFinished: + format: int32 + type: integer + required: + - elasticdlReplicaSpecs + type: object + status: + properties: + completionTime: + format: date-time + type: string + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + lastReconcileTime: + format: date-time + type: string + replicaStatuses: + additionalProperties: + properties: + active: + format: int32 + type: integer + evicted: + format: int32 + type: integer + failed: + format: int32 + type: integer + succeeded: + format: int32 + type: integer + type: object + type: object + startTime: + format: date-time + type: string + required: + - conditions + - replicaStatuses + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/helm/kubedl/crds/training.kubedl.io_marsjobs.yaml b/helm/kubedl/crds/training.kubedl.io_marsjobs.yaml new file mode 100644 index 00000000..d4b8129b --- /dev/null +++ b/helm/kubedl/crds/training.kubedl.io_marsjobs.yaml @@ -0,0 +1,2852 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + creationTimestamp: null + name: marsjobs.training.kubedl.io +spec: + group: training.kubedl.io + names: + kind: MarsJob + listKind: MarsJobList + plural: marsjobs + singular: marsjob + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[-1:].type + name: State + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .spec.ttlSecondsAfterFinished + name: Finished-TTL + type: integer + - jsonPath: .spec.activeDeadlineSeconds + name: Max-Lifetime + type: integer + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + backoffLimit: + format: int32 + type: integer + cleanPodPolicy: + type: string + marsReplicaSpecs: + additionalProperties: + properties: + replicas: + format: int32 + type: integer + restartPolicy: + type: string + template: + properties: + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostname: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + nodeName: + type: string + nodeSelector: + additionalProperties: + type: string + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + preemptionPolicy: + type: string + priority: + format: int32 + type: integer + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + serviceAccount: + type: string + serviceAccountName: + type: string + shareProcessNamespace: + type: boolean + subdomain: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + maxSkew: + format: int32 + type: integer + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - containers + type: object + type: object + type: object + type: object + schedulingPolicy: + properties: + minAvailable: + format: int32 + type: integer + type: object + ttlSecondsAfterFinished: + format: int32 + type: integer + webHost: + type: string + workerMemoryTuningPolicy: + properties: + lockFreeFileIO: + type: boolean + plasmaStore: + type: string + spillDirs: + items: + type: string + type: array + workerCachePercentage: + format: int32 + type: integer + workerCacheSize: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + required: + - marsReplicaSpecs + type: object + status: + properties: + completionTime: + format: date-time + type: string + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + lastReconcileTime: + format: date-time + type: string + replicaStatuses: + additionalProperties: + properties: + active: + format: int32 + type: integer + evicted: + format: int32 + type: integer + failed: + format: int32 + type: integer + succeeded: + format: int32 + type: integer + type: object + type: object + startTime: + format: date-time + type: string + webServiceAddresses: + items: + type: string + type: array + required: + - conditions + - replicaStatuses + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/helm/kubedl/crds/training.kubedl.io_mpijobs.yaml b/helm/kubedl/crds/training.kubedl.io_mpijobs.yaml new file mode 100644 index 00000000..18e616b9 --- /dev/null +++ b/helm/kubedl/crds/training.kubedl.io_mpijobs.yaml @@ -0,0 +1,5560 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + creationTimestamp: null + name: mpijobs.training.kubedl.io +spec: + group: training.kubedl.io + names: + kind: MPIJob + listKind: MPIJobList + plural: mpijobs + singular: mpijob + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[-1:].type + name: State + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .spec.ttlSecondsAfterFinished + name: Finished-TTL + type: integer + - jsonPath: .spec.activeDeadlineSeconds + name: Max-Lifetime + type: integer + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + backoffLimit: + format: int32 + type: integer + cleanPodPolicy: + type: string + gpus: + format: int32 + type: integer + gpusPerNode: + format: int32 + type: integer + launcherOnMaster: + type: boolean + mainContainer: + type: string + mpiDistribution: + type: string + mpiReplicaSpecs: + additionalProperties: + properties: + replicas: + format: int32 + type: integer + restartPolicy: + type: string + template: + properties: + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostname: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + nodeName: + type: string + nodeSelector: + additionalProperties: + type: string + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + preemptionPolicy: + type: string + priority: + format: int32 + type: integer + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + serviceAccount: + type: string + serviceAccountName: + type: string + shareProcessNamespace: + type: boolean + subdomain: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + maxSkew: + format: int32 + type: integer + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - containers + type: object + type: object + type: object + type: object + processingResourceType: + type: string + processingUnits: + format: int32 + type: integer + processingUnitsPerNode: + format: int32 + type: integer + replicas: + format: int32 + type: integer + runPolicy: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + backoffLimit: + format: int32 + type: integer + cleanPodPolicy: + type: string + schedulingPolicy: + properties: + minAvailable: + format: int32 + type: integer + type: object + ttlSecondsAfterFinished: + format: int32 + type: integer + type: object + schedulingPolicy: + properties: + minAvailable: + format: int32 + type: integer + type: object + slotsPerWorker: + format: int32 + type: integer + template: + properties: + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostname: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + nodeName: + type: string + nodeSelector: + additionalProperties: + type: string + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + preemptionPolicy: + type: string + priority: + format: int32 + type: integer + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + serviceAccount: + type: string + serviceAccountName: + type: string + shareProcessNamespace: + type: boolean + subdomain: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + maxSkew: + format: int32 + type: integer + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - containers + type: object + type: object + ttlSecondsAfterFinished: + format: int32 + type: integer + required: + - mpiReplicaSpecs + type: object + status: + properties: + completionTime: + format: date-time + type: string + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + lastReconcileTime: + format: date-time + type: string + replicaStatuses: + additionalProperties: + properties: + active: + format: int32 + type: integer + evicted: + format: int32 + type: integer + failed: + format: int32 + type: integer + succeeded: + format: int32 + type: integer + type: object + type: object + startTime: + format: date-time + type: string + required: + - conditions + - replicaStatuses + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/helm/kubedl/crds/training.kubedl.io_pytorchjobs.yaml b/helm/kubedl/crds/training.kubedl.io_pytorchjobs.yaml new file mode 100644 index 00000000..2eeaf332 --- /dev/null +++ b/helm/kubedl/crds/training.kubedl.io_pytorchjobs.yaml @@ -0,0 +1,2826 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + creationTimestamp: null + name: pytorchjobs.training.kubedl.io +spec: + group: training.kubedl.io + names: + kind: PyTorchJob + listKind: PyTorchJobList + plural: pytorchjobs + singular: pytorchjob + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[-1:].type + name: State + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .spec.ttlSecondsAfterFinished + name: Finished-TTL + type: integer + - jsonPath: .spec.activeDeadlineSeconds + name: Max-Lifetime + type: integer + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + backoffLimit: + format: int32 + type: integer + cleanPodPolicy: + type: string + pytorchReplicaSpecs: + additionalProperties: + properties: + replicas: + format: int32 + type: integer + restartPolicy: + type: string + template: + properties: + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostname: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + nodeName: + type: string + nodeSelector: + additionalProperties: + type: string + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + preemptionPolicy: + type: string + priority: + format: int32 + type: integer + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + serviceAccount: + type: string + serviceAccountName: + type: string + shareProcessNamespace: + type: boolean + subdomain: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + maxSkew: + format: int32 + type: integer + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - containers + type: object + type: object + type: object + type: object + schedulingPolicy: + properties: + minAvailable: + format: int32 + type: integer + type: object + ttlSecondsAfterFinished: + format: int32 + type: integer + required: + - pytorchReplicaSpecs + type: object + status: + properties: + completionTime: + format: date-time + type: string + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + lastReconcileTime: + format: date-time + type: string + replicaStatuses: + additionalProperties: + properties: + active: + format: int32 + type: integer + evicted: + format: int32 + type: integer + failed: + format: int32 + type: integer + succeeded: + format: int32 + type: integer + type: object + type: object + startTime: + format: date-time + type: string + required: + - conditions + - replicaStatuses + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/helm/kubedl/crds/training.kubedl.io_tfjobs.yaml b/helm/kubedl/crds/training.kubedl.io_tfjobs.yaml new file mode 100644 index 00000000..0176a6a3 --- /dev/null +++ b/helm/kubedl/crds/training.kubedl.io_tfjobs.yaml @@ -0,0 +1,2828 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + creationTimestamp: null + name: tfjobs.training.kubedl.io +spec: + group: training.kubedl.io + names: + kind: TFJob + listKind: TFJobList + plural: tfjobs + singular: tfjob + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[-1:].type + name: State + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .spec.ttlSecondsAfterFinished + name: Finished-TTL + type: integer + - jsonPath: .spec.activeDeadlineSeconds + name: Max-Lifetime + type: integer + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + backoffLimit: + format: int32 + type: integer + cleanPodPolicy: + type: string + schedulingPolicy: + properties: + minAvailable: + format: int32 + type: integer + type: object + successPolicy: + type: string + tfReplicaSpecs: + additionalProperties: + properties: + replicas: + format: int32 + type: integer + restartPolicy: + type: string + template: + properties: + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostname: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + nodeName: + type: string + nodeSelector: + additionalProperties: + type: string + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + preemptionPolicy: + type: string + priority: + format: int32 + type: integer + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + serviceAccount: + type: string + serviceAccountName: + type: string + shareProcessNamespace: + type: boolean + subdomain: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + maxSkew: + format: int32 + type: integer + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - containers + type: object + type: object + type: object + type: object + ttlSecondsAfterFinished: + format: int32 + type: integer + required: + - tfReplicaSpecs + type: object + status: + properties: + completionTime: + format: date-time + type: string + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + lastReconcileTime: + format: date-time + type: string + replicaStatuses: + additionalProperties: + properties: + active: + format: int32 + type: integer + evicted: + format: int32 + type: integer + failed: + format: int32 + type: integer + succeeded: + format: int32 + type: integer + type: object + type: object + startTime: + format: date-time + type: string + required: + - conditions + - replicaStatuses + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/helm/kubedl/crds/training.kubedl.io_xdljobs.yaml b/helm/kubedl/crds/training.kubedl.io_xdljobs.yaml new file mode 100644 index 00000000..4c04e499 --- /dev/null +++ b/helm/kubedl/crds/training.kubedl.io_xdljobs.yaml @@ -0,0 +1,2832 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + creationTimestamp: null + name: xdljobs.training.kubedl.io +spec: + group: training.kubedl.io + names: + kind: XDLJob + listKind: XDLJobList + plural: xdljobs + singular: xdljob + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[-1:].type + name: State + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .spec.ttlSecondsAfterFinished + name: Finished-TTL + type: integer + - jsonPath: .spec.activeDeadlineSeconds + name: Max-Lifetime + type: integer + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + backoffLimit: + format: int32 + type: integer + cleanPodPolicy: + type: string + minFinishWorkNum: + format: int32 + type: integer + minFinishWorkRate: + format: int32 + type: integer + schedulingPolicy: + properties: + minAvailable: + format: int32 + type: integer + type: object + ttlSecondsAfterFinished: + format: int32 + type: integer + xdlReplicaSpecs: + additionalProperties: + properties: + replicas: + format: int32 + type: integer + restartPolicy: + type: string + template: + properties: + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostname: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + nodeName: + type: string + nodeSelector: + additionalProperties: + type: string + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + preemptionPolicy: + type: string + priority: + format: int32 + type: integer + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + serviceAccount: + type: string + serviceAccountName: + type: string + shareProcessNamespace: + type: boolean + subdomain: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + maxSkew: + format: int32 + type: integer + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - containers + type: object + type: object + type: object + type: object + required: + - xdlReplicaSpecs + type: object + status: + properties: + completionTime: + format: date-time + type: string + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + lastReconcileTime: + format: date-time + type: string + replicaStatuses: + additionalProperties: + properties: + active: + format: int32 + type: integer + evicted: + format: int32 + type: integer + failed: + format: int32 + type: integer + succeeded: + format: int32 + type: integer + type: object + type: object + startTime: + format: date-time + type: string + required: + - conditions + - replicaStatuses + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/helm/kubedl/crds/training.kubedl.io_xgboostjobs.yaml b/helm/kubedl/crds/training.kubedl.io_xgboostjobs.yaml new file mode 100644 index 00000000..6860f2e5 --- /dev/null +++ b/helm/kubedl/crds/training.kubedl.io_xgboostjobs.yaml @@ -0,0 +1,2826 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + creationTimestamp: null + name: xgboostjobs.training.kubedl.io +spec: + group: training.kubedl.io + names: + kind: XGBoostJob + listKind: XGBoostJobList + plural: xgboostjobs + singular: xgboostjob + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[-1:].type + name: State + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .spec.ttlSecondsAfterFinished + name: Finished-TTL + type: integer + - jsonPath: .spec.activeDeadlineSeconds + name: Max-Lifetime + type: integer + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + backoffLimit: + format: int32 + type: integer + cleanPodPolicy: + type: string + schedulingPolicy: + properties: + minAvailable: + format: int32 + type: integer + type: object + ttlSecondsAfterFinished: + format: int32 + type: integer + xgbReplicaSpecs: + additionalProperties: + properties: + replicas: + format: int32 + type: integer + restartPolicy: + type: string + template: + properties: + metadata: + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostname: + type: string + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + nodeName: + type: string + nodeSelector: + additionalProperties: + type: string + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + preemptionPolicy: + type: string + priority: + format: int32 + type: integer + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + serviceAccount: + type: string + serviceAccountName: + type: string + shareProcessNamespace: + type: boolean + subdomain: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + maxSkew: + format: int32 + type: integer + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - containers + type: object + type: object + type: object + type: object + required: + - xgbReplicaSpecs + type: object + status: + properties: + completionTime: + format: date-time + type: string + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + lastReconcileTime: + format: date-time + type: string + replicaStatuses: + additionalProperties: + properties: + active: + format: int32 + type: integer + evicted: + format: int32 + type: integer + failed: + format: int32 + type: integer + succeeded: + format: int32 + type: integer + type: object + type: object + startTime: + format: date-time + type: string + required: + - conditions + - replicaStatuses + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/helm/kubedl/templates/NOTES.txt b/helm/kubedl/templates/NOTES.txt index c32a7790..ac5be682 100644 --- a/helm/kubedl/templates/NOTES.txt +++ b/helm/kubedl/templates/NOTES.txt @@ -1,8 +1,22 @@ -Thank you for installing {{ .Chart.Name }}. - -Your release is named {{ .Release.Name }}. - -To learn more about the release, try: - - $ helm status {{ .Release.Name }} - $ helm get all {{ .Release.Name }} \ No newline at end of file +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "kubedl.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "kubedl.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "kubedl.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "kubedl.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/helm/kubedl/templates/_helpers.tpl b/helm/kubedl/templates/_helpers.tpl index 8d5d7261..18a757b1 100644 --- a/helm/kubedl/templates/_helpers.tpl +++ b/helm/kubedl/templates/_helpers.tpl @@ -1,10 +1,9 @@ -{{/* vim: set filetype=mustache: */}} {{/* Expand the name of the chart. */}} {{- define "kubedl.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} {{/* Create a default fully qualified app name. @@ -12,24 +11,24 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this If release name contains chart name it will be used as a full name. */}} {{- define "kubedl.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} {{/* Create chart name and version as used by the chart label. */}} {{- define "kubedl.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} {{/* Common labels @@ -41,7 +40,7 @@ helm.sh/chart: {{ include "kubedl.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} +{{- end }} {{/* Selector labels @@ -49,15 +48,15 @@ Selector labels {{- define "kubedl.selectorLabels" -}} app.kubernetes.io/name: {{ include "kubedl.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} +{{- end }} {{/* Create the name of the service account to use */}} {{- define "kubedl.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "kubedl.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "kubedl.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/helm/kubedl/templates/bases/kubeflow.org_pytorchjobs.yaml b/helm/kubedl/templates/bases/kubeflow.org_pytorchjobs.yaml deleted file mode 100644 index 2f88548b..00000000 --- a/helm/kubedl/templates/bases/kubeflow.org_pytorchjobs.yaml +++ /dev/null @@ -1,164 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.2.2 - creationTimestamp: null - name: pytorchjobs.kubeflow.org -spec: - additionalPrinterColumns: - - JSONPath: .status.conditions[-1:].type - name: State - type: string - - JSONPath: .metadata.creationTimestamp - name: Age - type: date - - JSONPath: .spec.ttlSecondsAfterFinished - name: Finished-TTL - type: integer - - JSONPath: .spec.activeDeadlineSeconds - name: Max-Lifetime - type: integer - group: kubeflow.org - names: - kind: PyTorchJob - listKind: PyTorchJobList - plural: pytorchjobs - singular: pytorchjob - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - description: Represents a PyTorchJob resource. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' - type: string - metadata: - description: Standard Kubernetes object's metadata. - type: object - spec: - description: Specification of the desired state of the PyTorchJob. - properties: - activeDeadlineSeconds: - description: Specifies the duration in seconds relative to the startTime - that the job may be active before the system tries to terminate it; - value must be positive integer. - format: int64 - type: integer - backoffLimit: - description: Optional number of retries before marking this job failed. - format: int32 - type: integer - cleanPodPolicy: - description: CleanPodPolicy defines the policy to kill pods after the - job completes. Default to Running. - type: string - pytorchReplicaSpecs: - description: 'A map of PyTorchReplicaType (type) to ReplicaSpec (value). - Specifies the PyTorch cluster configuration. For example, { "Master": - PyTorchReplicaSpec, "Worker": PyTorchReplicaSpec, }' - type: object - schedulingPolicy: - description: SchedulingPolicy defines the policy related to scheduling, - e.g. gang-scheduling - properties: - minAvailable: - format: int32 - type: integer - type: object - ttlSecondsAfterFinished: - description: TTLSecondsAfterFinished is the TTL to clean up jobs. It - may take extra ReconcilePeriod seconds for the cleanup, since reconcile - gets called periodically. Default to infinite. - format: int32 - type: integer - required: - - pytorchReplicaSpecs - type: object - status: - description: Most recently observed status of the PyTorchJob. Read-only - (modified by the system). - properties: - completionTime: - description: Represents time when the job was completed. It is not guaranteed - to be set in happens-before order across separate operations. It is - represented in RFC3339 form and is in UTC. - format: date-time - type: string - conditions: - description: Conditions is an array of current observed job conditions. - items: - description: JobCondition describes the state of the job at a certain - point. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. - format: date-time - type: string - lastUpdateTime: - description: The last time this condition was updated. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. - type: string - reason: - description: The reason for the condition's last transition. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of job condition. - type: string - required: - - status - - type - type: object - type: array - lastReconcileTime: - description: Represents last time when the job was reconciled. It is - not guaranteed to be set in happens-before order across separate operations. - It is represented in RFC3339 form and is in UTC. - format: date-time - type: string - replicaStatuses: - description: ReplicaStatuses is map of ReplicaType and ReplicaStatus, - specifies the status of each replica. - type: object - startTime: - description: Represents time when the job was acknowledged by the job - controller. It is not guaranteed to be set in happens-before order - across separate operations. It is represented in RFC3339 form and - is in UTC. - format: date-time - type: string - required: - - conditions - - replicaStatuses - type: object - type: object - version: v1 - versions: - - name: v1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/helm/kubedl/templates/bases/kubeflow.org_tfjobs.yaml b/helm/kubedl/templates/bases/kubeflow.org_tfjobs.yaml deleted file mode 100644 index 17953dce..00000000 --- a/helm/kubedl/templates/bases/kubeflow.org_tfjobs.yaml +++ /dev/null @@ -1,164 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.2.2 - creationTimestamp: null - name: tfjobs.kubeflow.org -spec: - additionalPrinterColumns: - - JSONPath: .status.conditions[-1:].type - name: State - type: string - - JSONPath: .metadata.creationTimestamp - name: Age - type: date - - JSONPath: .spec.ttlSecondsAfterFinished - name: Finished-TTL - type: integer - - JSONPath: .spec.activeDeadlineSeconds - name: Max-Lifetime - type: integer - group: kubeflow.org - names: - kind: TFJob - listKind: TFJobList - plural: tfjobs - singular: tfjob - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - description: TFJob represents a TFJob resource. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' - type: string - metadata: - description: Standard Kubernetes object's metadata. - type: object - spec: - description: Specification of the desired state of the TFJob. - properties: - activeDeadlineSeconds: - description: Specifies the duration in seconds relative to the startTime - that the job may be active before the system tries to terminate it; - value must be positive integer. - format: int64 - type: integer - backoffLimit: - description: Optional number of retries before marking this job failed. - format: int32 - type: integer - cleanPodPolicy: - description: CleanPodPolicy defines the policy to kill pods after the - job completes. Default to Running. - type: string - schedulingPolicy: - description: SchedulingPolicy defines the policy related to scheduling, - e.g. gang-scheduling - properties: - minAvailable: - format: int32 - type: integer - type: object - tfReplicaSpecs: - description: 'A map of TFReplicaType (type) to ReplicaSpec (value). - Specifies the TF cluster configuration. For example, { "PS": - ReplicaSpec, "Worker": ReplicaSpec, }' - type: object - ttlSecondsAfterFinished: - description: TTLSecondsAfterFinished is the TTL to clean up jobs. It - may take extra ReconcilePeriod seconds for the cleanup, since reconcile - gets called periodically. Default to infinite. - format: int32 - type: integer - required: - - tfReplicaSpecs - type: object - status: - description: Most recently observed status of the TFJob. Read-only (modified - by the system). - properties: - completionTime: - description: Represents time when the job was completed. It is not guaranteed - to be set in happens-before order across separate operations. It is - represented in RFC3339 form and is in UTC. - format: date-time - type: string - conditions: - description: Conditions is an array of current observed job conditions. - items: - description: JobCondition describes the state of the job at a certain - point. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. - format: date-time - type: string - lastUpdateTime: - description: The last time this condition was updated. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. - type: string - reason: - description: The reason for the condition's last transition. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of job condition. - type: string - required: - - status - - type - type: object - type: array - lastReconcileTime: - description: Represents last time when the job was reconciled. It is - not guaranteed to be set in happens-before order across separate operations. - It is represented in RFC3339 form and is in UTC. - format: date-time - type: string - replicaStatuses: - description: ReplicaStatuses is map of ReplicaType and ReplicaStatus, - specifies the status of each replica. - type: object - startTime: - description: Represents time when the job was acknowledged by the job - controller. It is not guaranteed to be set in happens-before order - across separate operations. It is represented in RFC3339 form and - is in UTC. - format: date-time - type: string - required: - - conditions - - replicaStatuses - type: object - type: object - version: v1 - versions: - - name: v1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/helm/kubedl/templates/bases/xdl.kubedl.io_xdljobs.yaml b/helm/kubedl/templates/bases/xdl.kubedl.io_xdljobs.yaml deleted file mode 100644 index 2857a1a0..00000000 --- a/helm/kubedl/templates/bases/xdl.kubedl.io_xdljobs.yaml +++ /dev/null @@ -1,176 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.2.2 - creationTimestamp: null - name: xdljobs.xdl.kubedl.io -spec: - additionalPrinterColumns: - - JSONPath: .status.conditions[-1:].type - name: State - type: string - - JSONPath: .metadata.creationTimestamp - name: Age - type: date - - JSONPath: .spec.ttlSecondsAfterFinished - name: Finished-TTL - type: integer - - JSONPath: .spec.activeDeadlineSeconds - name: Max-Lifetime - type: integer - group: xdl.kubedl.io - names: - kind: XDLJob - listKind: XDLJobList - plural: xdljobs - singular: xdljob - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - description: XDLJob is the Schema for the xdljobs API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: XDLJobSpec defines the desired state of XDLJob - properties: - activeDeadlineSeconds: - description: Specifies the duration in seconds relative to the startTime - that the job may be active before the system tries to terminate it; - value must be positive integer. - format: int64 - type: integer - backoffLimit: - description: Optional number of retries before marking this job failed. - format: int32 - type: integer - cleanPodPolicy: - description: CleanPodPolicy defines the policy to kill pods after the - job completes. Default to Running. - type: string - minFinishWorkNum: - description: MinFinishWorkerNum specifies the minimum number of successfully - finished workers such that the job is treated as successful. Not specifying - this value means all worker should be successfully finished. - format: int32 - type: integer - minFinishWorkRate: - description: MinFinishWorkPercentage specifies the minimum percentage - of all workers that should be finished successfully such that the - job is treated as successful. MinFinishWorkPercentage takes precedence - over MinFinishWorkerNum if both are specified. - format: int32 - type: integer - schedulingPolicy: - description: SchedulingPolicy defines the policy related to scheduling, - e.g. gang-scheduling - properties: - minAvailable: - format: int32 - type: integer - type: object - ttlSecondsAfterFinished: - description: TTLSecondsAfterFinished is the TTL to clean up jobs. It - may take extra ReconcilePeriod seconds for the cleanup, since reconcile - gets called periodically. Default to infinite. - format: int32 - type: integer - xdlReplicaSpecs: - description: 'XDLReplicaSpecs is map of ReplicaType and ReplicaSpec - specifies the XDL replicas to run. For example, { "PS": ReplicaSpec, "Worker": - ReplicaSpec, }' - type: object - required: - - xdlReplicaSpecs - type: object - status: - description: JobStatus represents the current observed state of the training - Job. - properties: - completionTime: - description: Represents time when the job was completed. It is not guaranteed - to be set in happens-before order across separate operations. It is - represented in RFC3339 form and is in UTC. - format: date-time - type: string - conditions: - description: Conditions is an array of current observed job conditions. - items: - description: JobCondition describes the state of the job at a certain - point. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. - format: date-time - type: string - lastUpdateTime: - description: The last time this condition was updated. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. - type: string - reason: - description: The reason for the condition's last transition. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of job condition. - type: string - required: - - status - - type - type: object - type: array - lastReconcileTime: - description: Represents last time when the job was reconciled. It is - not guaranteed to be set in happens-before order across separate operations. - It is represented in RFC3339 form and is in UTC. - format: date-time - type: string - replicaStatuses: - description: ReplicaStatuses is map of ReplicaType and ReplicaStatus, - specifies the status of each replica. - type: object - startTime: - description: Represents time when the job was acknowledged by the job - controller. It is not guaranteed to be set in happens-before order - across separate operations. It is represented in RFC3339 form and - is in UTC. - format: date-time - type: string - required: - - conditions - - replicaStatuses - type: object - type: object - version: v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/helm/kubedl/templates/bases/xgboostjob.kubeflow.org_xgboostjobs.yaml b/helm/kubedl/templates/bases/xgboostjob.kubeflow.org_xgboostjobs.yaml deleted file mode 100644 index dc442e96..00000000 --- a/helm/kubedl/templates/bases/xgboostjob.kubeflow.org_xgboostjobs.yaml +++ /dev/null @@ -1,162 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.2.2 - creationTimestamp: null - name: xgboostjobs.xgboostjob.kubeflow.org -spec: - additionalPrinterColumns: - - JSONPath: .status.conditions[-1:].type - name: State - type: string - - JSONPath: .metadata.creationTimestamp - name: Age - type: date - - JSONPath: .spec.ttlSecondsAfterFinished - name: Finished-TTL - type: integer - - JSONPath: .spec.activeDeadlineSeconds - name: Max-Lifetime - type: integer - group: xgboostjob.kubeflow.org - names: - kind: XGBoostJob - listKind: XGBoostJobList - plural: xgboostjobs - singular: xgboostjob - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - description: XGBoostJob is the Schema for the xgboostjobs API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: XGBoostJobSpec defines the desired state of XGBoostJob - properties: - activeDeadlineSeconds: - description: Specifies the duration in seconds relative to the startTime - that the job may be active before the system tries to terminate it; - value must be positive integer. - format: int64 - type: integer - backoffLimit: - description: Optional number of retries before marking this job failed. - format: int32 - type: integer - cleanPodPolicy: - description: CleanPodPolicy defines the policy to kill pods after the - job completes. Default to Running. - type: string - schedulingPolicy: - description: SchedulingPolicy defines the policy related to scheduling, - e.g. gang-scheduling - properties: - minAvailable: - format: int32 - type: integer - type: object - ttlSecondsAfterFinished: - description: TTLSecondsAfterFinished is the TTL to clean up jobs. It - may take extra ReconcilePeriod seconds for the cleanup, since reconcile - gets called periodically. Default to infinite. - format: int32 - type: integer - xgbReplicaSpecs: - description: 'XGBoostReplicaSpecs is map of ReplicaType and ReplicaSpec - specifies the XGBoost replicas to run. For example, { "PS": - ReplicaSpec, "Worker": ReplicaSpec, }' - type: object - required: - - xgbReplicaSpecs - type: object - status: - description: XGBoostJobStatus defines the observed state of XGBoostJob - properties: - completionTime: - description: Represents time when the job was completed. It is not guaranteed - to be set in happens-before order across separate operations. It is - represented in RFC3339 form and is in UTC. - format: date-time - type: string - conditions: - description: Conditions is an array of current observed job conditions. - items: - description: JobCondition describes the state of the job at a certain - point. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. - format: date-time - type: string - lastUpdateTime: - description: The last time this condition was updated. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. - type: string - reason: - description: The reason for the condition's last transition. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of job condition. - type: string - required: - - status - - type - type: object - type: array - lastReconcileTime: - description: Represents last time when the job was reconciled. It is - not guaranteed to be set in happens-before order across separate operations. - It is represented in RFC3339 form and is in UTC. - format: date-time - type: string - replicaStatuses: - description: ReplicaStatuses is map of ReplicaType and ReplicaStatus, - specifies the status of each replica. - type: object - startTime: - description: Represents time when the job was acknowledged by the job - controller. It is not guaranteed to be set in happens-before order - across separate operations. It is represented in RFC3339 form and - is in UTC. - format: date-time - type: string - required: - - conditions - - replicaStatuses - type: object - type: object - version: v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/helm/kubedl/templates/deployment.yaml b/helm/kubedl/templates/deployment.yaml index cbf4f228..bb4b80ef 100644 --- a/helm/kubedl/templates/deployment.yaml +++ b/helm/kubedl/templates/deployment.yaml @@ -2,48 +2,60 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "kubedl.fullname" . }} - namespace: {{ .Values.kubedlSysNamespace }} labels: {{- include "kubedl.labels" . | nindent 4 }} spec: + {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} + {{- end }} selector: matchLabels: {{- include "kubedl.selectorLabels" . | nindent 6 }} - strategy: - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - type: RollingUpdate template: metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} labels: {{- include "kubedl.selectorLabels" . | nindent 8 }} spec: - {{- with .Values.imagePullSecrets }} + {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} serviceAccountName: {{ include "kubedl.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} - image: {{ .Values.kubedlImage.repository }}:{{ .Values.kubedlImage.tag }} - imagePullPolicy: {{ .Values.kubedlImage.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - - containerPort: 8080 - name: metrics + - name: http + containerPort: 8443 protocol: TCP + livenessProbe: + httpGet: + path: /metrics + port: http + readinessProbe: + httpGet: + path: /metrics + port: http resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} + {{- end }} + {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} diff --git a/helm/kubedl/templates/hpa.yaml b/helm/kubedl/templates/hpa.yaml new file mode 100644 index 00000000..688ebccb --- /dev/null +++ b/helm/kubedl/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "kubedl.fullname" . }} + labels: + {{- include "kubedl.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "kubedl.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/helm/kubedl/templates/ingress.yaml b/helm/kubedl/templates/ingress.yaml new file mode 100644 index 00000000..caf24a49 --- /dev/null +++ b/helm/kubedl/templates/ingress.yaml @@ -0,0 +1,41 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "kubedl.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "kubedl.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + backend: + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} diff --git a/helm/kubedl/templates/namespace.yaml b/helm/kubedl/templates/namespace.yaml deleted file mode 100644 index 9c7cad36..00000000 --- a/helm/kubedl/templates/namespace.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: kubedl ---- -apiVersion: v1 -kind: Namespace -metadata: - name: kubedl-system \ No newline at end of file diff --git a/helm/kubedl/templates/rbac.yaml b/helm/kubedl/templates/rbac.yaml index d6245a7d..edaeba6c 100644 --- a/helm/kubedl/templates/rbac.yaml +++ b/helm/kubedl/templates/rbac.yaml @@ -1,281 +1,236 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null - name: kubedl-manager-role + name: {{ include "kubedl.fullname" . }}-role rules: - apiGroups: - - kubeflow.org + - "" resources: - - tfjobs + - configmaps verbs: - - get - - list - - watch - create - - update - - patch - delete -- apiGroups: - - kubeflow.org - resources: - - tfjobs/status - verbs: - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - - kubeflow.org + - "" resources: - - pytorchjobs + - configmaps/status verbs: - get - - list - - watch - - create - - update - patch - - delete + - update - apiGroups: - - kubeflow.org + - "" resources: - - pytorchjobs/status + - events verbs: - - get - - list - - watch - create - - update - - patch - - delete - apiGroups: - - xdl.kubedl.io + - "" resources: - - xdljobs + - pods verbs: + - create + - delete - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - - xdl.kubedl.io + - "" resources: - - xdljobs/status + - pods/status verbs: - get - - list - - watch - - create - - update - patch - - delete + - update - apiGroups: - - xgboostjob.kubeflow.org + - "" resources: - - xgboostjobs + - services verbs: + - create + - delete - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - - xgboostjob.kubeflow.org + - "" resources: - - xgboostjobs/status + - services/status verbs: - get - - list - - watch - - create - - update - patch - - delete + - update - apiGroups: - - "" + - networking.k8s.io resources: - - pods + - ingresses verbs: + - create + - delete - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - - "" + - training.kubedl.io resources: - - nodes + - elasticdljobs verbs: + - create + - delete - get - list + - patch + - update - watch - apiGroups: - - "" + - training.kubedl.io resources: - - pods/status + - elasticdljobs/status verbs: - get - - update - patch + - update - apiGroups: - - "" + - training.kubedl.io resources: - - configmaps + - marsjobs verbs: + - create + - delete - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - - "" + - training.kubedl.io resources: - - pods + - marsjobs/status verbs: - get - - list - - watch - - create - - update - patch - - delete + - update - apiGroups: - - "" + - training.kubedl.io resources: - - pods/status + - mpijobs verbs: + - create + - delete - get - - update + - list - patch + - update + - watch - apiGroups: - - "" + - training.kubedl.io resources: - - events + - mpijobs/status verbs: - get - - list - - watch - - create - - update - patch - - delete + - update - apiGroups: - - "" + - training.kubedl.io resources: - - persistentvolumeclaims + - pytorchjobs verbs: + - create + - delete - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - - apps + - training.kubedl.io resources: - - controllerrevisions + - pytorchjobs/status verbs: - get - - list - - watch - - create - - update - patch - - delete + - update - apiGroups: - - apps.kruise.io + - training.kubedl.io resources: - - statefulsets + - tfjobs verbs: + - create + - delete - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - - apps + - training.kubedl.io resources: - - statefulsets + - tfjobs/status verbs: - - get - - list - - watch - - create - - update - - patch - - delete + - get + - patch + - update - apiGroups: - - apps + - training.kubedl.io resources: - - statefulsets/status + - xdljobs verbs: - - get - - update - - patch + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - - admissionregistration.k8s.io + - training.kubedl.io resources: - - mutatingwebhookconfigurations - - validatingwebhookconfigurations + - xdljobs/status verbs: - get - - list - - watch - - create - - update - patch - - delete + - update - apiGroups: - - "" + - training.kubedl.io resources: - - secrets + - xgboostjobs verbs: + - create + - delete - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - - "" + - training.kubedl.io resources: - - services + - xgboostjobs/status verbs: - get - - list - - watch - - create - - update - patch - - delete + - update --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - creationTimestamp: null - name: kubedl-manager-rolebinding + name: {{ include "kubedl.fullname" . }}-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: kubedl-manager-role + name: {{ include "kubedl.fullname" . }}-role subjects: - kind: ServiceAccount name: {{ include "kubedl.serviceAccountName" . }} - namespace: {{ .Values.kubedlSysNamespace }} \ No newline at end of file + namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/helm/kubedl/templates/serviceaccount.yaml b/helm/kubedl/templates/serviceaccount.yaml index d41a358a..9d378c7b 100644 --- a/helm/kubedl/templates/serviceaccount.yaml +++ b/helm/kubedl/templates/serviceaccount.yaml @@ -3,11 +3,10 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "kubedl.serviceAccountName" . }} - namespace: {{ .Values.kubedlSysNamespace }} labels: {{- include "kubedl.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} -{{- end -}} +{{- end }} diff --git a/helm/kubedl/templates/tests/test-connection.yaml b/helm/kubedl/templates/tests/test-connection.yaml index 1fe4d945..02451eba 100644 --- a/helm/kubedl/templates/tests/test-connection.yaml +++ b/helm/kubedl/templates/tests/test-connection.yaml @@ -5,7 +5,7 @@ metadata: labels: {{- include "kubedl.labels" . | nindent 4 }} annotations: - "helm.sh/hook": test-success + "helm.sh/hook": test spec: containers: - name: wget diff --git a/helm/kubedl/values.yaml b/helm/kubedl/values.yaml index defc516a..232e6f96 100644 --- a/helm/kubedl/values.yaml +++ b/helm/kubedl/values.yaml @@ -1,15 +1,14 @@ -# Default values for kubedl-1. +# Default values for kubedl. # This is a YAML-formatted file. # Declare variables to be passed into your templates. replicaCount: 2 -kubedlSysNamespace: kubedl-system - -kubedlImage: +image: repository: kubedl/kubedl + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. tag: v0.2.0 - pullPolicy: Always imagePullSecrets: [] nameOverride: "" @@ -22,14 +21,41 @@ serviceAccount: annotations: {} # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template - name: + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 service: type: ClusterIP port: 80 -podSecurityContext: {} - # fsGroup: 2000 +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + backend: + serviceName: chart-example.local + servicePort: 80 + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local resources: limits: @@ -49,6 +75,13 @@ resources: # cpu: 100m # memory: 128Mi +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + nodeSelector: {} tolerations: [] diff --git a/pkg/job_controller/hostnetwork_test.go b/pkg/job_controller/hostnetwork_test.go index a0f3a744..1ea21e4d 100644 --- a/pkg/job_controller/hostnetwork_test.go +++ b/pkg/job_controller/hostnetwork_test.go @@ -17,10 +17,11 @@ limitations under the License. package job_controller import ( - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" - v1 "k8s.io/api/core/v1" "reflect" "testing" + + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + v1 "k8s.io/api/core/v1" ) func TestAppendOrOverrideContainerPort(t *testing.T) { @@ -36,18 +37,18 @@ func TestAppendOrOverrideContainerPort(t *testing.T) { name: "single container with default names", spec: newPodTemplateSpec([]simpleContainerPort{ { - containerName: tfv1.DefaultContainerName, - portName: tfv1.DefaultPortName, - port: tfv1.DefaultPort, + containerName: trainingv1alpha1.TFJobDefaultContainerName, + portName: trainingv1alpha1.TFJobDefaultPortName, + port: trainingv1alpha1.TFJobDefaultPort, }, }), - containerName: tfv1.DefaultContainerName, - portName: tfv1.DefaultPortName, + containerName: trainingv1alpha1.TFJobDefaultContainerName, + portName: trainingv1alpha1.TFJobDefaultPortName, port: 1111, expected: newPodTemplateSpec([]simpleContainerPort{ { - containerName: tfv1.DefaultContainerName, - portName: tfv1.DefaultPortName, + containerName: trainingv1alpha1.TFJobDefaultContainerName, + portName: trainingv1alpha1.TFJobDefaultPortName, port: 1111, }, }), @@ -57,17 +58,17 @@ func TestAppendOrOverrideContainerPort(t *testing.T) { spec: newPodTemplateSpec([]simpleContainerPort{ { containerName: "main", - portName: tfv1.DefaultPortName, - port: tfv1.DefaultPort, + portName: trainingv1alpha1.TFJobDefaultPortName, + port: trainingv1alpha1.TFJobDefaultPort, }, }), - containerName: tfv1.DefaultContainerName, - portName: tfv1.DefaultPortName, + containerName: trainingv1alpha1.TFJobDefaultContainerName, + portName: trainingv1alpha1.TFJobDefaultPortName, port: 1111, expected: newPodTemplateSpec([]simpleContainerPort{ { containerName: "main", - portName: tfv1.DefaultPortName, + portName: trainingv1alpha1.TFJobDefaultPortName, port: 1111, }, }), @@ -76,9 +77,9 @@ func TestAppendOrOverrideContainerPort(t *testing.T) { name: "multiple container with default names", spec: newPodTemplateSpec([]simpleContainerPort{ { - containerName: tfv1.DefaultContainerName, - portName: tfv1.DefaultPortName, - port: tfv1.DefaultPort, + containerName: trainingv1alpha1.TFJobDefaultContainerName, + portName: trainingv1alpha1.TFJobDefaultPortName, + port: trainingv1alpha1.TFJobDefaultPort, }, { containerName: "other", @@ -86,13 +87,13 @@ func TestAppendOrOverrideContainerPort(t *testing.T) { port: 1111, }, }), - containerName: tfv1.DefaultContainerName, - portName: tfv1.DefaultPortName, + containerName: trainingv1alpha1.TFJobDefaultContainerName, + portName: trainingv1alpha1.TFJobDefaultPortName, port: 1234, expected: newPodTemplateSpec([]simpleContainerPort{ { - containerName: tfv1.DefaultContainerName, - portName: tfv1.DefaultPortName, + containerName: trainingv1alpha1.TFJobDefaultContainerName, + portName: trainingv1alpha1.TFJobDefaultPortName, port: 1234, }, { @@ -109,13 +110,13 @@ func TestAppendOrOverrideContainerPort(t *testing.T) { containerName: "custom", }, }), - containerName: tfv1.DefaultContainerName, - portName: tfv1.DefaultPortName, + containerName: trainingv1alpha1.TFJobDefaultContainerName, + portName: trainingv1alpha1.TFJobDefaultPortName, port: 1234, expected: newPodTemplateSpec([]simpleContainerPort{ { containerName: "custom", - portName: tfv1.DefaultPortName, + portName: trainingv1alpha1.TFJobDefaultPortName, port: 1234, }, }), diff --git a/pkg/job_controller/job.go b/pkg/job_controller/job.go index eb5b84a2..5930b7da 100644 --- a/pkg/job_controller/job.go +++ b/pkg/job_controller/job.go @@ -13,9 +13,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "sigs.k8s.io/controller-runtime/pkg/reconcile" - elasticdlv1alpha1 "github.com/alibaba/kubedl/apis/elasticdl/v1alpha1" - mpiv1 "github.com/alibaba/kubedl/apis/mpi/v1" - pytorchv1 "github.com/alibaba/kubedl/apis/pytorch/v1" + training "github.com/alibaba/kubedl/apis/training/v1alpha1" "github.com/alibaba/kubedl/pkg/code_sync" apiv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" commonutil "github.com/alibaba/kubedl/pkg/util" @@ -226,14 +224,14 @@ func (jc *JobController) ReconcileJobs( } // Skip service of ElasticDLJob and MPIJob. - if jc.Controller.GetAPIGroupVersionKind().Kind == elasticdlv1alpha1.Kind || - jc.Controller.GetAPIGroupVersionKind().Kind == mpiv1.Kind { + if jc.Controller.GetAPIGroupVersionKind().Kind == training.ElasticDLJobKind || + jc.Controller.GetAPIGroupVersionKind().Kind == training.MPIJobKind { continue } // Service is in need only for Master - if jc.Controller.GetAPIGroupVersionKind().Kind == pytorchv1.Kind && - rtype != pytorchv1.PyTorchReplicaTypeMaster { + if jc.Controller.GetAPIGroupVersionKind().Kind == training.PyTorchJobKind && + rtype != training.PyTorchReplicaTypeMaster { continue } diff --git a/pkg/metrics/status_counter.go b/pkg/metrics/status_counter.go index 6c60050d..3ceda5d7 100644 --- a/pkg/metrics/status_counter.go +++ b/pkg/metrics/status_counter.go @@ -19,10 +19,7 @@ package metrics import ( "context" - pytorchv1 "github.com/alibaba/kubedl/apis/pytorch/v1" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" - xdlv1alpha1 "github.com/alibaba/kubedl/apis/xdl/v1alpha1" - "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -49,33 +46,33 @@ func JobStatusCounter(kind string, reader client.Reader, filter func(status v1.J var ( listObjectMap = map[string]runtime.Object{ - tfv1.Kind: &tfv1.TFJobList{}, - pytorchv1.Kind: &pytorchv1.PyTorchJobList{}, - xdlv1alpha1.Kind: &xdlv1alpha1.XDLJobList{}, - v1alpha1.Kind: &v1alpha1.XGBoostJobList{}, + trainingv1alpha1.TFJobKind: &trainingv1alpha1.TFJobList{}, + trainingv1alpha1.PyTorchJobKind: &trainingv1alpha1.PyTorchJobList{}, + trainingv1alpha1.XDLJobKind: &trainingv1alpha1.XDLJobList{}, + trainingv1alpha1.XGBoostJobKind: &trainingv1alpha1.XGBoostJobList{}, } ) func getJobStatusList(obj runtime.Object, kind string) []*v1.JobStatus { statuses := make([]*v1.JobStatus, 0) switch kind { - case tfv1.Kind: - tfList := obj.(*tfv1.TFJobList) + case trainingv1alpha1.TFJobKind: + tfList := obj.(*trainingv1alpha1.TFJobList) for idx := range tfList.Items { statuses = append(statuses, &tfList.Items[idx].Status) } - case pytorchv1.Kind: - pytorchList := obj.(*pytorchv1.PyTorchJobList) + case trainingv1alpha1.PyTorchJobKind: + pytorchList := obj.(*trainingv1alpha1.PyTorchJobList) for idx := range pytorchList.Items { statuses = append(statuses, &pytorchList.Items[idx].Status) } - case xdlv1alpha1.Kind: - xdlList := obj.(*xdlv1alpha1.XDLJobList) + case trainingv1alpha1.XDLJobKind: + xdlList := obj.(*trainingv1alpha1.XDLJobList) for idx := range xdlList.Items { statuses = append(statuses, &xdlList.Items[idx].Status) } - case v1alpha1.Kind: - xgbList := obj.(*v1alpha1.XGBoostJobList) + case trainingv1alpha1.XGBoostJobKind: + xgbList := obj.(*trainingv1alpha1.XGBoostJobList) for idx := range xgbList.Items { statuses = append(statuses, &xgbList.Items[idx].Status.JobStatus) } diff --git a/pkg/metrics/status_counter_test.go b/pkg/metrics/status_counter_test.go index db2c1f35..917c341a 100644 --- a/pkg/metrics/status_counter_test.go +++ b/pkg/metrics/status_counter_test.go @@ -22,7 +22,7 @@ import ( "time" "github.com/alibaba/kubedl/apis" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" apiv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/util" . "github.com/onsi/ginkgo" @@ -71,19 +71,19 @@ var _ = BeforeSuite(func(done Done) { var _ = Describe("PodControl", func() { It("Running status counting", func() { now := v1.Now() - toCreate := tfv1.TFJob{ + toCreate := trainingv1alpha1.TFJob{ ObjectMeta: v1.ObjectMeta{ Name: "foo", Namespace: "default", }, - Spec: tfv1.TFJobSpec{TFReplicaSpecs: map[apiv1.ReplicaType]*apiv1.ReplicaSpec{}}, + Spec: trainingv1alpha1.TFJobSpec{TFReplicaSpecs: map[apiv1.ReplicaType]*apiv1.ReplicaSpec{}}, Status: apiv1.JobStatus{ ReplicaStatuses: map[apiv1.ReplicaType]*apiv1.ReplicaStatus{}, StartTime: &now, }, } _ = util.UpdateJobConditions(&toCreate.Status, apiv1.JobCreated, "", "") - pending, err := JobStatusCounter(tfv1.Kind, k8sClient, func(status apiv1.JobStatus) bool { + pending, err := JobStatusCounter(trainingv1alpha1.TFJobKind, k8sClient, func(status apiv1.JobStatus) bool { return util.IsCreated(status) && len(status.Conditions) == 1 }) Expect(err).Should(Succeed()) @@ -91,13 +91,13 @@ var _ = Describe("PodControl", func() { err = k8sClient.Create(context.Background(), &toCreate) Expect(err).Should(Succeed()) - pending, err = JobStatusCounter(tfv1.Kind, k8sClient, func(status apiv1.JobStatus) bool { + pending, err = JobStatusCounter(trainingv1alpha1.TFJobKind, k8sClient, func(status apiv1.JobStatus) bool { return util.IsCreated(status) && len(status.Conditions) == 1 }) Expect(err).Should(Succeed()) Expect(pending).Should(Equal(int32(1))) - fetched := &tfv1.TFJob{} + fetched := &trainingv1alpha1.TFJob{} err = k8sClient.Get(context.Background(), types.NamespacedName{Name: "foo", Namespace: "default"}, fetched) Expect(err).Should(Succeed()) @@ -107,12 +107,12 @@ var _ = Describe("PodControl", func() { It("Pending status counting", func() { now := v1.Now() - toCreate := tfv1.TFJob{ + toCreate := trainingv1alpha1.TFJob{ ObjectMeta: v1.ObjectMeta{ Name: "foo", Namespace: "default", }, - Spec: tfv1.TFJobSpec{TFReplicaSpecs: map[apiv1.ReplicaType]*apiv1.ReplicaSpec{}}, + Spec: trainingv1alpha1.TFJobSpec{TFReplicaSpecs: map[apiv1.ReplicaType]*apiv1.ReplicaSpec{}}, Status: apiv1.JobStatus{ ReplicaStatuses: map[apiv1.ReplicaType]*apiv1.ReplicaStatus{}, StartTime: &now, @@ -120,17 +120,17 @@ var _ = Describe("PodControl", func() { } _ = util.UpdateJobConditions(&toCreate.Status, apiv1.JobCreated, "", "") _ = util.UpdateJobConditions(&toCreate.Status, apiv1.JobRunning, "", "") - running, err := JobStatusCounter(tfv1.Kind, k8sClient, util.IsRunning) + running, err := JobStatusCounter(trainingv1alpha1.TFJobKind, k8sClient, util.IsRunning) Expect(err).Should(Succeed()) Expect(running).Should(Equal(int32(0))) err = k8sClient.Create(context.Background(), &toCreate) Expect(err).Should(Succeed()) - running, err = JobStatusCounter(tfv1.Kind, k8sClient, util.IsRunning) + running, err = JobStatusCounter(trainingv1alpha1.TFJobKind, k8sClient, util.IsRunning) Expect(err).Should(Succeed()) Expect(running).Should(Equal(int32(1))) - fetched := &tfv1.TFJob{} + fetched := &trainingv1alpha1.TFJob{} err = k8sClient.Get(context.Background(), types.NamespacedName{Name: "foo", Namespace: "default"}, fetched) Expect(err).Should(Succeed()) diff --git a/pkg/storage/dmo/converters/job.go b/pkg/storage/dmo/converters/job.go index 84ee9770..c1476f71 100644 --- a/pkg/storage/dmo/converters/job.go +++ b/pkg/storage/dmo/converters/job.go @@ -19,16 +19,14 @@ package converters import ( "encoding/json" "fmt" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/klog" "k8s.io/utils/pointer" - pytorchv1 "github.com/alibaba/kubedl/apis/pytorch/v1" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" - xdlv1alpha1 "github.com/alibaba/kubedl/apis/xdl/v1alpha1" - xgboostv1alpha1 "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" - "github.com/alibaba/kubedl/pkg/job_controller/api/v1" + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" + v1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/storage/dmo" "github.com/alibaba/kubedl/pkg/util" "github.com/alibaba/kubedl/pkg/util/tenancy" @@ -86,14 +84,14 @@ func ConvertJobToDMOJob(job metav1.Object, kind string, specs map[v1.ReplicaType // ExtractTypedJobInfos extract common-api struct and infos from different typed job objects. func ExtractTypedJobInfos(job metav1.Object) (kind string, spec map[v1.ReplicaType]*v1.ReplicaSpec, status v1.JobStatus, err error) { switch typed := job.(type) { - case *tfv1.TFJob: - return tfv1.Kind, typed.Spec.TFReplicaSpecs, typed.Status, nil - case *pytorchv1.PyTorchJob: - return pytorchv1.Kind, typed.Spec.PyTorchReplicaSpecs, typed.Status, nil - case *xgboostv1alpha1.XGBoostJob: - return xgboostv1alpha1.Kind, typed.Spec.XGBReplicaSpecs, typed.Status.JobStatus, nil - case *xdlv1alpha1.XDLJob: - return xdlv1alpha1.Kind, typed.Spec.XDLReplicaSpecs, typed.Status, nil + case *trainingv1alpha1.TFJob: + return trainingv1alpha1.TFJobKind, typed.Spec.TFReplicaSpecs, typed.Status, nil + case *trainingv1alpha1.PyTorchJob: + return trainingv1alpha1.PyTorchJobKind, typed.Spec.PyTorchReplicaSpecs, typed.Status, nil + case *trainingv1alpha1.XGBoostJob: + return trainingv1alpha1.XGBoostJobKind, typed.Spec.XGBReplicaSpecs, typed.Status.JobStatus, nil + case *trainingv1alpha1.XDLJob: + return trainingv1alpha1.XDLJobKind, typed.Spec.XDLReplicaSpecs, typed.Status, nil } return "", nil, v1.JobStatus{}, fmt.Errorf("unkonwn job kind, %s/%s", job.GetNamespace(), job.GetName()) } diff --git a/pkg/storage/dmo/converters/job_test.go b/pkg/storage/dmo/converters/job_test.go index 2bd39c06..fe03d084 100644 --- a/pkg/storage/dmo/converters/job_test.go +++ b/pkg/storage/dmo/converters/job_test.go @@ -20,10 +20,7 @@ import ( "reflect" "testing" - pytorchv1 "github.com/alibaba/kubedl/apis/pytorch/v1" - tfv1 "github.com/alibaba/kubedl/apis/tensorflow/v1" - xdlv1alpha1 "github.com/alibaba/kubedl/apis/xdl/v1alpha1" - "github.com/alibaba/kubedl/apis/xgboost/v1alpha1" + trainingv1alpha1 "github.com/alibaba/kubedl/apis/training/v1alpha1" apiv1 "github.com/alibaba/kubedl/pkg/job_controller/api/v1" "github.com/alibaba/kubedl/pkg/storage/dmo" "github.com/alibaba/kubedl/pkg/util" @@ -48,7 +45,7 @@ func TestConvertJobToDMOJob(t *testing.T) { { name: "tfjob with created status", args: args{ - job: &tfv1.TFJob{ + job: &trainingv1alpha1.TFJob{ ObjectMeta: metav1.ObjectMeta{ Name: "tfjob-test", Namespace: testNamespace, @@ -59,7 +56,7 @@ func TestConvertJobToDMOJob(t *testing.T) { Status: apiv1.JobStatus{ StartTime: &metav1.Time{Time: testTime("2019-02-11T12:27:00Z")}, }, - Spec: tfv1.TFJobSpec{ + Spec: trainingv1alpha1.TFJobSpec{ TFReplicaSpecs: map[apiv1.ReplicaType]*apiv1.ReplicaSpec{ "Worker": { Template: v1.PodTemplateSpec{ @@ -85,7 +82,7 @@ func TestConvertJobToDMOJob(t *testing.T) { want: &dmo.Job{ Name: "tfjob-test", JobID: "6f06d2fd-22c6-11e9-96bb-0242ac1d5327", - Kind: tfv1.Kind, + Kind: trainingv1alpha1.TFJobKind, Status: apiv1.JobCreated, Namespace: testNamespace, DeployRegion: pointer.StringPtr(testRegion), @@ -100,7 +97,7 @@ func TestConvertJobToDMOJob(t *testing.T) { }, { name: "tfjob with region", args: args{ - job: &tfv1.TFJob{ + job: &trainingv1alpha1.TFJob{ ObjectMeta: metav1.ObjectMeta{ Name: "tfjob-test", Namespace: testNamespace, @@ -115,7 +112,7 @@ func TestConvertJobToDMOJob(t *testing.T) { CompletionTime: &metav1.Time{Time: testTime("2019-02-11T12:27:00Z")}, Conditions: []apiv1.JobCondition{{Type: apiv1.JobSucceeded}}, }, - Spec: tfv1.TFJobSpec{ + Spec: trainingv1alpha1.TFJobSpec{ TFReplicaSpecs: map[apiv1.ReplicaType]*apiv1.ReplicaSpec{ "Worker": { Replicas: pointer.Int32Ptr(1), @@ -147,7 +144,7 @@ func TestConvertJobToDMOJob(t *testing.T) { want: &dmo.Job{ Name: "tfjob-test", JobID: "6f06d2fd-22c6-11e9-96bb-0242ac1d5327", - Kind: tfv1.Kind, + Kind: trainingv1alpha1.TFJobKind, Status: apiv1.JobSucceeded, Namespace: testNamespace, DeployRegion: pointer.StringPtr(testRegion), @@ -163,7 +160,7 @@ func TestConvertJobToDMOJob(t *testing.T) { }, { name: "xdljob with status succeed", args: args{ - job: &xdlv1alpha1.XDLJob{ + job: &trainingv1alpha1.XDLJob{ ObjectMeta: metav1.ObjectMeta{ Name: "xdljob-test", Namespace: testNamespace, @@ -175,7 +172,7 @@ func TestConvertJobToDMOJob(t *testing.T) { CompletionTime: &metav1.Time{Time: testTime("2019-02-11T12:27:00Z")}, Conditions: []apiv1.JobCondition{{Type: apiv1.JobSucceeded}}, }, - Spec: xdlv1alpha1.XDLJobSpec{ + Spec: trainingv1alpha1.XDLJobSpec{ XDLReplicaSpecs: map[apiv1.ReplicaType]*apiv1.ReplicaSpec{ "Master": { Replicas: pointer.Int32Ptr(1), @@ -200,7 +197,7 @@ func TestConvertJobToDMOJob(t *testing.T) { want: &dmo.Job{ Name: "xdljob-test", JobID: "6f06d2fd-22c6-11e9-96bb-0242ac1d5327", - Kind: xdlv1alpha1.Kind, + Kind: trainingv1alpha1.XDLJobKind, Status: apiv1.JobSucceeded, Namespace: testNamespace, Tenant: pointer.StringPtr(""), @@ -215,7 +212,7 @@ func TestConvertJobToDMOJob(t *testing.T) { }, { name: "pytorchjob with succeed status", args: args{ - job: &pytorchv1.PyTorchJob{ + job: &trainingv1alpha1.PyTorchJob{ ObjectMeta: metav1.ObjectMeta{ Name: "pytorchjob-test", Namespace: testNamespace, @@ -227,7 +224,7 @@ func TestConvertJobToDMOJob(t *testing.T) { CompletionTime: &metav1.Time{Time: testTime("2019-02-11T12:27:00Z")}, Conditions: []apiv1.JobCondition{{Type: apiv1.JobSucceeded}}, }, - Spec: pytorchv1.PyTorchJobSpec{ + Spec: trainingv1alpha1.PyTorchJobSpec{ PyTorchReplicaSpecs: map[apiv1.ReplicaType]*apiv1.ReplicaSpec{ "Worker": { Replicas: pointer.Int32Ptr(1), @@ -252,7 +249,7 @@ func TestConvertJobToDMOJob(t *testing.T) { want: &dmo.Job{ Name: "pytorchjob-test", JobID: "6f06d2fd-22c6-11e9-96bb-0242ac1d5327", - Kind: pytorchv1.Kind, + Kind: trainingv1alpha1.PyTorchJobKind, Status: apiv1.JobSucceeded, Namespace: testNamespace, Tenant: pointer.StringPtr(""), @@ -267,7 +264,7 @@ func TestConvertJobToDMOJob(t *testing.T) { }, { name: "xgboostjob with region", args: args{ - job: &v1alpha1.XGBoostJob{ + job: &trainingv1alpha1.XGBoostJob{ ObjectMeta: metav1.ObjectMeta{ Name: "xgboostjob-test", Namespace: testNamespace, @@ -275,13 +272,13 @@ func TestConvertJobToDMOJob(t *testing.T) { ResourceVersion: "3", CreationTimestamp: metav1.Time{Time: testTime("2019-02-10T12:27:00Z")}, }, - Status: v1alpha1.XGBoostJobStatus{ + Status: trainingv1alpha1.XGBoostJobStatus{ JobStatus: apiv1.JobStatus{ CompletionTime: &metav1.Time{Time: testTime("2019-02-11T12:27:00Z")}, Conditions: []apiv1.JobCondition{{Type: apiv1.JobSucceeded}}, }, }, - Spec: v1alpha1.XGBoostJobSpec{ + Spec: trainingv1alpha1.XGBoostJobSpec{ XGBReplicaSpecs: map[apiv1.ReplicaType]*apiv1.ReplicaSpec{ "Worker": { Replicas: pointer.Int32Ptr(1), @@ -306,7 +303,7 @@ func TestConvertJobToDMOJob(t *testing.T) { want: &dmo.Job{ Name: "xgboostjob-test", JobID: "6f06d2fd-22c6-11e9-96bb-0242ac1d5327", - Kind: v1alpha1.Kind, + Kind: trainingv1alpha1.XGBoostJobKind, Status: apiv1.JobSucceeded, Namespace: testNamespace, Tenant: pointer.StringPtr(""), diff --git a/pkg/tensorboard/tensorboard.go b/pkg/tensorboard/tensorboard.go index 32ddebeb..a968d3d8 100644 --- a/pkg/tensorboard/tensorboard.go +++ b/pkg/tensorboard/tensorboard.go @@ -67,7 +67,6 @@ func ReconcileTensorBoard(jc job_controller.JobController, c client.Client, meta } } else { // annotation not found ,try to delete tensorboard - log.Infof("tensorboard config not found, try delete it") if err := deleteTensorBoard(jc, c, metaObj); err != nil { return err } @@ -382,18 +381,20 @@ func syncIngress(jc job_controller.JobController, c client.Client, // deleteTensorBoard delete tensorboard ingress service and pod. func deleteTensorBoard(jc job_controller.JobController, c client.Client, metaObj metav1.Object) error { index := strconv.Itoa(0) + ns := metaObj.GetNamespace() name := commonutil.GenGeneralName(metaObj.GetName(), tbRT, index) // delete ingress in := v1beta1.Ingress{} if err := c.Get(context.Background(), types.NamespacedName{ - Namespace: metaObj.GetNamespace(), + Namespace: ns, Name: name}, &in); err == nil && metav1.IsControlledBy(&in, metaObj) { if err := c.Delete(context.Background(), &in); err != nil { return err } + log.Infof("delete tensorboard %s/%s ingress success.", ns, name) } else if err != nil && !errors.IsNotFound(err) { return err } @@ -402,12 +403,13 @@ func deleteTensorBoard(jc job_controller.JobController, c client.Client, metaObj service := corev1.Service{} if err := c.Get(context.Background(), types.NamespacedName{ - Namespace: metaObj.GetNamespace(), + Namespace: ns, Name: name}, &service); err == nil && metav1.IsControlledBy(&service, metaObj) { if err := c.Delete(context.Background(), &service); err != nil { return err } + log.Infof("delete tensorboard %s/%s service success.", ns, name) } else if err != nil && !errors.IsNotFound(err) { return err } @@ -416,12 +418,13 @@ func deleteTensorBoard(jc job_controller.JobController, c client.Client, metaObj pod := corev1.Pod{} if err := c.Get(context.Background(), types.NamespacedName{ - Namespace: metaObj.GetNamespace(), + Namespace: ns, Name: name}, &pod); err == nil && metav1.IsControlledBy(&pod, metaObj) { if err := c.Delete(context.Background(), &pod); err != nil { return err } + log.Infof("delete tensorboard %s/%s pod success.", ns, name) } else if err != nil && !errors.IsNotFound(err) { return err }