Documentation
¶
Overview ¶
Package workflowpipeline provides workflow rendering by combining CRs and evaluating CEL expressions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlowStyleArray ¶
type FlowStyleArray []any
FlowStyleArray wraps arrays for flow-style YAML rendering (e.g., [1, 2, 3]).
func (FlowStyleArray) MarshalYAML ¶
func (f FlowStyleArray) MarshalYAML() (interface{}, error)
MarshalYAML implements yaml.Marshaler for flow-style array rendering.
func (FlowStyleArray) String ¶
func (f FlowStyleArray) String() string
String returns the flow-style string representation for debugging.
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline orchestrates workflow rendering by combining WorkflowRun, Workflow, and ComponentType to generate fully resolved resources (e.g., Argo Workflow).
func NewPipeline ¶
func NewPipeline() *Pipeline
NewPipeline creates a new workflow rendering pipeline.
func (*Pipeline) Render ¶
func (p *Pipeline) Render(input *RenderInput) (*RenderOutput, error)
Render orchestrates the complete workflow rendering process. It validates input, builds CEL context, renders the template, and validates output.
type RenderInput ¶
type RenderInput struct {
// WorkflowRun is the workflow execution instance with developer parameters (required).
WorkflowRun *v1alpha1.WorkflowRun
// Workflow contains the schema and resource template (required).
Workflow *v1alpha1.Workflow
// ComponentType provides component-type-specific configuration (optional).
ComponentType *v1alpha1.ComponentType
// Context provides workflow execution context metadata (required).
Context WorkflowContext
}
RenderInput contains all required inputs for workflow rendering.
type RenderMetadata ¶
type RenderMetadata struct {
// Warnings lists non-fatal issues encountered during rendering.
Warnings []string
}
RenderMetadata contains non-fatal information about the rendering process.
type RenderOutput ¶
type RenderOutput struct {
// Resource is the fully rendered workflow resource as a map that can be converted
// to unstructured.Unstructured for Kubernetes API operations.
Resource map[string]any
// Metadata contains rendering process information such as warnings.
Metadata *RenderMetadata
}
RenderOutput contains the rendered workflow resource and associated metadata.
type WorkflowContext ¶
type WorkflowContext struct {
// OrgName is the organization name (typically the namespace).
OrgName string
// ProjectName is the project name from the workflow owner.
ProjectName string
// ComponentName is the component name from the workflow owner.
ComponentName string
// WorkflowRunName is the name of the workflow run CR.
WorkflowRunName string
// Timestamp is the Unix timestamp when rendering started (auto-generated).
Timestamp int64
// UUID is a short unique identifier (8 chars) for this workflow execution (auto-generated).
UUID string
}
WorkflowContext provides contextual metadata for workflow rendering. These values are injected into CEL expressions as ${ctx.*} variables.