meta

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// AnnotationValueFalse is boolean value false for annotation
	AnnotationValueFalse = "false"

	// AnnotationAlias is the annotation key used to indicate the alias of resources
	AnnotationAlias = "cyclone.dev/alias"

	// AnnotationDescription is the annotation key used to describe resources
	AnnotationDescription = "cyclone.dev/description"

	// AnnotationStageName is annotation applied to pod to indicate which stage it related to
	AnnotationStageName = "stage.cyclone.dev/name"

	// AnnotationWorkflowRunName is annotation applied to pod to specify WorkflowRun the pod belongs to
	AnnotationWorkflowRunName = "workflowrun.cyclone.dev/name"

	// AnnotationWorkflowRunTrigger is the annotation key used to indicate the trigger of workflowruns.
	AnnotationWorkflowRunTrigger = "workflowrun.cyclone.dev/trigger"

	// AnnotationWorkflowRunSCMEvent is the annotation key used to indicate the SCM event data to trigger workflowruns.
	AnnotationWorkflowRunSCMEvent = "workflowrun.cyclone.dev/scm-event"

	// AnnotationWorkflowRunPRUpdatedAt is the annotation key used to indicate the time that SCM event gets triggered.
	AnnotationWorkflowRunPRUpdatedAt = "workflowrun.cyclone.dev/scm-pr-updated-at"

	// AnnotationTenantInfo is the annotation key used for namespace to relate tenant information
	AnnotationTenantInfo = "tenant.cyclone.dev/info"

	// AnnotationTenantStorageUsage is annotation to store storage usuage information
	AnnotationTenantStorageUsage = "tenant.cyclone.dev/storage-usage"

	// AnnotationMetaNamespace is annotation applied to pod to specify the namespace where Workflow, WorkflowRun etc belong to.
	AnnotationMetaNamespace = "cyclone.dev/meta-namespace"

	// AnnotationStageResult is annotation to hold execution results (JSON format) of a stage.
	AnnotationStageResult = "stage.cyclone.dev/execution-results"

	// AnnotationIstioInject is annotation to decide whether to inject istio sidecar
	AnnotationIstioInject = "sidecar.istio.io/inject"

	// AnnotationCacheCleanupStatus is the annotation key used to describe cache cleanup status.
	AnnotationCacheCleanupStatus = "project.cyclone.dev/cache-cleanup-status"

	// AnnotationSeccompContainerPrefix  represents the key of a seccomp profile applied to one container of a pod.
	AnnotationSeccompContainerPrefix = "container.seccomp.security.alpha.kubernetes.io/"
)
View Source
const (
	// LabelControllerInstance is instance name of the workflow controller
	LabelControllerInstance = "controller.cyclone.dev/instance"

	// LabelTenantName is the label key used to indicate the tenant which the resources belongs to
	LabelTenantName = "tenant.cyclone.dev/name"

	// LabelProjectName is the label key used to indicate the project which the resources belongs to
	LabelProjectName = "project.cyclone.dev/name"

	// LabelWorkflowName is the label key used to indicate the workflow which the resources belongs to
	LabelWorkflowName = "workflow.cyclone.dev/name"

	// LabelWorkflowRunPRRef is the label key used to indicate the ref of PR that workflowrun belongs to
	LabelWorkflowRunPRRef = "workflowrun.cyclone.dev/scm-pr-ref"

	// LabelWorkflowRunName is the label key used to indicate the workflowrun which the resources belongs to
	LabelWorkflowRunName = "workflowrun.cyclone.dev/name"

	// LabelWorkflowRunAcceleration is the label key used to indicate a workflowrun turned on acceleration
	LabelWorkflowRunAcceleration = "workflowrun.cyclone.dev/acceleration"

	// LabelWorkflowRunNotificationSent is the label key used to indicate a workflowrun has been sent as notification
	LabelWorkflowRunNotificationSent = "workflowrun.cyclone.dev/notification-sent"

	// LabelStageTemplate is the label key used to represent a stage is a stage template
	LabelStageTemplate = "stage.cyclone.dev/template"

	// LabelResourceTemplate represents registration of a supported resource
	LabelResourceTemplate = "resource.cyclone.dev/template"

	// LabelIntegrationType is the label key used to indicate type of integration
	LabelIntegrationType = "integration.cyclone.dev/type"

	// LabelIntegrationSchedulableCluster is the label key used to indicate the cluster is schedulable for workflowruns in this tenant
	LabelIntegrationSchedulableCluster = "integration.cyclone.dev/schedulable-cluster"

	// LabelWftEventSource is the label key used to indicate event source of the trigger, event source could be a SCM server,
	// and we represent it as integration in cyclone.
	LabelWftEventSource = "workflowtrigger.cyclone.dev/event-source"

	// LabelWftEventRepo is the label key used to indicate scm repo name of wft,
	// this label is useful for SCM type event source triggers to determine a repository name.
	LabelWftEventRepo = "workflowtrigger.cyclone.dev/event-repo"

	// LabelPodKind is the label key applied to pod to indicate whether the pod is used for GC purpose.
	LabelPodKind = "pod.kubernetes.io/kind"

	// LabelPodCreatedBy is the label key applied to pod to indicate who the pod is created by.
	LabelPodCreatedBy = "pod.kubernetes.io/created-by"

	// LabelBuiltin is the label key used to represent cyclone built in resources
	LabelBuiltin = "cyclone.dev/builtin"

	// LabelScene is the label key used to indicate cyclone scenario
	LabelScene = "cyclone.dev/scene"

	// LabelValueTrue is the label value used to represent true
	LabelValueTrue = "true"

	// LabelValueFalse is the label value used to represent false
	LabelValueFalse = "false"

	// CycloneCreator is the label value used to represent the resources created by Cyclone.
	CycloneCreator = "cyclone"
)

