controllers

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PodNameKey is the key used for building an index where the key is the
	// pod name (without the random suffix), and the value is the pod itself.
	PodNameKey string = "podName"
)

Variables

This section is empty.

Functions

func GetSubdomain added in v0.3.2

func GetSubdomain(js *jobset.JobSet) string

func JobFinished added in v0.2.0

func JobFinished(job *batchv1.Job) (bool, batchv1.JobConditionType)

func SetupJobSetIndexes added in v0.3.0

func SetupJobSetIndexes(ctx context.Context, indexer client.FieldIndexer) error

func SetupPodIndexes added in v0.3.0

func SetupPodIndexes(ctx context.Context, indexer client.FieldIndexer) error

Types

type JobSetReconciler

type JobSetReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Record record.EventRecorder
	// contains filtered or unexported fields
}

JobSetReconciler reconciles a JobSet object

func NewJobSetReconciler

func NewJobSetReconciler(client client.Client, scheme *runtime.Scheme, record record.EventRecorder) *JobSetReconciler

func (*JobSetReconciler) Reconcile

func (r *JobSetReconciler) 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 (*JobSetReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type PodReconciler added in v0.3.0

type PodReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Record record.EventRecorder
}

PodReconciler reconciles a Pod owned by a JobSet using exclusive placement.

func NewPodReconciler added in v0.3.0

func NewPodReconciler(client client.Client, scheme *runtime.Scheme, record record.EventRecorder) *PodReconciler

func (*PodReconciler) Reconcile added in v0.3.0

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

Reconcile attempts to enforce that the pods that belong to the same job are scheduled on the same topology domain exclusively if the parent JobSet is using exclusive placement.

func (*PodReconciler) SetupWithManager added in v0.3.0

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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