controller

package
v0.9.2-beta Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

README

Workflow Controller

Documentation

Index

Constants

View Source
const (
	// The key of config file in ConfigMap
	ConfigFileKey = "workflow-controller.json"

	// Keys of images in config file
	GitResolverImage   = "git-resolver"
	ImageResolverImage = "image-resolver"
	KvResolverImage    = "kv-resolver"
	CoordinatorImage   = "coordinator"
	GCImage            = "gc"
)

Variables

Functions

func InitLogger

func InitLogger(logging *LoggingConfig)

func LoadConfig

func LoadConfig(cm *corev1.ConfigMap) error

Types

type ControllerConfig

type ControllerConfig 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"`
	// Default resource requirements for containers in stage Pod
	ResourceRequirements corev1.ResourceRequirements `json:"default_resource_quota"`
	// The PVC 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.
	// TODO(ChenDe): Remove it when Cyclone can manage PVC for namespaces.
	PVC string `json:"pvc"`
	// 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`
	// Address of the Cyclone Server
	CycloneServerAddr string `json:"cyclone_server_addr"`
}
var Config ControllerConfig

type GCConfig

type GCConfig struct {
	// Whether GC is enabled, it set to false, no GC would happen.
	Enabled bool `json:"enabled"`
	// After a WorkflowRun has been terminated, we won't clean it up immediately, but after a
	// delay time given by this configure item. When configured to 0, it equals to gc immediately.
	DelaySeconds time.Duration `json:"delay_seconds"`
	// How many times to retry when GC failed, 0 means no retry.
	RetryCount int `json:"retry"`
}

type LimitsConfig

type LimitsConfig struct {
	// Maximum WorkflowRuns to be kept for each Workflow
	MaxWorkflowRuns int `json:"max_workflowruns"`
}

type LoggingConfig

type LoggingConfig struct {
	Level string `json:"level"`
}

Directories

Path Synopsis
pod

Jump to

Keyboard shortcuts

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