config

package
v0.9.4-alpha Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ConfigFileKey is key of config file in ConfigMap
	ConfigFileKey = "cyclone-server.json"
)

Variables

This section is empty.

Functions

func GetSystemNamespace

func GetSystemNamespace() string

GetSystemNamespace ...

func LoadConfig added in v0.9.3

func LoadConfig(cm *core_v1.ConfigMap) error

LoadConfig loads configuration from ConfigMap

Types

type CycloneServerConfig added in v0.9.3

type CycloneServerConfig struct {
	// Logging configuration, such as log level.
	Logging LoggingConfig `json:"logging"`

	// CycloneServerHost represents the host for cyclone server to serve on
	CycloneServerHost string `json:"cyclone_server_host"`
	// CycloneServerPort represents the port for cyclone server to serve on
	CycloneServerPort uint16 `json:"cyclone_server_port"`

	// DefaultPVCConfig represents the config of pvc for default tenant
	DefaultPVCConfig PVCConfig `json:"default_pvc_config"`

	// WorkerNamespaceQuota describes the resource quota of the namespace which will be used to run workflows,
	// eg map[core_v1.ResourceName]string{"cpu": "2", "memory": "4Gi"}
	WorkerNamespaceQuota map[core_v1.ResourceName]string `json:"worker_namespace_quota"`

	// WebhookURL represents the Cyclone server path to receive webhook requests.
	// If Cyclone server can be accessed by external systems, it would like be `https://{cyclone-server}/apis/v1alpha1`.
	WebhookURL string `json:"webhook_url"`

	// StorageUsageWatcher configures PVC storage usage watchers.
	StorageUsageWatcher StorageUsageWatcher `json:"storage_usage_watcher"`

	// CreateBuiltinTemplates configures whether to create builtin stage templates while cyclone server start up.
	CreateBuiltinTemplates bool `json:"create_builtin_templates"`

	// SystemNamespace is the namespace where the Cyclone components installed in, and cyclone built-in
	// resources(such as stage templates) will be stored in the namespace too.
	SystemNamespace string `json:"system_namespace"`

	// InitDefaultTenant configures whether to create cyclone default tenant while cyclone server start up.
	InitDefaultTenant bool `json:"init_default_tenant"`
}

CycloneServerConfig configures Cyclone Server

var Config CycloneServerConfig

Config is Workflow Controller config instance

type LoggingConfig added in v0.9.3

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

LoggingConfig configures logging

type PVCConfig added in v0.9.3

type PVCConfig struct {
	// StorageClass represents the strorageclass used to create pvc
	StorageClass string `json:"storage_class"`

	// Size represents the capacity of the pvc, unit supports 'Gi' or 'Mi'
	// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
	Size string `json:"size"`
}

PVCConfig contains the PVC information

type StorageUsageWatcher added in v0.9.3

type StorageUsageWatcher struct {
	// Image is image for the storage usage watcher, for example 'busybox:1.30.0'
	Image string `json:"image"`
	// ReportURL is url where to report the usage
	ReportURL string `json:"report_url"`
	// IntervalSeconds is intervals to report storage usage
	IntervalSeconds string `json:"interval_seconds"`
	// ResourceRequirements specifies resource requirements of the watcher container.
	ResourceRequirements map[core_v1.ResourceName]string `json:"resource_requirements"`
}

StorageUsageWatcher configures PVC storage usage watchers.

Jump to

Keyboard shortcuts

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