Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DevModeEnvName determines whether workflow controller is in development mode. // In development mode, resource resolver containers, coordinator containers will // have image pull policy being 'Always', otherwise it's 'IfNotPresent'. DevModeEnvName = "DEVELOP_MODE" // ConfigFileKey is key of config file in ConfigMap ConfigFileKey = "workflow-controller.json" // GitResolverImage is key of git source resolver image in config file GitResolverImage = "git-resolver" // ImageResolverImage is key of image source resolver image in config file ImageResolverImage = "image-resolver" // KvResolverImage is key of kv source resolver image in config file KvResolverImage = "kv-resolver" // CoordinatorImage is key of coordinator image in config file CoordinatorImage = "coordinator" // GCImage is key of the GC image in config file GCImage = "gc" )
Variables ¶
View Source
var ResolverImageKeys = map[v1alpha1.ResourceType]string{ v1alpha1.GitResourceType: GitResolverImage, v1alpha1.ImageResourceType: ImageResolverImage, v1alpha1.KVResourceType: KvResolverImage, }
ResolverImageKeys maps resource type to resolver images
Functions ¶
func ImagePullPolicy ¶ added in v0.9.3
func ImagePullPolicy() corev1.PullPolicy
ImagePullPolicy determines image pull policy based on environment variable DEVELOP_MODE This pull policy will be used in image resolver containers and coordinator containers.
func LoadConfig ¶
LoadConfig loads configuration from ConfigMap
Types ¶
type ExecutionContext ¶ added in v0.9.3
type ExecutionContext struct { // Namespace is namespace where to run workflow. Namespace string `json:"namespace"` // PVC is pvc used to run workflow. It's used to transfer artifacts in WorkflowRun, and // also to help share resources among stages within WorkflowRun. If no PVC is given here, // input resources won't be shared among stages, but need to be pulled every time it's needed. // And also if no PVC given, artifacts are not supported. PVC string `json:"pvc"` // ServiceAccount is the service account applied to the pod runed ServiceAccount string `json:"service_account"` }
ExecutionContext defines default namespace and pvc used to run workflow.
type GCConfig ¶
type GCConfig struct { // Enabled controllers whether GC is enabled, if set to false, no GC would happen. Enabled bool `json:"enabled"` // DelaySeconds defines the time after a WorkflowRun terminated to perform GC. When configured to 0. // it equals to gc immediately. DelaySeconds time.Duration `json:"delay_seconds"` // RetryCount defines how many times to retry when GC failed, 0 means no retry. RetryCount int `json:"retry"` }
GCConfig configures GC
type LimitsConfig ¶
type LimitsConfig struct { // Maximum WorkflowRuns to be kept for each Workflow MaxWorkflowRuns int `json:"max_workflowruns"` }
LimitsConfig configures maximum WorkflowRun to keep for each Workflow
type LoggingConfig ¶
type LoggingConfig struct {
Level string `json:"level"`
}
LoggingConfig configures logging
type WorkflowControllerConfig ¶ added in v0.9.3
type WorkflowControllerConfig struct { // Images that used in controller, such as resource resolvers. Images map[string]string `json:"images"` // Logging configuration, such as log level. Logging LoggingConfig `json:"logging"` // GC configuration GC GCConfig `json:"gc"` // Limits of each resources should be retained Limits LimitsConfig `json:"limits"` // ResourceRequirements is default resource requirements for containers in stage Pod ResourceRequirements corev1.ResourceRequirements `json:"default_resource_quota"` // ExecutionContext defines default namespace and pvc used to run workflow. ExecutionContext ExecutionContext `json:"execution_context"` // Secret is default secret used for Cyclone, auth of registry can be placed here. It's optional. // TODO(ChenDe): Remove it when Cyclone can manage secrets for namespaces. Secret string `json:"secret"` // CycloneServerAddr is address of the Cyclone Server CycloneServerAddr string `json:"cyclone_server_addr"` }
WorkflowControllerConfig configures Workflow Controller
var Config WorkflowControllerConfig
Config is Workflow Controller config instance
Click to show internal directories.
Click to hide internal directories.