controller

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GVK                = workloadv1beta2.GroupVersion.WithKind("AppWrapper")
	WorkloadReconciler = jobframework.NewGenericReconcilerFactory(func() jobframework.GenericJob { return &AppWrapper{} })
)

Functions

This section is empty.

Types

type AppWrapper

type AppWrapper workloadv1beta2.AppWrapper

func (*AppWrapper) Finished

func (aw *AppWrapper) Finished() (metav1.Condition, bool)

func (*AppWrapper) GVK

func (*AppWrapper) IsActive

func (aw *AppWrapper) IsActive() bool

func (*AppWrapper) IsSuspended

func (aw *AppWrapper) IsSuspended() bool

func (*AppWrapper) Object

func (aw *AppWrapper) Object() client.Object

func (*AppWrapper) PodSets

func (aw *AppWrapper) PodSets() []kueue.PodSet

func (*AppWrapper) PodsReady

func (aw *AppWrapper) PodsReady() bool

func (*AppWrapper) RestorePodSetsInfo

func (aw *AppWrapper) RestorePodSetsInfo(podSetsInfo []podset.PodSetInfo) bool

RestorePodSetsInfo updates aw.Spec.Components to restore the labels, annotations, nodeSelectors, and tolerations from podSetsInfo

func (*AppWrapper) RunWithPodSetsInfo

func (aw *AppWrapper) RunWithPodSetsInfo(podSetsInfo []podset.PodSetInfo) error

RunWithPodSetsInfo injects awLabels and Kueue's PodSetInfo into each nested PodTemplateSpec and sets aw.spec.Suspend to false

func (*AppWrapper) Suspend

func (aw *AppWrapper) Suspend()

type AppWrapperConfig added in v0.3.0

type AppWrapperConfig struct {
	ManageJobsWithoutQueueName bool   `json:"manageJobsWithoutQueueName,omitempty"`
	ServiceAccountName         string `json:"serviceAccountName,omitempty"`
}

type AppWrapperReconciler

type AppWrapperReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Config *AppWrapperConfig
}

AppWrapperReconciler reconciles an appwrapper

func (*AppWrapperReconciler) Reconcile

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

Reconcile reconciles an appwrapper Please see aw-states for documentation of this method.

func (*AppWrapperReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type AppWrapperWebhook

type AppWrapperWebhook struct {
	Config                *AppWrapperConfig
	SubjectAccessReviewer authClientv1.SubjectAccessReviewInterface
	DiscoveryClient       *discovery.DiscoveryClient
	// contains filtered or unexported fields
}

func (*AppWrapperWebhook) Default

func (w *AppWrapperWebhook) Default(ctx context.Context, obj runtime.Object) error

Default ensures that Suspend is set appropriately when an AppWrapper is created

func (*AppWrapperWebhook) SetupWebhookWithManager added in v0.3.0

func (wh *AppWrapperWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*AppWrapperWebhook) ValidateCreate

func (w *AppWrapperWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)

ValidateCreate validates invariants when an AppWrapper is created

func (*AppWrapperWebhook) ValidateDelete

ValidateDelete is a noop for us, but is required to implement the CustomValidator interface

func (*AppWrapperWebhook) ValidateUpdate

func (w *AppWrapperWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)

ValidateUpdate validates invariants when an AppWrapper is updated

Jump to

Keyboard shortcuts

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