Documentation ¶
Index ¶
- type EventFilter
- type EventHandler
- func (h *EventHandler) Create(ctx context.Context, event event.CreateEvent, ...)
- func (h *EventHandler) Delete(ctx context.Context, event event.DeleteEvent, ...)
- func (h *EventHandler) Generic(ctx context.Context, event event.GenericEvent, ...)
- func (h *EventHandler) Update(ctx context.Context, event event.UpdateEvent, ...)
- type Options
- type Reconciler
- type SparkIngress
- type SparkPodEventHandler
- func (h *SparkPodEventHandler) Create(ctx context.Context, event event.CreateEvent, ...)
- func (h *SparkPodEventHandler) Delete(ctx context.Context, event event.DeleteEvent, ...)
- func (h *SparkPodEventHandler) Generic(ctx context.Context, event event.GenericEvent, ...)
- func (h *SparkPodEventHandler) Update(ctx context.Context, event event.UpdateEvent, ...)
- type SparkService
- type Validator
- func (s *Validator) ValidateCreate(_ context.Context, _ runtime.Object) (admission.Warnings, error)
- func (s *Validator) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
- func (s *Validator) ValidateUpdate(_ context.Context, _ runtime.Object, _ runtime.Object) (admission.Warnings, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventFilter ¶
type EventFilter struct {
// contains filtered or unexported fields
}
func NewSparkApplicationEventFilter ¶
func NewSparkApplicationEventFilter(client client.Client, recorder record.EventRecorder, namespaces []string) *EventFilter
func (*EventFilter) Create ¶
func (f *EventFilter) Create(e event.CreateEvent) bool
Create implements predicate.Predicate.
func (*EventFilter) Delete ¶
func (f *EventFilter) Delete(e event.DeleteEvent) bool
Delete implements predicate.Predicate.
func (*EventFilter) Generic ¶
func (f *EventFilter) Generic(e event.GenericEvent) bool
Generic implements predicate.Predicate.
func (*EventFilter) Update ¶
func (f *EventFilter) Update(e event.UpdateEvent) bool
Update implements predicate.Predicate.
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
EventHandler watches SparkApplication events.
func NewSparkApplicationEventHandler ¶
func NewSparkApplicationEventHandler(metrics *metrics.SparkApplicationMetrics) *EventHandler
NewSparkApplicationEventHandler creates a new SparkApplicationEventHandler instance.
func (*EventHandler) Create ¶
func (h *EventHandler) Create(ctx context.Context, event event.CreateEvent, queue workqueue.RateLimitingInterface)
Create implements handler.EventHandler.
func (*EventHandler) Delete ¶
func (h *EventHandler) Delete(ctx context.Context, event event.DeleteEvent, queue workqueue.RateLimitingInterface)
Delete implements handler.EventHandler.
func (*EventHandler) Generic ¶
func (h *EventHandler) Generic(ctx context.Context, event event.GenericEvent, queue workqueue.RateLimitingInterface)
Generic implements handler.EventHandler.
func (*EventHandler) Update ¶
func (h *EventHandler) Update(ctx context.Context, event event.UpdateEvent, queue workqueue.RateLimitingInterface)
Update implements handler.EventHandler.
type Options ¶
type Options struct { Namespaces []string EnableUIService bool IngressClassName string IngressURLFormat string DefaultBatchScheduler string KubeSchedulerNames []string SparkApplicationMetrics *metrics.SparkApplicationMetrics SparkExecutorMetrics *metrics.SparkExecutorMetrics MaxTrackedExecutorPerApp int }
Options defines the options of the controller.
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler reconciles a SparkApplication object.
func NewReconciler ¶
func NewReconciler( manager ctrl.Manager, scheme *runtime.Scheme, client client.Client, recorder record.EventRecorder, registry *scheduler.Registry, options Options, ) *Reconciler
NewReconciler creates a new Reconciler instance.
func (*Reconciler) Reconcile ¶
Reconcile handles Create, Update and Delete events of the custom resource. State Machine for SparkApplication: +--------------------------------------------------------------------------------------------------------------------+ | +---------------------------------------------------------------------------------------------+ | | | +----------+ | | | | | | | | | | | | | | | | |Submission| | | | | +----> Failed +----+------------------------------------------------------------------+ | | | | | | | | | | | | | | | | | | | | | | | +----^-----+ | +-----------------------------------------+ | | | | | | | | | | | | | | | | | | | | | | | | +-+--+----+ | +-----v--+-+ +----------+ +-----v-----+ +----v--v--+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New +---------> Submitted+----------> Running +-----------> Failing +----------> Failed | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------+ | +----^-----+ +-----+----+ +-----+-----+ +----------+ | | | | | | | | | | | | | | +------------+ | | +-------------------------------+ | | | | | +-----+-----+ | | +-----------+ +----------+ | | | | | | Pending | | | | | | | | | | | +---+ Rerun <-------+ +---------------->Succeeding +---------->Completed | | | |Invalidating| | <-------+ | | | | | | | +-------> | | | | | | | | | | | | | | | | | | | | | +-----------+ | +-----+-----+ +----------+ | | +------------+ | | | | | | | | +-------------------------------+ | | | +--------------------------------------------------------------------------------------------------------------------+
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, options controller.Options) error
SetupWithManager sets up the controller with the Manager.
type SparkIngress ¶
type SparkIngress struct {
// contains filtered or unexported fields
}
SparkIngress encapsulates information about the driver UI ingress.
type SparkPodEventHandler ¶
type SparkPodEventHandler struct {
// contains filtered or unexported fields
}
SparkPodEventHandler watches Spark pods and update the SparkApplication objects accordingly.
func NewSparkPodEventHandler ¶
func NewSparkPodEventHandler(client client.Client, metrics *metrics.SparkExecutorMetrics) *SparkPodEventHandler
NewSparkPodEventHandler creates a new sparkPodEventHandler instance.
func (*SparkPodEventHandler) Create ¶
func (h *SparkPodEventHandler) Create(ctx context.Context, event event.CreateEvent, queue workqueue.RateLimitingInterface)
Create implements handler.EventHandler.
func (*SparkPodEventHandler) Delete ¶
func (h *SparkPodEventHandler) Delete(ctx context.Context, event event.DeleteEvent, queue workqueue.RateLimitingInterface)
Delete implements handler.EventHandler.
func (*SparkPodEventHandler) Generic ¶
func (h *SparkPodEventHandler) Generic(ctx context.Context, event event.GenericEvent, queue workqueue.RateLimitingInterface)
Generic implements handler.EventHandler.
func (*SparkPodEventHandler) Update ¶
func (h *SparkPodEventHandler) Update(ctx context.Context, event event.UpdateEvent, queue workqueue.RateLimitingInterface)
Update implements handler.EventHandler.
type SparkService ¶
type SparkService struct {
// contains filtered or unexported fields
}
SparkService encapsulates information about the driver UI service.
type Validator ¶
type Validator struct{}
func (*Validator) ValidateCreate ¶
ValidateCreate implements admission.CustomValidator.
func (*Validator) ValidateDelete ¶
ValidateDelete implements admission.CustomValidator.