pipeline

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CommonClassName is the name of the tenant's common class
	CommonClassName         = "common"
	DefaultGlobalGitRepoURL = "DEFAULT_GLOBAL_GIT_REPO_URL"
)
View Source
const (
	DeleteProtectionAnnotation = "syn.tools/protected-delete"
)

Variables

This section is empty.

Functions

func GetServiceAccountToken

func GetServiceAccountToken(instance metav1.Object, data *ExecutionContext) (string, error)

Types

type ExecutionContext

type ExecutionContext struct {
	FinalizerName string
	Client        client.Client
	Log           logr.Logger
	Deleted       bool
	// contains filtered or unexported fields
}

ExecutionContext contains additional data about the CRD bein processed.

type ExecutionResult

type ExecutionResult struct {
	Abort   bool
	Err     error
	Requeue bool
}

ExecutionResult indicates wether the current execution should be aborted and if there was an error.

func ReconcileCluster

func ReconcileCluster(obj PipelineObject, data *ExecutionContext) ExecutionResult

func ReconcileGitRep

func ReconcileGitRep(obj PipelineObject, data *ExecutionContext) ExecutionResult

func ReconcileTenant

func ReconcileTenant(obj PipelineObject, data *ExecutionContext) ExecutionResult

func RunPipeline

func RunPipeline(obj PipelineObject, data *ExecutionContext, steps []Step) ExecutionResult

type Function

Function defines the general form of a pipeline function.

type PipelineObject

type PipelineObject interface {
	GetObjectMeta() metav1.Object
	GetGitTemplate() *synv1alpha1.GitRepoTemplate
	GroupVersionKind() schema.GroupVersionKind
	GetTenantRef() corev1.LocalObjectReference
	GetDeletionPolicy() synv1alpha1.DeletionPolicy
	GetDisplayName() string
	SetGitRepoURLAndHostKeys(URL, hostKeys string)
	GetSpec() interface{}
	GetStatus() interface{}
}

PipelineObject defines an interface to extract necessary information from the CRs

type Step

type Step struct {
	Name string
	F    Function
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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