components

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const LabelKey string = "v1.dracon.ocurity.com/component"

Variables

View Source
var (
	// ErrCouldNotStatPath is returned when the path to the components doesn't
	// exist or is inaccesbile
	ErrCouldNotStatPath = errors.New("could not stat path")
	// ErrNotADirectory is returned when the path is not pointing to a
	// directory
	ErrNotADirectory = errors.New("path is not a directory")
)

Functions

func Package added in v0.2.0

func Package(ctx context.Context, name, componentFolder string, draconVersion string, chartVersion string) (err error)

Package explores the components folder provided and gathers all the Tekton Tasks into one Helm chart.

Types

type Component added in v0.2.0

type Component struct {
	// Name of the component. Should be unique
	Name string

	// Reference is the original reference to the component in the pipeline
	// description
	Reference string

	// Repository is the repository from where this component was fetched
	Repository string

	// Type of the component (base, source, producer, etc...)
	Type ComponentType

	// Resolved shows whether or not the component manifest has been loaded
	// or not. Before this is set to true, the Type and Manifest are not known.
	Resolved bool

	// OrchestrationType shows how the component deployment is managed
	OrchestrationType OrchestrationType

	// Manifest is the K8s manifest of the object
	Manifest runtime.Object
}

Component represents a Dracon component. At the moment it can only be a Tekton Task, but in the future it might represent other things too.

func FromReference added in v0.2.0

func FromReference(ctx context.Context, ref string) (Component, error)

FromReference resolves a reference and returns an instance of a component. If the component is naively orchestrated, it will be loaded

type ComponentType

type ComponentType int
const (
	Base ComponentType = iota
	Source
	Producer
	ProducerAggregator
	Enricher
	EnricherAggregator
	Consumer
)

func MustGetComponentType

func MustGetComponentType(cts string) ComponentType

func ToComponentType

func ToComponentType(cts string) (ComponentType, error)

func ValidateTask

func ValidateTask(task *tektonV1Beta1.Task) (ComponentType, error)

func (ComponentType) String

func (ct ComponentType) String() string

type OrchestrationType added in v0.2.0

type OrchestrationType int
const (
	// Naive means that a component is deployed on the cluster automatically
	// before a Pipeline is deployed without checking if it's a newer or older
	// version.
	Naive OrchestrationType = iota
	// ExternalHelm means that a component is deployed on the cluster using
	// Helm but the orchestrator itself is not involved in this process.
	ExternalHelm
)

Jump to

Keyboard shortcuts

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