runs

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StoryRunFinalizer is the finalizer for StoryRun resources
	StoryRunFinalizer = "storyrun.bubustack.io/finalizer"
	// DefaultMaxInlineInputsSize is the default maximum size for inline inputs (5 KB).
	// This provides a safe fallback if webhooks are disabled and no operator config is set.
	// It's a balance between preventing etcd bloat and allowing reasonable input sizes.
	DefaultMaxInlineInputsSize = 5 * 1024
)
View Source
const (
	// StepRunFinalizer is the finalizer for StepRun resources
	StepRunFinalizer = "steprun.bubustack.io/finalizer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DAGReconciler

type DAGReconciler struct {
	client.Client
	CEL            *cel.Evaluator
	StepExecutor   *StepExecutor
	ConfigResolver *config.Resolver
}

DAGReconciler is responsible for the core workflow orchestration of a StoryRun.

func NewDAGReconciler

func NewDAGReconciler(k8sClient client.Client, celEval *cel.Evaluator, stepExecutor *StepExecutor, configResolver *config.Resolver) *DAGReconciler

NewDAGReconciler creates a new DAGReconciler.

func (*DAGReconciler) Reconcile

func (r *DAGReconciler) Reconcile(ctx context.Context, srun *runsv1alpha1.StoryRun, story *bubuv1alpha1.Story) (ctrl.Result, error)

Reconcile orchestrates the execution of the StoryRun's DAG.

type RBACManager

type RBACManager struct {
	client.Client
	Scheme *runtime.Scheme
}

RBACManager handles the reconciliation of RBAC resources for a StoryRun.

func NewRBACManager

func NewRBACManager(k8sClient client.Client, scheme *runtime.Scheme) *RBACManager

NewRBACManager creates a new RBACManager.

func (*RBACManager) Reconcile

func (r *RBACManager) Reconcile(ctx context.Context, storyRun *runsv1alpha1.StoryRun) error

Reconcile ensures the necessary ServiceAccount, Role, and RoleBinding exist for the StoryRun.

type StepExecutor

type StepExecutor struct {
	client.Client
	Scheme *runtime.Scheme
	CEL    *cel.Evaluator
}

StepExecutor is responsible for executing individual steps in a StoryRun.

func NewStepExecutor

func NewStepExecutor(k8sClient client.Client, scheme *runtime.Scheme, celEval *cel.Evaluator) *StepExecutor

NewStepExecutor creates a new StepExecutor.

func (*StepExecutor) Execute

func (e *StepExecutor) Execute(ctx context.Context, srun *runsv1alpha1.StoryRun, story *bubuv1alpha1.Story, step *bubuv1alpha1.Step, vars map[string]any) error

Execute determines the step type and calls the appropriate execution method.

type StepRunReconciler

type StepRunReconciler struct {
	config.ControllerDependencies
	Recorder record.EventRecorder
}

StepRunReconciler reconciles a StepRun object

func (*StepRunReconciler) Reconcile

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

func (*StepRunReconciler) SetupWithManager

func (r *StepRunReconciler) SetupWithManager(mgr ctrl.Manager, opts controller.Options) error

SetupWithManager sets up the controller with the Manager.

type StoryRunReconciler

type StoryRunReconciler struct {
	config.ControllerDependencies

	Recorder record.EventRecorder
	// contains filtered or unexported fields
}

StoryRunReconciler reconciles a StoryRun object

func (*StoryRunReconciler) Reconcile

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

func (*StoryRunReconciler) SetupWithManager

func (r *StoryRunReconciler) SetupWithManager(mgr ctrl.Manager, opts controller.Options) 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