Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the jobs v1alpha1 API group +kubebuilder:object:generate=true +groupName=jobs.converged-computing.org
Index ¶
- Constants
- Variables
- func GetJobName(jobType JobWrapped, name string) string
- func NewMutatingWebhook(mainManager manager.Manager) *jobReceiver
- func SubmitFluxJob(ctx context.Context, jobType JobWrapped, name string, namespace string, ...) error
- type FluxJob
- type FluxJobList
- type FluxJobSpec
- type FluxJobStatus
- type JobWrapped
- type Resources
- type SubmitStatus
Constants ¶
const ( JobWrappedPod JobWrapped = iota JobWrappedJob SubmitStatusNew SubmitStatus = "statusNew" SubmitStatusSubmit SubmitStatus = "statusSubmit" SubmitStatusError SubmitStatus = "statusError" SubmitStatusCancel SubmitStatus = "statusCancel" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "jobs.converged-computing.org", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func GetJobName ¶
func GetJobName(jobType JobWrapped, name string) string
GetJobName creates a job name that appends the type
func NewMutatingWebhook ¶
NewMutatingWebhook allows us to keep the jobReceiver private If it's public it's exported and kubebuilder tries to add to zz_generated_deepcopy and you get all kinds of terrible errors about admission.Decoder missing DeepCopyInto
Types ¶
type FluxJob ¶
type FluxJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FluxJobSpec `json:"spec,omitempty"` Status FluxJobStatus `json:"status,omitempty"` }
FluxJob is the Schema for the fluxjobs API
func (*FluxJob) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FluxJob.
func (*FluxJob) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FluxJob) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FluxJobList ¶
type FluxJobList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []FluxJob `json:"items"` }
FluxJobList contains a list of FluxJob
func (*FluxJobList) DeepCopy ¶
func (in *FluxJobList) DeepCopy() *FluxJobList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FluxJobList.
func (*FluxJobList) DeepCopyInto ¶
func (in *FluxJobList) DeepCopyInto(out *FluxJobList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FluxJobList) DeepCopyObject ¶
func (in *FluxJobList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FluxJobSpec ¶
type FluxJobSpec struct { // JobSpec is the Flux jobspec // +optional JobSpec string `json:"jobspec,omitempty"` // Type of object that is wrapped // +optional Type JobWrapped `json:"type"` // Original name of the job // +optional Name string `json:"name"` // Object is the underlying pod/job/object specification // This currently is assumed that one job has equivalent pods under it // +optional Object []byte `json:"object,omitempty"` // Duration is the maximum runtime of the job // +optional Duration int32 `json:"duration,omitempty"` // If true, we are allowed to ask fluxion for // a reservation // +optional Reservation bool `json:"reservation,omitempty"` // Nodes needed for the job // +optional Nodes int32 `json:"nodes"` // Resources assigned // +optional Resources Resources `json:"resources"` }
FluxJobSpec defines the desired state of FluxJob A user is not expected to create these -
- A job or similar will be submit
- It will be intercepted by a webhook here
- The webhook will generate the object
- The job will go into the fluxqueue
- When scheduled, it gets sent with an exact node assignment to the custom scheduler plugin.
- Cleanup will need to be handled
A FluxJob is a mapping of a Kubernetes abstraction (e.g., job) into a Flux JobSpec, one that Fluxion can digest.
func (*FluxJobSpec) DeepCopy ¶
func (in *FluxJobSpec) DeepCopy() *FluxJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FluxJobSpec.
func (*FluxJobSpec) DeepCopyInto ¶
func (in *FluxJobSpec) DeepCopyInto(out *FluxJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FluxJobStatus ¶
type FluxJobStatus struct {
SubmitStatus SubmitStatus `json:"submitStatus,omitempty"`
}
FluxJobStatus defines the observed state of FluxJob
func (*FluxJobStatus) DeepCopy ¶
func (in *FluxJobStatus) DeepCopy() *FluxJobStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FluxJobStatus.
func (*FluxJobStatus) DeepCopyInto ¶
func (in *FluxJobStatus) DeepCopyInto(out *FluxJobStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Resources ¶
type Resources struct { // Nodes assigned to the job // +optional Nodes []string `json:"nodes"` }
func (*Resources) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resources.
func (*Resources) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubmitStatus ¶
type SubmitStatus string