Documentation
¶
Index ¶
- func CreateDebugMessage(podEvents []*v1.Event) string
- func CreateEventForCurrentState(pod *v1.Pod, clusterId string, classifyResult categorizer.ClassifyResult, ...) (*armadaevents.EventSequence, error)
- func CreateJobFailedEvent(pod *v1.Pod, reason string, cause armadaevents.KubernetesReason, ...) (*armadaevents.EventSequence, error)
- func CreateJobIngressInfoEvent(pod *v1.Pod, clusterId string, associatedServices []*v1.Service, ...) (*armadaevents.EventSequence, error)
- func CreateJobRunCancelledDebugEvent(pod *v1.Pod, debugMessage string) (*armadaevents.EventSequence, error)
- func CreateJobUtilisationEvent(pod *v1.Pod, utilisationData *domain.UtilisationDataAggregation, ...) (*armadaevents.EventSequence, error)
- func CreateMinimalJobFailedEvent(jobId string, runId string, jobSet string, queue string, clusterId string, ...) (*armadaevents.EventSequence, error)
- func CreateReturnLeaseEvent(pod *v1.Pod, reason string, debugMessage string, clusterId string, ...) (*armadaevents.EventSequence, error)
- func CreateSimpleJobFailedEvent(pod *v1.Pod, reason string, clusterId string, ...) (*armadaevents.EventSequence, error)
- func CreateSimpleJobPreemptedEvent(pod *v1.Pod) (*armadaevents.EventSequence, error)
- type EventMessage
- type EventReporter
- type EventSender
- type ExecutorApiEventSender
- type JobEventReporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDebugMessage ¶ added in v0.22.3
CreateDebugMessage renders the supplied Kubernetes pod events into a human-readable debug string, capped at maxDebugMessageSize (keeping the most recent events on truncation).
func CreateEventForCurrentState ¶
func CreateEventForCurrentState(pod *v1.Pod, clusterId string, classifyResult categorizer.ClassifyResult, debugMessage string) (*armadaevents.EventSequence, error)
CreateEventForCurrentState builds the armada event for pod's current phase. For failed pods the caller supplies the classification result to attach to the event, along with an optional debugMessage (rendered k8s events) to include on the PodError.
func CreateJobFailedEvent ¶
func CreateJobFailedEvent(pod *v1.Pod, reason string, cause armadaevents.KubernetesReason, debugMessage string, containerStatuses []*armadaevents.ContainerError, clusterId string, failureCategory string, failureSubcategory string, ) (*armadaevents.EventSequence, error)
func CreateJobIngressInfoEvent ¶
func CreateJobIngressInfoEvent(pod *v1.Pod, clusterId string, associatedServices []*v1.Service, associatedIngresses []*networking.Ingress) (*armadaevents.EventSequence, error)
func CreateJobRunCancelledDebugEvent ¶ added in v0.22.3
func CreateJobRunCancelledDebugEvent(pod *v1.Pod, debugMessage string) (*armadaevents.EventSequence, error)
CreateJobRunCancelledDebugEvent creates a JobCancelledDebugInfo event carrying the rendered k8s pod events for a run that is being cancelled before its main container ever started. It is purely diagnostic: it is NOT an error and does NOT change the run's state, so the run remains cancelled. Only Lookout consumes it, to populate the run's debug column.
func CreateJobUtilisationEvent ¶
func CreateJobUtilisationEvent(pod *v1.Pod, utilisationData *domain.UtilisationDataAggregation, clusterId string) (*armadaevents.EventSequence, error)
func CreateMinimalJobFailedEvent ¶ added in v0.4.36
func CreateReturnLeaseEvent ¶ added in v0.3.47
func CreateReturnLeaseEvent(pod *v1.Pod, reason string, debugMessage string, clusterId string, runAttempted bool, failureCategory string, failureSubcategory string, ) (*armadaevents.EventSequence, error)
CreateReturnLeaseEvent builds the lease-return error event for a run the scheduler should retry. failureCategory and failureSubcategory carry the pod error classification when the caller has one; empty strings mean the failure was not classified and leave the fields unset.
func CreateSimpleJobFailedEvent ¶
func CreateSimpleJobFailedEvent(pod *v1.Pod, reason string, clusterId string, cause armadaevents.KubernetesReason) (*armadaevents.EventSequence, error)
CreateSimpleJobFailedEvent creates a failed event with no container details or failure category, for failures where pod container statuses are unavailable (preemption, submit failures).
func CreateSimpleJobPreemptedEvent ¶ added in v0.3.57
func CreateSimpleJobPreemptedEvent(pod *v1.Pod) (*armadaevents.EventSequence, error)
Types ¶
type EventMessage ¶ added in v0.3.47
type EventMessage struct {
Event *armadaevents.EventSequence
JobRunId string
}
type EventReporter ¶
type EventReporter interface {
Report(events []EventMessage) error
QueueEvent(event EventMessage, callback func(error))
HasPendingEvents(pod *v1.Pod) bool
}
type EventSender ¶ added in v0.3.47
type EventSender interface {
SendEvents(events []EventMessage) error
}
type ExecutorApiEventSender ¶ added in v0.3.47
type ExecutorApiEventSender struct {
// contains filtered or unexported fields
}
func NewExecutorApiEventSender ¶ added in v0.3.47
func NewExecutorApiEventSender( executorApiClient executorapi.ExecutorApiClient, maxMessageSize int, ) *ExecutorApiEventSender
func (*ExecutorApiEventSender) SendEvents ¶ added in v0.3.47
func (eventSender *ExecutorApiEventSender) SendEvents(events []EventMessage) error
type JobEventReporter ¶
type JobEventReporter struct {
// contains filtered or unexported fields
}
func NewJobEventReporter ¶
func NewJobEventReporter( eventSender EventSender, clock clock.WithTicker, maxBatchSize int, ) (*JobEventReporter, chan bool)
func (*JobEventReporter) HasPendingEvents ¶ added in v0.16.2
func (eventReporter *JobEventReporter) HasPendingEvents(pod *v1.Pod) bool
func (*JobEventReporter) QueueEvent ¶
func (eventReporter *JobEventReporter) QueueEvent(event EventMessage, callback func(error))
func (*JobEventReporter) Report ¶
func (eventReporter *JobEventReporter) Report(events []EventMessage) error