pipelines

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: BSD-3-Clause Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppLabel = "app"
)
View Source
const PipelineRootStorageEnvVar = "PIPELINEROOTSTORAGE"
View Source
const ProviderNameEnvVar = "PROVIDERNAME"

Variables

View Source
var EventReasons = struct {
	Syncing    string
	Synced     string
	SyncFailed string
}{
	Syncing:    "Syncing",
	Synced:     "Synced",
	SyncFailed: "SyncFailed",
}
View Source
var EventTypes = struct {
	Normal  string
	Warning string
}{
	Warning: "Warning",
	Normal:  "Normal",
}
View Source
var StateHandlerConstants = struct {
	ProviderChangedError string
}{
	ProviderChangedError: "the provider has changed",
}
View Source
var WorkflowRepositoryConstants = struct {
	WorkflowProcessedLabel string
}{
	WorkflowProcessedLabel: pipelineshub.GroupVersion.Group + "/processed",
}

Functions

This section is empty.

Types

type AcquireResource added in v0.0.3

type AcquireResource struct {
}

type Command

type Command interface {
	// contains filtered or unexported methods
}

type CreateWorkflow

type CreateWorkflow struct {
	Workflow argo.Workflow
}

type DependingOnPipelineReconciler added in v0.3.0

type DependingOnPipelineReconciler[R DependingOnPipelineResource] struct {
	EC K8sExecutionContext
}

type DependingOnPipelineResource added in v0.3.0

type DependingOnPipelineResource interface {
	client.Object
	GetPipeline() pipelineshub.PipelineIdentifier
	GetObservedPipelineVersion() string
	SetObservedPipelineVersion(string)
}

type DependingOnRunConfigurationReconciler added in v0.4.0

type DependingOnRunConfigurationReconciler[R DependingOnRunConfigurationResource] struct {
	EC K8sExecutionContext
}

type DependingOnRunConfigurationResource added in v0.4.0

type DependingOnRunConfigurationResource interface {
	client.Object
	GetReferencedRCs() []common.NamespacedName
	GetReferencedRCArtifacts() []pipelineshub.RunConfigurationRef
	GetDependencyRuns() map[string]pipelineshub.RunReference
	SetDependencyRuns(map[string]pipelineshub.RunReference)
}

type DeploymentManager added in v0.7.0

type DeploymentManager struct {
	// contains filtered or unexported fields
}

func (DeploymentManager) Construct added in v0.7.0

func (dm DeploymentManager) Construct(provider *pipelineshub.Provider) (*appsv1.Deployment, error)

func (DeploymentManager) Create added in v0.7.0

func (DeploymentManager) Equal added in v0.7.0

func (dm DeploymentManager) Equal(a, b *appsv1.Deployment) bool

func (DeploymentManager) Get added in v0.7.0

func (DeploymentManager) Update added in v0.7.0

type DeploymentResourceManager added in v0.7.0

type DeploymentResourceManager interface {
	Create(ctx context.Context, new *appsv1.Deployment, owner *pipelineshub.Provider) error
	Update(ctx context.Context, old, new *appsv1.Deployment, owner *pipelineshub.Provider) error
	Get(ctx context.Context, owner *pipelineshub.Provider) (*appsv1.Deployment, error)
	Equal(a, b *appsv1.Deployment) bool
	Construct(provider *pipelineshub.Provider) (*appsv1.Deployment, error)
}

type ExperimentReconciler added in v0.0.3

type ExperimentReconciler struct {
	StateHandler[*pipelineshub.Experiment]
	ResourceReconciler[*pipelineshub.Experiment]
	ServiceManager ServiceResourceManager
}

ExperimentReconciler reconciles a Experiment object

func NewExperimentReconciler added in v0.4.0

func NewExperimentReconciler(
	ec K8sExecutionContext,
	workflowRepository WorkflowRepository,
	config config.KfpControllerConfigSpec,
) *ExperimentReconciler

func (*ExperimentReconciler) Reconcile added in v0.0.3

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

func (*ExperimentReconciler) SetupWithManager added in v0.0.3

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

