interfaces

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: Apache-2.0 Imports: 5 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationConfig

type ApplicationConfig struct {
	RoleNameKey           string   `json:"roleNameKey"`
	KubeConfig            string   `json:"kubeconfig"`
	MetricsScope          string   `json:"metricsScope"`
	ProfilerPort          int      `json:"profilerPort"`
	MetadataStoragePrefix []string `json:"metadataStoragePrefix"`
}

This configuration is the base configuration to start admin

type ApplicationConfiguration

type ApplicationConfiguration interface {
	GetDbConfig() DbConfig
	GetTopLevelConfig() *ApplicationConfig
	GetSchedulerConfig() *SchedulerConfig
	GetRemoteDataConfig() *RemoteDataConfig
	GetNotificationsConfig() *NotificationsConfig
	GetDomainsConfig() *DomainsConfig
}

Defines the interface to return top-level config structs necessary to start up a flyteadmin application.

type Auth

type Auth struct {
	Type      string `json:"type"`
	TokenPath string `json:"tokenPath"`
	CertPath  string `json:"certPath"`
}

func (Auth) GetCA

func (auth Auth) GetCA() ([]byte, error)

func (Auth) GetToken

func (auth Auth) GetToken() (string, error)

type ClusterConfig

type ClusterConfig struct {
	Name           string   `json:"name"`
	Endpoint       string   `json:"endpoint"`
	Auth           Auth     `json:"auth"`
	Enabled        bool     `json:"enabled"`
	Weight         float32  `json:"weight"`
	AllowedDomains []string `json:"allowedDomains"`
}

Holds details about a cluster used for workflow execution.

type ClusterConfiguration

type ClusterConfiguration interface {
	// Returns clusters defined in runtime configuration files.
	GetClusterConfigs() []ClusterConfig

	// The cluster selection strategy setting
	GetClusterSelectionStrategy() ClusterSelectionStrategy
}

Provides values set in runtime configuration files. These files can be changed without requiring a full server restart.

type ClusterResourceConfig

type ClusterResourceConfig struct {
	TemplatePath string `json:"templatePath"`
	// TemplateData maps template keys e.g. my_super_secret_password to a data source
	// which is then substituted in cluster resource templated config files wherever
	// {{ my_super_secret_password }} appears.
	TemplateData    TemplateData    `json:"templateData"`
	RefreshInterval config.Duration `json:"refreshInterval"`
	// Like TemplateData above, this also specifies template values as defaults to be substituted for specific domains
	// or for all domains.
	// For example:
	/*
		defaultData:
		  production:
		    foo:
		      value: "bar"
		    foofoo:
		      valueFrom:
		        env: SHELL
		  staging:
		    foo:
		      value: "baz"
	*/
	CustomData map[DomainName]TemplateData `json:"customData"`
}

type ClusterResourceConfiguration

type ClusterResourceConfiguration interface {
	GetTemplatePath() string
	GetTemplateData() map[string]DataSource
	GetRefreshInterval() time.Duration
	GetCustomTemplateData() map[DomainName]TemplateData
}

type ClusterSelectionStrategy added in v0.1.1

type ClusterSelectionStrategy string
var (
	ClusterSelectionRandom ClusterSelectionStrategy
)

type Clusters

type Clusters struct {
	ClusterConfigs   []ClusterConfig          `json:"clusterConfigs"`
	ClusterSelection ClusterSelectionStrategy `json:"clusterSelectionStrategy"`
}

type Configuration

type Configuration interface {
	ApplicationConfiguration() ApplicationConfiguration
	QueueConfiguration() QueueConfiguration
	ClusterConfiguration() ClusterConfiguration
	TaskResourceConfiguration() TaskResourceConfiguration
	WhitelistConfiguration() WhitelistConfiguration
	RegistrationValidationConfiguration() RegistrationValidationConfiguration
	ClusterResourceConfiguration() ClusterResourceConfiguration
	NamespaceMappingConfiguration() NamespaceMappingConfiguration
}

Interface for getting parsed values from a configuration file

type DataSource

type DataSource struct {
	Value     string              `json:"value"`
	ValueFrom DataSourceValueFrom `json:"valueFrom"`
}

type DataSourceValueFrom

type DataSourceValueFrom struct {
	EnvVar   string `json:"env"`
	FilePath string `json:"filePath"`
}

type DbConfig

type DbConfig struct {
	Host         string `json:"host"`
	Port         int    `json:"port"`
	DbName       string `json:"dbname"`
	User         string `json:"username"`
	Password     string `json:"password"`
	ExtraOptions string `json:"options"`
}

type DbConfigSection

type DbConfigSection struct {
	Host   string `json:"host"`
	Port   int    `json:"port"`
	DbName string `json:"dbname"`
	User   string `json:"username"`
	// Either Password or PasswordPath must be set.
	Password     string `json:"password"`
	PasswordPath string `json:"passwordPath"`
	// See http://gorm.io/docs/connecting_to_the_database.html for available options passed, in addition to the above.
	ExtraOptions string `json:"options"`
}

type Domain

type Domain struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type DomainName added in v0.1.4

type DomainName = string

type DomainsConfig

type DomainsConfig = []Domain

type EventSchedulerConfig

