Documentation ¶
Index ¶
- Constants
- func ArtifactPath(wfr, stage, artifact string) string
- func ArtifactsPath(wfr, stage string) string
- func GetEventRecorder(client clientset.Interface, component string) record.EventRecorder
- func InputResourceVolumeName(name string) string
- func NonCoordinator(name string) bool
- func NonWorkloadSidecar(name string) bool
- func OnlyWorkload(name string) bool
- func OutputResourceVolumeName(name string) string
- func Pass(name string, selectors []ContainerSelector) bool
- func ResourcePath(wfr, resource string) string
- func StagePath(wfr, stage string) string
- func WorkflowRunsPath() string
- type ContainerSelector
- type ContainerState
Constants ¶
View Source
const ( // Resync period for controllers ResyncPeriod = time.Minute * 5 // EnvStagePodName is an environment which represents pod name. EnvStagePodName = "POD_NAME" // EnvWorkflowrunName is an environment which represents workflowrun name. EnvWorkflowrunName = "WORKFLOWRUN_NAME" // EnvStagePodName is an environment which represents stage name. EnvStageName = "STAGE_NAME" // EnvWorkloadContainerName is an environment which represents the workload container name. EnvWorkloadContainerName = "WORKLOAD_CONTAINER_NAME" // EnvNamespace is an environment which represents namespace. EnvNamespace = "NAMESPACE" // EnvCycloneServerAddr is an environment which represents cyclone server address. EnvCycloneServerAddr = "CYCLONE_SERVER_ADDR" // Default Cyclone Server address DefaultCycloneServerAddr = "native-cyclone-server" // Container name prefixes for sidecar. There are two kinds of sidecars in workflow: // - Those added automatically by Cyclone such as coordinator, resource resolvers. // - Those specified by users in stage spec as workload. CycloneSidecarPrefix = "cyclone-sidecar-" WorkloadSidecarPrefix = "workload-sidecar-" // Coordinator container name. CoordinatorSidecarName = CycloneSidecarPrefix + "coordinator" // Paths in resource resolver containers. // Default data path in resource resolver container. ResolverDefaultDataPath = "/workspace/data" // Name of the notify directory where coordinator would create ok file there. ResolverNotifyDir = "notify" // Notify directory path in resource resolver container. ResolverNotifyDirPath = "/workspace/notify" ResourcePullCommand = "pull" ResourcePushCommand = "push" WorkflowLabelName = "cyclone.io/workflow" WorkflowRunLabelName = "cyclone.io/workflow-name" PodLabelSelector = "cyclone.io/workflow==true" WorkflowRunAnnotationName = "cyclone.io/workflowrun" GCAnnotationName = "cyclone.io/gc" StageAnnotationName = "cyclone.io/stage" // Paths in coordinator container. CoordinatorResolverPath = "/workspace/resolvers" CoordinatorResourcesPath = "/workspace/resolvers/resources" CoordinatorResolverNotifyPath = "/workspace/resolvers/notify" CoordinatorResolverNotifyOkPath = "/workspace/resolvers/notify/ok" CoordinatorArtifactsPath = "/workspace/artifacts" // Name of the default PV used by all workflow stages. DefaultPvVolumeName = "default-pv" // Name of the emptyDir volume shared between coordinator and sidecar containers, e.g. // image resolvers. Coordinator would notify resolvers that workload containers have // finished their work, so that resource resolvers can push resources. CoordinatorSidecarVolumeName = "coordinator-sidecar-volume" // Volume name to mount host /var/run/docker.sock to container, it's used by coordinator. DockerSockVolume = "docker-sock" // Volume for config.json in secret. DockerConfigJsonVolume = "cyclone-docker-secret-volume" // Path of docker socket file DockerSockPath = "/var/run/docker.sock" DockerConfigPath = "/root/.docker" DockerConfigJsonFile = "config.json" // ContainerStateTerminated represents container is stopped. ContainerStateTerminated ContainerState = "Terminated" // ContainerStateInitialized represents container is Running or Stopped, not Init or Creating. ContainerStateInitialized ContainerState = "Initialized" )
View Source
const ( GCContainerName = "gc" GCDataPath = "/workspace" )
Constants for GC pod.
View Source
const ( // EventSourceWfrController represents events send from workflowrun controller. EventSourceWfrController string = "WorkflowRunController" // EventSourceWfrController represents events send from coordinator. EventSourceCoordinator string = "CycloneCoordinator" )
View Source
const ( // The path that we will mount PV on in container. StageMountPath = "/__cyclone__workspace" // Path of artifacts in coordinator container CoordinatorWorkspacePath = "/workspace/" )
Variables ¶
This section is empty.
Functions ¶
func ArtifactPath ¶
ArtifactPath gets the path of a artifact in PV.
func ArtifactsPath ¶
ArtifactsPath gets the path of artifacts in PV
func GetEventRecorder ¶
func GetEventRecorder(client clientset.Interface, component string) record.EventRecorder
GetEventRecorder get the event recorder object. Create it of not exists yet.
func InputResourceVolumeName ¶
func NonCoordinator ¶
NonCoordinator selects all containers except coordinator.
func NonWorkloadSidecar ¶
NonWorkloadSidecar selects all containers except workload sidecars.
func OnlyWorkload ¶
OnlyWorkload selects only workload containers.
func Pass ¶
func Pass(name string, selectors []ContainerSelector) bool
Pass check whether the given container name passes the given selectors.
func ResourcePath ¶
ResourcePath gets the path of a resource in PV
Types ¶
type ContainerSelector ¶
Click to show internal directories.
Click to hide internal directories.