controllers

package
v0.106.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DestinationReconciler added in v0.0.5

type DestinationReconciler struct {
	Client    client.Client
	Log       logr.Logger
	Scheduler *Scheduler
}

DestinationReconciler reconciles a Destination object

func (*DestinationReconciler) Reconcile added in v0.0.5

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

func (*DestinationReconciler) SetupWithManager added in v0.0.5

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

SetupWithManager sets up the controller with the Manager.

type DynamicResourceRequestController added in v0.10.0

type DynamicResourceRequestController struct {
	//use same naming conventions as other controllers
	Client                      client.Client
	GVK                         *schema.GroupVersionKind
	Scheme                      *runtime.Scheme
	PromiseIdentifier           string
	ConfigurePipelines          []v1alpha1.Pipeline
	DeletePipelines             []v1alpha1.Pipeline
	Log                         logr.Logger
	UID                         string
	Enabled                     *bool
	CRD                         *apiextensionsv1.CustomResourceDefinition
	PromiseDestinationSelectors []v1alpha1.PromiseScheduling
	CanCreateResources          *bool
}

func (*DynamicResourceRequestController) Reconcile added in v0.10.0

type Manager added in v0.10.0

type Manager interface {
	kmanager.Manager
}

type PromiseReconciler

type PromiseReconciler struct {
	Scheme                    *runtime.Scheme
	Client                    client.Client
	ApiextensionsClient       apiextensionsv1cs.CustomResourceDefinitionsGetter
	Log                       logr.Logger
	Manager                   ctrl.Manager
	StartedDynamicControllers map[string]*DynamicResourceRequestController
	RestartManager            func()
}

PromiseReconciler reconciles a Promise object

func (*PromiseReconciler) Reconcile

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

func (*PromiseReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type PromiseReleaseReconciler added in v0.1.0

type PromiseReleaseReconciler struct {
	client.Client
	Scheme         *runtime.Scheme
	Log            logr.Logger
	PromiseFetcher v1alpha1.PromiseFetcher
	EventRecorder  record.EventRecorder
}

PromiseReleaseReconciler reconciles a PromiseRelease object

func (*PromiseReleaseReconciler) Reconcile added in v0.1.0

func (*PromiseReleaseReconciler) SetupWithManager added in v0.1.0

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

SetupWithManager sets up the controller with the Manager.

type Scheduler

type Scheduler struct {
	Client client.Client
	Log    logr.Logger
}

func (*Scheduler) ReconcileAllDependencyWorks added in v0.6.0

func (s *Scheduler) ReconcileAllDependencyWorks() error

Reconciles all Works by scheduling each Work's WorkloadGroups to appropriate Destinations. Only reconciles Works that are from a Promise Dependency.

func (*Scheduler) ReconcileWork

func (s *Scheduler) ReconcileWork(work *v1alpha1.Work) ([]string, error)

Reconciles all WorkloadGroups in a Work by scheduling them to Destinations via Workplacements.

type StateFile added in v0.93.0

type StateFile struct {
	Files []string `json:"files"`
}

type StateStore added in v0.0.5

type StateStore interface {
	client.Object
	GetSecretRef() *v1.SecretReference
}

type WorkPlacementReconciler

type WorkPlacementReconciler struct {
	Client client.Client
	Log    logr.Logger

	VersionCache map[string]string
}

WorkPlacementReconciler reconciles a WorkPlacement object

func (*WorkPlacementReconciler) Reconcile

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

func (*WorkPlacementReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type WorkReconciler

type WorkReconciler struct {
	Client    client.Client
	Log       logr.Logger
	Scheduler WorkScheduler
	Disabled  bool
}

WorkReconciler reconciles a Work object

func (*WorkReconciler) Reconcile

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

func (*WorkReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type WorkScheduler added in v0.10.0

type WorkScheduler interface {
	ReconcileWork(work *v1alpha1.Work) ([]string, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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