Documentation ¶
Index ¶
- Variables
- func CommonWorkflowLabels(owner pipelinesv1.Resource) map[string]string
- func NamedValuesToMap(namedValues []apis.NamedValue) map[string]string
- func NamedValuesToMultiMap(namedValues []apis.NamedValue) map[string][]string
- type AcquireResource
- type Command
- type CreateWorkflow
- type DependingOnPipelineReconciler
- type DependingOnPipelineResource
- type DependingOnRunConfigurationReconciler
- type DependingOnRunConfigurationResource
- type ExperimentDefinitionCreator
- type ExperimentReconciler
- type IdVerifier
- type K8sExecutionContext
- type MarkWorkflowsAsProcessed
- type PipelineDefinitionCreator
- type PipelineReconciler
- type ReleaseResource
- type ResourceReconciler
- type ResourceWorkflowFactory
- func ExperimentWorkflowFactory(config config.Configuration) ...
- func PipelineWorkflowFactory(config config.Configuration) *ResourceWorkflowFactory[*pipelinesv1.Pipeline, providers.PipelineDefinition]
- func RunScheduleWorkflowFactory(config config.Configuration) ...
- func RunWorkflowFactory(config config.Configuration) *ResourceWorkflowFactory[*pipelinesv1.Run, providers.RunDefinition]
- func (workflows ResourceWorkflowFactory[R, ResourceDefinition]) CommonWorkflowMeta(owner pipelinesv1.Resource) *metav1.ObjectMeta
- func (workflows *ResourceWorkflowFactory[R, ResourceDefinition]) ConstructCreationWorkflow(provider string, resource R) (*argo.Workflow, error)
- func (workflows *ResourceWorkflowFactory[R, ResourceDefinition]) ConstructDeletionWorkflow(provider string, resource R) (*argo.Workflow, error)
- func (workflows *ResourceWorkflowFactory[R, ResourceDefinition]) ConstructUpdateWorkflow(provider string, resource R) (*argo.Workflow, error)
- type RunConfigurationReconciler
- type RunDefinitionCreator
- type RunReconciler
- type RunScheduleDefinitionCreator
- type RunScheduleReconciler
- type SetStatus
- type StateHandler
- type SuffixedTemplateNameGenerator
- type TemplateNameGenerator
- type WorkflowFactory
- type WorkflowRepository
- type WorkflowRepositoryImpl
- func (w WorkflowRepositoryImpl) CreateWorkflowForResource(ctx context.Context, workflow *argo.Workflow, resource pipelinesv1.Resource) error
- func (w WorkflowRepositoryImpl) GetByLabels(ctx context.Context, matchingLabels map[string]string) []argo.Workflow
- func (w WorkflowRepositoryImpl) MarkWorkflowAsProcessed(ctx context.Context, workflow *argo.Workflow) error
Constants ¶
This section is empty.
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 LogKeys = struct { Workflow string Command string Duration string Status string OldStatus string NewStatus string }{ Workflow: "workflow", Command: "command", Duration: "duration", Status: "status", OldStatus: "oldStatus", NewStatus: "newStatus", }
View Source
var RunConfigurationConstants = struct { RunConfigurationNameLabelKey string }{ RunConfigurationNameLabelKey: apis.Group + "/runconfiguration.name", }
View Source
var StateHandlerConstants = struct { ProviderChangedError string }{ ProviderChangedError: "the provider has changed", }
View Source
var WorkflowConstants = struct { OwnerKindLabelKey string OwnerNameLabelKey string OwnerNamespaceLabelKey string ConstructionFailedError string ProviderNameParameterName string ProviderOutputParameterName string ResourceKindParameterName string ResourceDefinitionParameterName string ResourceIdParameterName string }{ OwnerKindLabelKey: apis.Group + "/owner.kind", OwnerNameLabelKey: apis.Group + "/owner.name", OwnerNamespaceLabelKey: apis.Group + "/owner.namespace", ConstructionFailedError: "error constructing workflow", ProviderNameParameterName: "provider-name", ProviderOutputParameterName: "provider-output", ResourceKindParameterName: "resource-kind", ResourceDefinitionParameterName: "resource-definition", ResourceIdParameterName: "resource-id", }
View Source
var WorkflowRepositoryConstants = struct { WorkflowProcessedLabel string }{ WorkflowProcessedLabel: pipelinesv1.GroupVersion.Group + "/processed", }
Functions ¶
func CommonWorkflowLabels ¶ added in v0.1.0
func CommonWorkflowLabels(owner pipelinesv1.Resource) map[string]string
func NamedValuesToMap ¶ added in v0.2.0
func NamedValuesToMap(namedValues []apis.NamedValue) map[string]string
func NamedValuesToMultiMap ¶ added in v0.2.0
func NamedValuesToMultiMap(namedValues []apis.NamedValue) map[string][]string
Types ¶
type AcquireResource ¶ added in v0.0.3
type AcquireResource struct { }
type CreateWorkflow ¶
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() pipelinesv1.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() []string GetReferencedRCArtifacts() []pipelinesv1.RunConfigurationRef GetDependencyRuns() map[string]pipelinesv1.RunReference SetDependencyRuns(map[string]pipelinesv1.RunReference) }
type ExperimentDefinitionCreator ¶ added in v0.3.0
type ExperimentDefinitionCreator struct {
Config config.Configuration
}
type ExperimentReconciler ¶ added in v0.0.3
type ExperimentReconciler struct { StateHandler[*pipelinesv1.Experiment] ResourceReconciler[*pipelinesv1.Experiment] }
ExperimentReconciler reconciles a Experiment object
func NewExperimentReconciler ¶ added in v0.4.0
func NewExperimentReconciler(ec K8sExecutionContext, workflowRepository WorkflowRepository, config config.Configuration) *ExperimentReconciler
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 PipelineDefinitionCreator ¶ added in v0.3.0
type PipelineDefinitionCreator struct {
Config config.Configuration
}
type PipelineReconciler ¶
type PipelineReconciler struct { StateHandler[*pipelinesv1.Pipeline] ResourceReconciler[*pipelinesv1.Pipeline] }
func NewPipelineReconciler ¶ added in v0.4.0
func NewPipelineReconciler(ec K8sExecutionContext, workflowRepository WorkflowRepository, config config.Configuration) *PipelineReconciler
func (*PipelineReconciler) SetupWithManager ¶
func (r *PipelineReconciler) SetupWithManager(mgr ctrl.Manager) error
type ReleaseResource ¶ added in v0.0.3
type ReleaseResource struct { }
type ResourceReconciler ¶ added in v0.4.0
type ResourceReconciler[R pipelinesv1.Resource] struct { EC K8sExecutionContext Config config.Configuration }
type ResourceWorkflowFactory ¶ added in v0.3.0
type ResourceWorkflowFactory[R pipelinesv1.Resource, ResourceDefinition any] struct { Config config.Configuration TemplateNameGenerator TemplateNameGenerator DefinitionCreator func(R) (ResourceDefinition, error) }
func ExperimentWorkflowFactory ¶ added in v0.0.3
func ExperimentWorkflowFactory(config config.Configuration) *ResourceWorkflowFactory[*pipelinesv1.Experiment, providers.ExperimentDefinition]
func PipelineWorkflowFactory ¶ added in v0.0.2
func PipelineWorkflowFactory(config config.Configuration) *ResourceWorkflowFactory[*pipelinesv1.Pipeline, providers.PipelineDefinition]
func RunScheduleWorkflowFactory ¶ added in v0.4.0
func RunScheduleWorkflowFactory(config config.Configuration) *ResourceWorkflowFactory[*pipelinesv1.RunSchedule, providers.RunScheduleDefinition]
func RunWorkflowFactory ¶ added in v0.3.0
func RunWorkflowFactory(config config.Configuration) *ResourceWorkflowFactory[*pipelinesv1.Run, providers.RunDefinition]
func (ResourceWorkflowFactory[R, ResourceDefinition]) CommonWorkflowMeta ¶ added in v0.3.0
func (workflows ResourceWorkflowFactory[R, ResourceDefinition]) CommonWorkflowMeta(owner pipelinesv1.Resource) *metav1.ObjectMeta
func (*ResourceWorkflowFactory[R, ResourceDefinition]) ConstructCreationWorkflow ¶ added in v0.3.0
func (workflows *ResourceWorkflowFactory[R, ResourceDefinition]) ConstructCreationWorkflow(provider string, resource R) (*argo.Workflow, error)
func (*ResourceWorkflowFactory[R, ResourceDefinition]) ConstructDeletionWorkflow ¶ added in v0.3.0
func (workflows *ResourceWorkflowFactory[R, ResourceDefinition]) ConstructDeletionWorkflow(provider string, resource R) (*argo.Workflow, error)
func (*ResourceWorkflowFactory[R, ResourceDefinition]) ConstructUpdateWorkflow ¶ added in v0.3.0
func (workflows *ResourceWorkflowFactory[R, ResourceDefinition]) ConstructUpdateWorkflow(provider string, resource R) (*argo.Workflow, error)
type RunConfigurationReconciler ¶ added in v0.0.2
type RunConfigurationReconciler struct { DependingOnPipelineReconciler[*pipelinesv1.RunConfiguration] DependingOnRunConfigurationReconciler[*pipelinesv1.RunConfiguration] EC K8sExecutionContext Scheme *runtime.Scheme Config config.Configuration }
RunConfigurationReconciler reconciles a RunConfiguration object
func NewRunConfigurationReconciler ¶ added in v0.4.0
func NewRunConfigurationReconciler(ec K8sExecutionContext, scheme *runtime.Scheme, config config.Configuration) *RunConfigurationReconciler
func (*RunConfigurationReconciler) SetupWithManager ¶ added in v0.0.2
func (r *RunConfigurationReconciler) SetupWithManager(mgr ctrl.Manager) error
type RunDefinitionCreator ¶ added in v0.3.0
type RunDefinitionCreator struct {
Config config.Configuration
}
type RunReconciler ¶ added in v0.3.0
type RunReconciler struct { EC K8sExecutionContext StateHandler[*pipelinesv1.Run] DependingOnPipelineReconciler[*pipelinesv1.Run] DependingOnRunConfigurationReconciler[*pipelinesv1.Run] ResourceReconciler[*pipelinesv1.Run] }
RunReconciler reconciles a Run object
func NewRunReconciler ¶ added in v0.4.0
func NewRunReconciler(ec K8sExecutionContext, workflowRepository WorkflowRepository, config config.Configuration) *RunReconciler
func (*RunReconciler) SetupWithManager ¶ added in v0.3.0
func (r *RunReconciler) SetupWithManager(mgr ctrl.Manager) error
type RunScheduleDefinitionCreator ¶ added in v0.4.0
type RunScheduleDefinitionCreator struct {
Config config.Configuration
}
type RunScheduleReconciler ¶ added in v0.4.0
type RunScheduleReconciler struct { StateHandler[*pipelinesv1.RunSchedule] ResourceReconciler[*pipelinesv1.RunSchedule] }
RunScheduleReconciler reconciles a RunSchedule object
func NewRunScheduleReconciler ¶ added in v0.4.0
func NewRunScheduleReconciler(ec K8sExecutionContext, workflowRepository WorkflowRepository, config config.Configuration) *RunScheduleReconciler
func (*RunScheduleReconciler) SetupWithManager ¶ added in v0.4.0
func (r *RunScheduleReconciler) SetupWithManager(mgr ctrl.Manager) error
type SetStatus ¶ added in v0.0.3
type SetStatus struct { Message string Status pipelinesv1.Status }
func From ¶ added in v0.0.3
func From(status pipelinesv1.Status) *SetStatus
func NewSetStatus ¶ added in v0.0.3
func NewSetStatus() *SetStatus
func (*SetStatus) WithMessage ¶ added in v0.0.3
func (*SetStatus) WithProviderId ¶ added in v0.3.0
func (sps *SetStatus) WithProviderId(providerId pipelinesv1.ProviderAndId) *SetStatus
func (*SetStatus) WithSynchronizationState ¶ added in v0.0.3
func (sps *SetStatus) WithSynchronizationState(state apis.SynchronizationState) *SetStatus
func (*SetStatus) WithVersion ¶ added in v0.0.3
type StateHandler ¶
type StateHandler[R pipelinesv1.Resource] struct { WorkflowFactory WorkflowFactory[R] WorkflowRepository WorkflowRepository }
func (*StateHandler[R]) StateTransition ¶
func (st *StateHandler[R]) StateTransition(ctx context.Context, provider string, resource R) []Command
type SuffixedTemplateNameGenerator ¶ added in v0.3.0
type SuffixedTemplateNameGenerator struct {
// contains filtered or unexported fields
}
func (SuffixedTemplateNameGenerator) CreateTemplate ¶ added in v0.3.0
func (ctng SuffixedTemplateNameGenerator) CreateTemplate() string
func (SuffixedTemplateNameGenerator) DeleteTemplate ¶ added in v0.3.0
func (ctng SuffixedTemplateNameGenerator) DeleteTemplate() string
func (SuffixedTemplateNameGenerator) UpdateTemplate ¶ added in v0.3.0
func (ctng SuffixedTemplateNameGenerator) UpdateTemplate() string
type TemplateNameGenerator ¶ added in v0.3.0
type TemplateNameGenerator interface { CreateTemplate() string UpdateTemplate() string DeleteTemplate() string }
func CompiledTemplateNameGenerator ¶ added in v0.3.0
func CompiledTemplateNameGenerator(config config.Configuration) TemplateNameGenerator
func SimpleTemplateNameGenerator ¶ added in v0.3.0
func SimpleTemplateNameGenerator(config config.Configuration) TemplateNameGenerator
type WorkflowFactory ¶
type WorkflowRepository ¶
type WorkflowRepository interface { CreateWorkflowForResource(ctx context.Context, workflow *argo.Workflow, resource pipelinesv1.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.Configuration Scheme *runtime.Scheme }
func (WorkflowRepositoryImpl) CreateWorkflowForResource ¶ added in v0.0.3
func (w WorkflowRepositoryImpl) CreateWorkflowForResource(ctx context.Context, workflow *argo.Workflow, resource pipelinesv1.Resource) error
func (WorkflowRepositoryImpl) GetByLabels ¶ added in v0.0.3
func (WorkflowRepositoryImpl) MarkWorkflowAsProcessed ¶ added in v0.3.0
Source Files ¶
- command.go
- depending_on_pipeline_reconciler.go
- depending_on_runconfiguration_reconciler.go
- experiment_controller.go
- experiment_workflow_factory.go
- logging.go
- pipeline_controller.go
- pipeline_workflow_factory.go
- reconciler.go
- resource_workflow_factory.go
- run_controller.go
- run_workflow_factory.go
- runconfiguration_controller.go
- runschedule_controller.go
- runschedule_workflow_factory.go
- state_handler.go
- workflow_factory_utils.go
- workflow_repository.go
- workflow_utils.go
Click to show internal directories.
Click to hide internal directories.