Documentation ¶
Index ¶
- type ClusterJobContext
- func (c *ClusterJobContext) AddAnnotation(jobs []*RunningJob, annotations map[string]string)
- func (c *ClusterJobContext) DeleteJobWithCondition(job *RunningJob, condition func(pod *v1.Pod) bool) error
- func (c *ClusterJobContext) DeleteJobs(jobs []*RunningJob)
- func (c *ClusterJobContext) GetJobs() ([]*RunningJob, error)
- func (c *ClusterJobContext) MarkIssueReported(issue *PodIssue)
- func (c *ClusterJobContext) MarkIssuesResolved(job *RunningJob)
- type FailedSubmissionDetails
- type IssueType
- type JobContext
- type JobRunStateStore
- func (stateStore *JobRunStateStore) Delete(runId string)
- func (stateStore *JobRunStateStore) Get(runId string) *RunState
- func (stateStore *JobRunStateStore) GetAll() []*RunState
- func (stateStore *JobRunStateStore) GetAllWithFilter(fn func(state *RunState) bool) []*RunState
- func (stateStore *JobRunStateStore) GetByKubernetesId(kubernetesId string) *RunState
- func (stateStore *JobRunStateStore) ReportFailedSubmission(runId string)
- func (stateStore *JobRunStateStore) ReportRunInvalid(runMeta *RunMeta)
- func (stateStore *JobRunStateStore) ReportRunLeased(runMeta *RunMeta, job *SubmitJob)
- func (stateStore *JobRunStateStore) ReportSuccessfulSubmission(runId string)
- func (stateStore *JobRunStateStore) RequestRunCancellation(runId string)
- func (stateStore *JobRunStateStore) RequestRunPreemption(runId string)
- type PodIssue
- type RunMeta
- type RunPhase
- type RunState
- type RunStateStore
- type RunningJob
- type SubmitJob
- func CreateSubmitJobFromApiJob(apiJob *api.Job, podDefaults *configuration.PodDefaults) *SubmitJob
- func CreateSubmitJobFromExecutorApiJobRunLease(jobRunLease *executorapi.JobRunLease, podDefaults *configuration.PodDefaults) (*SubmitJob, error)
- func CreateSubmitJobsFromApiJobs(apiJobs []*api.Job, podDefaults *configuration.PodDefaults) []*SubmitJob
- type SubmitJobMeta
- type SubmitService
- type Submitter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterJobContext ¶
type ClusterJobContext struct {
// contains filtered or unexported fields
}
func NewClusterJobContext ¶
func NewClusterJobContext( clusterContext executorContext.ClusterContext, pendingPodChecker podchecks.PodChecker, stuckTerminatingPodExpiry time.Duration, updateThreadCount int, ) *ClusterJobContext
func (*ClusterJobContext) AddAnnotation ¶
func (c *ClusterJobContext) AddAnnotation(jobs []*RunningJob, annotations map[string]string)
func (*ClusterJobContext) DeleteJobWithCondition ¶ added in v0.3.47
func (c *ClusterJobContext) DeleteJobWithCondition(job *RunningJob, condition func(pod *v1.Pod) bool) error
func (*ClusterJobContext) DeleteJobs ¶
func (c *ClusterJobContext) DeleteJobs(jobs []*RunningJob)
func (*ClusterJobContext) GetJobs ¶
func (c *ClusterJobContext) GetJobs() ([]*RunningJob, error)
func (*ClusterJobContext) MarkIssueReported ¶
func (c *ClusterJobContext) MarkIssueReported(issue *PodIssue)
func (*ClusterJobContext) MarkIssuesResolved ¶
func (c *ClusterJobContext) MarkIssuesResolved(job *RunningJob)
type FailedSubmissionDetails ¶
type JobContext ¶
type JobContext interface { GetJobs() ([]*RunningJob, error) MarkIssueReported(issue *PodIssue) MarkIssuesResolved(job *RunningJob) DeleteJobWithCondition(job *RunningJob, condition func(pod *v1.Pod) bool) error DeleteJobs(jobs []*RunningJob) AddAnnotation(jobs []*RunningJob, annotations map[string]string) }
type JobRunStateStore ¶ added in v0.3.50
type JobRunStateStore struct {
// contains filtered or unexported fields
}
func NewJobRunStateStore ¶ added in v0.3.50
func NewJobRunStateStore(clusterContext context.ClusterContext) *JobRunStateStore
func NewJobRunStateStoreWithInitialState ¶ added in v0.3.57
func NewJobRunStateStoreWithInitialState(initialJobRuns []*RunState) *JobRunStateStore
NewJobRunStateStoreWithInitialState This constructor is only intended for tests - as it does not reconcile with kubernetes state
func (*JobRunStateStore) Delete ¶ added in v0.3.50
func (stateStore *JobRunStateStore) Delete(runId string)
func (*JobRunStateStore) Get ¶ added in v0.3.50
func (stateStore *JobRunStateStore) Get(runId string) *RunState
func (*JobRunStateStore) GetAll ¶ added in v0.3.50
func (stateStore *JobRunStateStore) GetAll() []*RunState
func (*JobRunStateStore) GetAllWithFilter ¶ added in v0.3.57
func (stateStore *JobRunStateStore) GetAllWithFilter(fn func(state *RunState) bool) []*RunState
func (*JobRunStateStore) GetByKubernetesId ¶ added in v0.3.50
func (stateStore *JobRunStateStore) GetByKubernetesId(kubernetesId string) *RunState
func (*JobRunStateStore) ReportFailedSubmission ¶ added in v0.3.50
func (stateStore *JobRunStateStore) ReportFailedSubmission(runId string)
func (*JobRunStateStore) ReportRunInvalid ¶ added in v0.3.57
func (stateStore *JobRunStateStore) ReportRunInvalid(runMeta *RunMeta)
func (*JobRunStateStore) ReportRunLeased ¶ added in v0.3.50
func (stateStore *JobRunStateStore) ReportRunLeased(runMeta *RunMeta, job *SubmitJob)
func (*JobRunStateStore) ReportSuccessfulSubmission ¶ added in v0.3.57
func (stateStore *JobRunStateStore) ReportSuccessfulSubmission(runId string)
func (*JobRunStateStore) RequestRunCancellation ¶ added in v0.3.57
func (stateStore *JobRunStateStore) RequestRunCancellation(runId string)
func (*JobRunStateStore) RequestRunPreemption ¶ added in v0.3.57
func (stateStore *JobRunStateStore) RequestRunPreemption(runId string)
type RunPhase ¶ added in v0.3.50
type RunPhase int
const ( // Invalid is when the job run provided could not be processed // examples: invalid id formats, a missing podspec definition Invalid RunPhase = iota // Leased is the initial state and occurs before we submit the run to kubernetes Leased // SuccessfulSubmission is when a job was successfully sent to the k8s api SuccessfulSubmission // FailedSubmission is when a failed submission has been reported FailedSubmission // Active is any run present in Kubernetes Active // Missing is when we have lost track of the run // This may happen if we submit a pod to kubernetes but the pod never becomes present in kubernetes Missing )
type RunState ¶ added in v0.3.50
type RunStateStore ¶ added in v0.3.57
type RunStateStore interface { ReportRunLeased(runMeta *RunMeta, job *SubmitJob) ReportRunInvalid(runMeta *RunMeta) ReportSuccessfulSubmission(runId string) ReportFailedSubmission(runId string) RequestRunCancellation(runId string) RequestRunPreemption(runId string) Delete(runId string) Get(runId string) *RunState GetAll() []*RunState GetAllWithFilter(fn func(state *RunState) bool) []*RunState GetByKubernetesId(kubernetesId string) *RunState }
type SubmitJob ¶ added in v0.3.47
type SubmitJob struct { Meta SubmitJobMeta Pod *v1.Pod Ingresses []*networking.Ingress Services []*v1.Service }
func CreateSubmitJobFromApiJob ¶ added in v0.3.47
func CreateSubmitJobFromApiJob(apiJob *api.Job, podDefaults *configuration.PodDefaults) *SubmitJob
func CreateSubmitJobFromExecutorApiJobRunLease ¶ added in v0.3.47
func CreateSubmitJobFromExecutorApiJobRunLease( jobRunLease *executorapi.JobRunLease, podDefaults *configuration.PodDefaults, ) (*SubmitJob, error)
func CreateSubmitJobsFromApiJobs ¶ added in v0.3.47
func CreateSubmitJobsFromApiJobs(apiJobs []*api.Job, podDefaults *configuration.PodDefaults) []*SubmitJob
type SubmitJobMeta ¶ added in v0.3.50
type SubmitService ¶
type SubmitService struct {
// contains filtered or unexported fields
}
func NewSubmitter ¶
func NewSubmitter( clusterContext context.ClusterContext, podDefaults *configuration.PodDefaults, submissionThreadCount int, fatalPodSubmissionErrors []string, ) *SubmitService
func (*SubmitService) SubmitApiJobs ¶ added in v0.3.47
func (submitService *SubmitService) SubmitApiJobs(jobsToSubmit []*api.Job) []*FailedSubmissionDetails
func (*SubmitService) SubmitJobs ¶
func (submitService *SubmitService) SubmitJobs(jobsToSubmit []*SubmitJob) []*FailedSubmissionDetails
type Submitter ¶
type Submitter interface { SubmitApiJobs(jobsToSubmit []*api.Job) []*FailedSubmissionDetails SubmitJobs(jobsToSubmit []*SubmitJob) []*FailedSubmissionDetails }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.