type IdVerifier added in v0.3.0

type IdVerifier struct {
	SuccessState apis.SynchronizationState
	FailureState apis.SynchronizationState
	VerifyId     func(string) error
}

type K8sExecutionContext added in v0.0.3

type K8sExecutionContext struct {
	Client             controllers.OptInClient
	Recorder           record.EventRecorder
	Scheme             *runtime.Scheme
	WorkflowRepository WorkflowRepository
}

type MarkWorkflowsAsProcessed added in v0.3.0

type MarkWorkflowsAsProcessed struct {
	Workflows []argo.Workflow
}

type PipelineReconciler

type PipelineReconciler struct {
	StateHandler[*pipelineshub.Pipeline]
	ResourceReconciler[*pipelineshub.Pipeline]
	ServiceManager ServiceResourceManager
}

func NewPipelineReconciler added in v0.4.0

func NewPipelineReconciler(
	ec K8sExecutionContext,
	workflowRepository WorkflowRepository,
	config config.KfpControllerConfigSpec,
) *PipelineReconciler

func (*PipelineReconciler) Reconcile

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

func (*PipelineReconciler) SetupWithManager

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

type ProviderLoader added in v0.7.0

type ProviderLoader interface {
	LoadProvider(
		ctx context.Context,
		desiredProvider common.NamespacedName,
	) (pipelineshub.Provider, error)
}

type ProviderReconciler added in v0.7.0

type ProviderReconciler struct {
	ProviderLoader    ProviderLoader
	DeploymentManager DeploymentResourceManager
	ServiceManager    ServiceResourceManager
	StatusManager     ProviderStatusManager
}

func NewProviderReconciler added in v0.7.0

func NewProviderReconciler(ec K8sExecutionContext, config config.KfpControllerConfigSpec) *ProviderReconciler

func (*ProviderReconciler) Reconcile added in v0.7.0

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

func (*ProviderReconciler) SetupWithManager added in v0.7.0

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

type ProviderStatusManager added in v0.7.0

type ProviderStatusManager interface {
	UpdateProviderStatus(ctx context.Context, provider *pipelineshub.Provider, state apis.SynchronizationState, message string) error
}

type ReleaseResource added in v0.0.3

type ReleaseResource struct {
}

type ResourceReconciler added in v0.4.0

type ResourceReconciler[R pipelineshub.Resource] struct {
	EC     K8sExecutionContext
	Config config.KfpControllerConfigSpec
}

func (ResourceReconciler[R]) LoadProvider added in v0.7.0

func (br ResourceReconciler[R]) LoadProvider(
	ctx context.Context,
	desiredProvider common.NamespacedName,
) (pipelineshub.Provider, error)

type RunConfigurationReconciler added in v0.0.2

RunConfigurationReconciler reconciles a RunConfiguration object

func NewRunConfigurationReconciler added in v0.4.0

func NewRunConfigurationReconciler(
	ec K8sExecutionContext,
	config config.KfpControllerConfigSpec,
) *RunConfigurationReconciler

func (*RunConfigurationReconciler) Reconcile added in v0.0.2

func (*RunConfigurationReconciler) SetupWithManager added in v0.0.2

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

type RunReconciler added in v0.3.0

RunReconciler reconciles a Run object

func NewRunReconciler added in v0.4.0

func NewRunReconciler(
	ec K8sExecutionContext,
	workflowRepository WorkflowRepository,
	config config.KfpControllerConfigSpec,
) *RunReconciler

func (*RunReconciler) Reconcile added in v0.3.0

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

func (*RunReconciler) SetupWithManager added in v0.3.0

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

type RunScheduleReconciler added in v0.4.0

RunScheduleReconciler reconciles a RunSchedule object

func NewRunScheduleReconciler added in v0.4.0

func NewRunScheduleReconciler(
	ec K8sExecutionContext,
	workflowRepository WorkflowRepository,
	config config.KfpControllerConfigSpec,
) *RunScheduleReconciler

func (*RunScheduleReconciler) Reconcile added in v0.4.0

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

