batchcontrollers

package
v0.42.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchJobReconciler

type BatchJobReconciler struct {
	client.Client
	Config        BatchJobReconcilerConfig
	Log           logr.Logger
	AWS           *awslib.Client
	ClusterConfig *clusterconfig.Config
	Prometheus    promv1.API
	Scheme        *runtime.Scheme
}

BatchJobReconciler reconciles a BatchJob object

func (*BatchJobReconciler) ConvertControllerBatchToJobSpec added in v0.36.0

func (r *BatchJobReconciler) ConvertControllerBatchToJobSpec(batchJob batch.BatchJob, api spec.API, queueURL string) (spec.BatchJob, error)

func (*BatchJobReconciler) Reconcile

func (r *BatchJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*BatchJobReconciler) SetupWithManager

func (r *BatchJobReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type BatchJobReconcilerConfig

type BatchJobReconcilerConfig struct {
	GetTotalBatchCount func(r *BatchJobReconciler, batchJob batch.BatchJob) (int, error)
	GetMetrics         func(r *BatchJobReconciler, batchJob batch.BatchJob) (metrics.BatchMetrics, error)
	SaveJobMetrics     func(r *BatchJobReconciler, batchJob batch.BatchJob) error
	SaveJobStatus      func(r *BatchJobReconciler, batchJob batch.BatchJob) error
}

BatchJobReconcilerConfig reconciler config for the BatchJob kind. Allows for mocking specific methods

func (BatchJobReconcilerConfig) ApplyDefaults

ApplyDefaults sets the defaults for BatchJobReconcilerConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL