volcano.sh/apis@v1.8.2/pkg/apis/bus/v1alpha1/commands.go (about) 1 package v1alpha1 2 3 import ( 4 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 5 ) 6 7 // +genclient 8 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 9 // +kubebuilder:object:root=true 10 11 // Command defines command structure. 12 type Command struct { 13 metav1.TypeMeta `json:",inline"` 14 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 15 16 // Action defines the action that will be took to the target object. 17 Action string `json:"action,omitempty" protobuf:"bytes,2,opt,name=action"` 18 19 // TargetObject defines the target object of this command. 20 TargetObject *metav1.OwnerReference `json:"target,omitempty" protobuf:"bytes,3,opt,name=target"` 21 22 // Unique, one-word, CamelCase reason for this command. 23 // +optional 24 Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` 25 26 // Human-readable message indicating details of this command. 27 // +optional 28 Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` 29 } 30 31 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 32 // +kubebuilder:object:root=true 33 34 // CommandList defines list of commands. 35 type CommandList struct { 36 metav1.TypeMeta `json:",inline"` 37 metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 38 39 Items []Command `json:"items" protobuf:"bytes,2,rep,name=items"` 40 }