func (*RunScheduleReconciler) SetupWithManager added in v0.4.0

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

type ServiceManager added in v0.7.0

type ServiceManager struct {
	// contains filtered or unexported fields
}

func (ServiceManager) Construct added in v0.7.0

func (sm ServiceManager) Construct(provider *pipelineshub.Provider) *corev1.Service

func (ServiceManager) Create added in v0.7.0

func (sm ServiceManager) Create(ctx context.Context, new *corev1.Service, provider *pipelineshub.Provider) error

func (ServiceManager) Delete added in v0.7.0

func (sm ServiceManager) Delete(ctx context.Context, old *corev1.Service) error

func (ServiceManager) Equal added in v0.7.0

func (sm ServiceManager) Equal(a, b *corev1.Service) bool

func (ServiceManager) Get added in v0.7.0

type ServiceResourceManager added in v0.7.0

type ServiceResourceManager interface {
	Create(ctx context.Context, new *corev1.Service, provider *pipelineshub.Provider) error
	Delete(ctx context.Context, old *corev1.Service) error
	Get(ctx context.Context, owner *pipelineshub.Provider) (*corev1.Service, error)
	Equal(a, b *corev1.Service) bool
	Construct(provider *pipelineshub.Provider) *corev1.Service
}

type SetStatus added in v0.0.3

type SetStatus struct {
	Status pipelineshub.Status
}

func From added in v0.0.3

func From(status pipelineshub.Status) *SetStatus

func NewSetStatus added in v0.0.3

func NewSetStatus() *SetStatus

func (*SetStatus) WithProvider added in v0.7.0

func (sps *SetStatus) WithProvider(providerId pipelineshub.ProviderAndId) *SetStatus

func (*SetStatus) WithSyncStateCondition added in v0.7.0

func (sps *SetStatus) WithSyncStateCondition(state apis.SynchronizationState, time metav1.Time, message string) *SetStatus

func (*SetStatus) WithVersion added in v0.0.3

func (sps *SetStatus) WithVersion(version string) *SetStatus

type StateHandler

type StateHandler[R pipelineshub.Resource] struct {
	WorkflowFactory    workflowfactory.WorkflowFactory[R]
	WorkflowRepository WorkflowRepository
}

func (*StateHandler[R]) StateTransition

func (st *StateHandler[R]) StateTransition(
	ctx context.Context,
	provider pipelineshub.Provider,
	providerSvc corev1.Service,
	resource R,
) []Command

type StatusManager added in v0.7.0

type StatusManager struct {
	// contains filtered or unexported fields
}

func (StatusManager) UpdateProviderStatus added in v0.7.0

func (sm StatusManager) UpdateProviderStatus(ctx context.Context, provider *pipelineshub.Provider, state apis.SynchronizationState, message string) error

type WorkflowRepository

type WorkflowRepository interface {
	CreateWorkflowForResource(ctx context.Context, workflow *argo.Workflow, resource pipelineshub.Resource) error
	GetByLabels(ctx context.Context, matchingLabels map[string]string) []argo.Workflow
	MarkWorkflowAsProcessed(ctx context.Context, workflow *argo.Workflow) error
}

type WorkflowRepositoryImpl

type WorkflowRepositoryImpl struct {
	Client controllers.OptInClient
	Config config.KfpControllerConfigSpec
	Scheme *runtime.Scheme
}

func (WorkflowRepositoryImpl) CreateWorkflowForResource added in v0.0.3

func (w WorkflowRepositoryImpl) CreateWorkflowForResource(ctx context.Context, workflow *argo.Workflow, resource pipelineshub.Resource) error

func (WorkflowRepositoryImpl) GetByLabels added in v0.0.3

func (w WorkflowRepositoryImpl) GetByLabels(ctx context.Context, matchingLabels map[string]string) []argo.Workflow

func (WorkflowRepositoryImpl) MarkWorkflowAsProcessed added in v0.3.0

func (w WorkflowRepositoryImpl) MarkWorkflowAsProcessed(ctx context.Context, workflow *argo.Workflow) error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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