componentworkflowpipeline

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package componentworkflowpipeline provides component 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 ComponentWorkflowContext

type ComponentWorkflowContext struct {
	// NamespaceName is the namespace name.
	NamespaceName string

	// ProjectName is the project name from the component workflow owner.
	ProjectName string

	// ComponentName is the component name from the component workflow owner.
	ComponentName string

	// WorkflowRunName is the name of the component workflow run CR.
	WorkflowRunName string

	// GitSecret contains the git secret information extracted from SecretReference.
	// This is optional and only set if a secretRef is specified in the ComponentWorkflowRun.
	GitSecret *GitSecretInfo
}

ComponentWorkflowContext provides contextual metadata for component workflow rendering. These values are injected into CEL expressions as ${metadata.*} variables.

type GitSecretInfo added in v0.14.0

type GitSecretInfo struct {
	// Name is the name of the secret reference
	Name string

	// Type is the secret type (e.g., "kubernetes.io/basic-auth" or "kubernetes.io/ssh-auth")
	// retrieved from SecretReference spec.template.type
	Type string

	// Data contains the mapping of secret keys to external secret references
	// This allows supporting multiple data fields like username and password
	Data []SecretDataInfo
}

GitSecretInfo contains the resolved information from a SecretReference for use in templates.

type Pipeline

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

Pipeline orchestrates component workflow rendering by combining ComponentWorkflowRun, ComponentWorkflow to generate fully resolved resources (e.g., Argo Workflow).

func NewPipeline

func NewPipeline() *Pipeline

NewPipeline creates a new component workflow rendering pipeline.

func (*Pipeline) Render

func (p *Pipeline) Render(input *RenderInput) (*RenderOutput, error)

Render orchestrates the complete component workflow rendering process. It validates input, builds CEL context, renders the template, and validates output.

type RemoteRefInfo added in v0.14.0

type RemoteRefInfo struct {
	// Key is the path in the external secret store
	Key string

	// Property is the specific field within the secret (optional)
	Property string
}

RemoteRefInfo contains the remote reference information for a secret.

type RenderInput

type RenderInput struct {
	// ComponentWorkflowRun is the workflow execution instance with system and developer parameters (required).
	ComponentWorkflowRun *v1alpha1.ComponentWorkflowRun

	// ComponentWorkflow contains the schema and resource template (required).
	ComponentWorkflow *v1alpha1.ComponentWorkflow

	// Context provides workflow execution context metadata (required).
	Context ComponentWorkflowContext
}

RenderInput contains all required inputs for component 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

	// Resources contains additional rendered Kubernetes resources (e.g., secrets, configmaps)
	// to be applied alongside the main workflow resource.
	Resources []RenderedResource

	// Metadata contains rendering process information such as warnings.
	Metadata *RenderMetadata
}

RenderOutput contains the rendered workflow resource and associated metadata.

type RenderedResource added in v0.9.0

type RenderedResource struct {
	// ID is the unique identifier for this resource from the ComponentWorkflow spec.
	ID string

	// Resource is the fully rendered Kubernetes resource as a map.
	Resource map[string]any
}

RenderedResource represents a rendered Kubernetes resource with its identifier.

type SecretDataInfo added in v0.14.0

type SecretDataInfo struct {
	// SecretKey is the key name in the Kubernetes Secret
	SecretKey string

	// RemoteRef contains the external secret store reference
	RemoteRef RemoteRefInfo
}

SecretDataInfo represents a single secret data source mapping.

Jump to

Keyboard shortcuts

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