type EventSchedulerConfig struct {
	Scheme       string `json:"scheme"`
	Region       string `json:"region"`
	ScheduleRole string `json:"scheduleRole"`
	TargetName   string `json:"targetName"`
}

type ExecutionQueue

type ExecutionQueue struct {
	Primary    string
	Dynamic    string
	Attributes []string
}

Holds details about a queue used for task execution. Matching attributes determine which workflows' tasks will run where.

type ExecutionQueues

type ExecutionQueues []ExecutionQueue

type NamespaceMappingConfig added in v0.1.3

type NamespaceMappingConfig struct {
	Mapping string `json:"mapping"`
}

type NamespaceMappingConfiguration added in v0.1.3

type NamespaceMappingConfiguration interface {
	GetNamespaceMappingConfig() common.NamespaceMapping
}

type NotificationsConfig

type NotificationsConfig struct {
	Type                         string                       `json:"type"`
	Region                       string                       `json:"region"`
	NotificationsPublisherConfig NotificationsPublisherConfig `json:"publisher"`
	NotificationsProcessorConfig NotificationsProcessorConfig `json:"processor"`
	NotificationsEmailerConfig   NotificationsEmailerConfig   `json:"emailer"`
}

Configuration specific to notifications handling

type NotificationsEmailerConfig

type NotificationsEmailerConfig struct {
	Subject string `json:"subject"`
	Sender  string `json:"sender"`
	Body    string `json:"body"`
}

type NotificationsProcessorConfig

type NotificationsProcessorConfig struct {
	QueueName string `json:"queueName"`
	AccountID string `json:"accountId"`
}

type NotificationsPublisherConfig

type NotificationsPublisherConfig struct {
	TopicName string `json:"topicName"`
}

type QueueConfig

type QueueConfig struct {
	ExecutionQueues ExecutionQueues `json:"executionQueues"`
	WorkflowConfigs WorkflowConfigs `json:"workflowConfigs"`
}

type QueueConfiguration

type QueueConfiguration interface {
	// Returns executions queues defined in runtime configuration files.
	GetExecutionQueues() []ExecutionQueue
	// Returns workflow configurations defined in runtime configuration files.
	GetWorkflowConfigs() []WorkflowConfig
}

Provides values set in runtime configuration files. These files can be changed without requiring a full server restart.

type RegistrationValidationConfig

type RegistrationValidationConfig struct {
	MaxWorkflowNodes     int    `json:"maxWorkflowNodes"`
	MaxLabelEntries      int    `json:"maxLabelEntries"`
	MaxAnnotationEntries int    `json:"maxAnnotationEntries"`
	WorkflowSizeLimit    string `json:"workflowSizeLimit"`
}

type RegistrationValidationConfiguration

type RegistrationValidationConfiguration interface {
	GetWorkflowNodeLimit() int
	GetMaxLabelEntries() int
	GetMaxAnnotationEntries() int
	GetWorkflowSizeLimit() string
}

Provides validation limits used at entity registration

type RemoteDataConfig

type RemoteDataConfig struct {
	Scheme    string    `json:"scheme"`
	Region    string    `json:"region"`
	SignedURL SignedURL `json:"signedUrls"`
}

This configuration handles all requests to get remote data such as execution inputs & outputs.

type SchedulerConfig

type SchedulerConfig struct {
	EventSchedulerConfig   EventSchedulerConfig   `json:"eventScheduler"`
	WorkflowExecutorConfig WorkflowExecutorConfig `json:"workflowExecutor"`
}

This configuration is the base configuration for all scheduler-related set-up.

type SignedURL

type SignedURL struct {
	DurationMinutes int `json:"durationMinutes"`
}

Configuration specific to setting up signed urls.

type TaskResourceConfiguration

type TaskResourceConfiguration interface {
	GetDefaults() TaskResourceSet
	GetLimits() TaskResourceSet
}

Provides default values for task resource limits and defaults.

type TaskResourceSet

type TaskResourceSet struct {
	CPU     string `json:"cpu"`
	GPU     string `json:"gpu"`
	Memory  string `json:"memory"`
	Storage string `json:"storage"`
}

type TaskTypeWhitelist

type TaskTypeWhitelist = map[string][]WhitelistScope

Defines specific task types whitelisted for support.

type TemplateData added in v0.1.4

type TemplateData = map[string]DataSource

type WhitelistConfiguration

type WhitelistConfiguration interface {
	// Returns whitelisted task types defined in runtime configuration files.
	GetTaskTypeWhitelist() TaskTypeWhitelist
}

type WhitelistScope

type WhitelistScope struct {
	Project string `json:"project"`
	Domain  string `json:"domain"`
}

type WorkflowConfig

type WorkflowConfig struct {
	Project      string   `json:"project"`
	Domain       string   `json:"domain"`
	WorkflowName string   `json:"workflowName"`
	Tags         []string `json:"tags"`
}

Defines the specific resource attributes (tags) a workflow requires to run.

type WorkflowConfigs

type WorkflowConfigs []WorkflowConfig

type WorkflowExecutorConfig

type WorkflowExecutorConfig struct {
	Scheme            string `json:"scheme"`
	Region            string `json:"region"`
	ScheduleQueueName string `json:"scheduleQueueName"`
	AccountID         string `json:"accountId"`
}

Jump to

Keyboard shortcuts

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