Variables

This section is empty.

Functions

func AccelerationGCPodSelector added in v1.1.0

func AccelerationGCPodSelector() string

AccelerationGCPodSelector selects pods that used to gc acceleration caches.

func AddNotificationSentLabel

func AddNotificationSentLabel(labels map[string]string, sent bool) map[string]string

AddNotificationSentLabel adds notification sent label for workflowruns.

func AddSchedulableClusterLabel

func AddSchedulableClusterLabel(labels map[string]string) map[string]string

AddSchedulableClusterLabel adds schedulable label for integrated cluster to run workload.

func AddStageTemplateLabel

func AddStageTemplateLabel(labels map[string]string) map[string]string

AddStageTemplateLabel adds template label for stages.

func BuiltinLabelSelector

func BuiltinLabelSelector() string

BuiltinLabelSelector returns a label selector to query cyclone built-in resources.

func CyclonePodSelector

func CyclonePodSelector() string

CyclonePodSelector selects pods that are created by Cyclone (for example, stage execution pods, GC pods) and manged by current workflow controller.

func GCPodSelector added in v1.1.0

func GCPodSelector() string

GCPodSelector selects pods that used to gc workload.

func LabelExists

func LabelExists(labels map[string]string, expectedLabel string) bool

LabelExists checks the existence of expected label, return true if exists, otherwise return false.

func LabelExistsSelector

func LabelExistsSelector(key string) string

LabelExistsSelector returns a label selector to query resources with label key exists.

func ProjectSelector

func ProjectSelector(project string) string

ProjectSelector is a selector for cyclone CRD resources which have corresponding project label

func ResourceSelector

func ResourceSelector(project string) string

ResourceSelector selects all resources with resource registration excluded.

func ResourceTypeSelector

func ResourceTypeSelector() string

ResourceTypeSelector returns the label of resource template.

func SchedulableClusterSelector

func SchedulableClusterSelector() string

SchedulableClusterSelector is a selector for clusters which are use to perform workload

func StageTemplateSelector

func StageTemplateSelector() string

StageTemplateSelector returns a label selector to query stage templates.

func WorkflowRunPodSelector added in v0.9.8

func WorkflowRunPodSelector(wfr string) string

WorkflowRunPodSelector selects pods that belongs to a WorkflowRun.

func WorkflowRunSelector

func WorkflowRunSelector() string

WorkflowRunSelector selects WorkflowRun that managed by current controller instance.

func WorkflowRunWorkloadPodSelector added in v0.9.8

func WorkflowRunWorkloadPodSelector(wfr string) string

WorkflowRunWorkloadPodSelector selects pods that used to execute a WorkflowRun's workload.

func WorkflowSelector

func WorkflowSelector(workflow string) string

WorkflowSelector is a selector for cyclone CRD resources which have corresponding workflow label

func WorkflowTriggerSelector

func WorkflowTriggerSelector() string

WorkflowTriggerSelector selects workflow triggers managed by current controller instance

func WorkloadPodSelector added in v0.9.8

func WorkloadPodSelector() string

WorkloadPodSelector selects pods that used to execute workload.

Types

type PodKind

type PodKind string

PodKind represents the type of pods created by Cyclone.

const (
	// PodKindGC represents the pod is used for GC purpose.
	PodKindGC PodKind = "gc"
	// PodKindWorkload represents the pod is used to run a stage workload.
	PodKindWorkload PodKind = "workload"
	// PodKindAccelerationGC represents the pod is used for acceleration cache GC purpose.
	PodKindAccelerationGC PodKind = "acceleration-gc"
	// PodKindPVCWatcher represents the pod is used to watch pvc.
	PodKindPVCWatcher PodKind = "pvc-watcher"
)

func (PodKind) String

func (pk PodKind) String() string

Jump to

Keyboard shortcuts

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