Documentation ¶
Index ¶
- Constants
- func AddNotificationSentLabel(labels map[string]string, sent bool) map[string]string
- func AddSchedulableClusterLabel(labels map[string]string) map[string]string
- func AddStageTemplateLabel(labels map[string]string) map[string]string
- func BuiltinLabelSelector() string
- func CyclonePodSelector() string
- func LabelExists(labels map[string]string, expectedLabel string) bool
- func LabelExistsSelector(key string) string
- func ProjectSelector(project string) string
- func ResourceSelector(project string) string
- func ResourceTypeSelector() string
- func SchedulableClusterSelector() string
- func StageTemplateSelector() string
- func WorkflowRunPodSelector(wfr string) string
- func WorkflowRunSelector() string
- func WorkflowRunWorkloadPodSelector(wfr string) string
- func WorkflowSelector(workflow string) string
- func WorkflowTriggerSelector() string
- func WorkloadPodSelector() string
- type PodKind
Constants ¶
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" // AnnotationOwner is the annotation key used to indicate the owner of resources. AnnotationOwner = "cyclone.dev/owner" // 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" // 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" )
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" // 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 AddNotificationSentLabel ¶
AddNotificationSentLabel adds notification sent label for workflowruns.
func AddSchedulableClusterLabel ¶
AddSchedulableClusterLabel adds schedulable label for integrated cluster to run workload.
func AddStageTemplateLabel ¶
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 LabelExists ¶
LabelExists checks the existence of expected label, return true if exists, otherwise return false.
func LabelExistsSelector ¶
LabelExistsSelector returns a label selector to query resources with label key exists.
func ProjectSelector ¶
ProjectSelector is a selector for cyclone CRD resources which have corresponding project label
func ResourceSelector ¶
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
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
WorkflowRunWorkloadPodSelector selects pods that used to execute a WorkflowRun's workload.
func WorkflowSelector ¶
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.