volcano.sh/apis@v1.8.2/pkg/apis/flow/v1alpha1/jobtemplate_types.go (about) 1 /* 2 Copyright 2021. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package v1alpha1 18 19 import ( 20 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 "volcano.sh/apis/pkg/apis/batch/v1alpha1" 22 ) 23 24 // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! 25 // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. 26 27 // JobTemplateSpec defines the desired state of JobTemplate 28 type JobTemplateSpec struct { 29 // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster 30 // Important: Run "make" to regenerate code after modifying this file 31 32 // Foo is an example field of JobTemplate. Edit jobtemplate_types.go to remove/update 33 v1alpha1.JobSpec 34 } 35 36 // JobTemplateStatus defines the observed state of JobTemplate 37 type JobTemplateStatus struct { 38 // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster 39 // Important: Run "make" to regenerate code after modifying this file 40 41 //Describes the Jobs generated from the JobTemplate 42 JobDependsOnList []string `json:"jobDependsOnList,omitempty"` 43 } 44 45 // +genclient 46 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 47 //+kubebuilder:object:root=true 48 // +kubebuilder:resource:path=jobtemplates,shortName=jt 49 //+kubebuilder:subresource:status 50 51 // JobTemplate is the Schema for the jobtemplates API 52 type JobTemplate struct { 53 metav1.TypeMeta `json:",inline"` 54 metav1.ObjectMeta `json:"metadata,omitempty"` 55 56 Spec v1alpha1.JobSpec `json:"spec,omitempty"` 57 Status JobTemplateStatus `json:"status,omitempty"` 58 } 59 60 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 61 //+kubebuilder:object:root=true 62 63 // JobTemplateList contains a list of JobTemplate 64 type JobTemplateList struct { 65 metav1.TypeMeta `json:",inline"` 66 metav1.ListMeta `json:"metadata,omitempty"` 67 Items []JobTemplate `json:"items"` 68 }