controllers

package
v0.0.0-...-78176ad Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MediaProcessingEntityControllerName        = "nagare-media-engine-mediaprocessingentity-controller"
	ClusterMediaProcessingEntityControllerName = "nagare-media-engine-clustermediaprocessingentity-controller"
)
View Source
const (
	WorkflowManagerHelperDataVolume          = "nagare-media-engine-workflow-manager-helper-data"
	WorkflowManagerHelperDataVolumeMountPath = "/run/secrets/engine.nagare.media/task"
	WorkflowManagerHelperDataFileName        = "data.json"
)
View Source
const (
	ResourcePrefix           = "task-"
	HTTPStreamTargetPortName = "stream-http"
)
View Source
const (
	JobControllerName = "nagare-media-engine-job-controller"
)
View Source
const (
	TaskControllerName = "nagare-media-engine-task-controller"
)
View Source
const (
	WorkflowControllerName = "nagare-media-engine-workflow-controller"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	client.Client

	IsRemote() bool
	IsLocal() bool
	Namespace() string
}

type EnsureFunc

type EnsureFunc[T any] func(context.Context, T) (Result, error)

type JobReconciler

type JobReconciler struct {
	client.Client
	APIReader client.Reader

	Config                   *enginev1.WorkflowManagerConfig
	Scheme                   *runtime.Scheme
	EventChannel             chan<- event.GenericEvent
	MediaProcessingEntityRef *meta.ObjectReference
}

JobReconciler reconciles Job objects

func (*JobReconciler) Name

func (r *JobReconciler) Name() string

func (*JobReconciler) Reconcile

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

func (*JobReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type Manager

type Manager interface {
	manager.Manager

	IsRemote() bool
	IsLocal() bool
	Namespace() string
}

type MediaProcessingEntityReconciler

type MediaProcessingEntityReconciler struct {
	client.Client
	APIReader client.Reader

	Config          *enginev1.WorkflowManagerConfig
	Scheme          *runtime.Scheme
	LocalRESTConfig *rest.Config
	ManagerOptions  manager.Options
	JobEventChannel chan<- event.GenericEvent
	// contains filtered or unexported fields
}

MediaProcessingEntityReconciler reconciles MediaProcessingEntities and ClusterMediaProcessingEntities objects

func (*MediaProcessingEntityReconciler) GetClient

func (*MediaProcessingEntityReconciler) GetManager

func (*MediaProcessingEntityReconciler) SetupWithManager

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

TODO: emit Kubernetes events SetupWithManager sets up the controller with the Manager.

type Result

type Result struct {
	Requeue      bool
	RequeueAfter time.Duration
	Stop         bool
}

func ApplyEnsureFuncs

func ApplyEnsureFuncs[T any](ctx context.Context, obj T, funcs []EnsureFunc[T]) (Result, error)

func (*Result) ReconcileResult

func (r *Result) ReconcileResult() reconcile.Result

type TaskReconciler

type TaskReconciler struct {
	client.Client
	APIReader client.Reader

	Config                          *enginev1.WorkflowManagerConfig
	Scheme                          *runtime.Scheme
	JobEventChannel                 <-chan event.GenericEvent
	MediaProcessingEntityReconciler *MediaProcessingEntityReconciler
	// contains filtered or unexported fields
}

TaskReconciler reconciles a Task object

func (*TaskReconciler) Reconcile

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

func (*TaskReconciler) SetupWithManager

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

TODO: set HumanReadable from task template if unset TODO: emit Kubernetes events SetupWithManager sets up the controller with the Manager.

type WorkflowReconciler

type WorkflowReconciler struct {
	client.Client
	APIReader client.Reader

	Config *enginev1.WorkflowManagerConfig
	Scheme *runtime.Scheme
}

WorkflowReconciler reconciles a Workflow object

func (*WorkflowReconciler) Reconcile

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

func (*WorkflowReconciler) SetupWithManager

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

TODO: emit Kubernetes events 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