task

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// GlobalHookRun runs a global hook.
	GlobalHookRun task.TaskType = "GlobalHookRun"
	// ModuleHookRun runs schedule or kubernetes hook.
	ModuleHookRun task.TaskType = "ModuleHookRun"
	// ModuleDelete runs helm delete/afterHelmDelete sequence.
	ModuleDelete task.TaskType = "ModuleDelete"
	// ModuleRun runs beforeHelm/helm upgrade/afterHelm sequence.
	ModuleRun task.TaskType = "ModuleRun"
	// ModulePurge - delete unknown helm release (no module in ModulesDir)
	ModulePurge task.TaskType = "ModulePurge"

	// DiscoverHelmReleases lists helm releases to detect unknown modules and initiate enabled modules list.
	DiscoverHelmReleases task.TaskType = "DiscoverHelmReleases"

	// ConvergeModules runs beforeAll/run modules/afterAll sequence for all enabled modules.
	ConvergeModules task.TaskType = "ConvergeModules"

	GlobalHookEnableKubernetesBindings      task.TaskType = "GlobalHookEnableKubernetesBindings"
	GlobalHookWaitKubernetesSynchronization task.TaskType = "GlobalHookWaitKubernetesSynchronization"
	GlobalHookEnableScheduleBindings        task.TaskType = "GlobalHookEnableScheduleBindings"
)

Addon-operator specific task types

Variables

This section is empty.

Functions

This section is empty.

Types

type HookMetadata

type HookMetadata struct {
	EventDescription string // event name for informative queue dump
	HookName         string
	ModuleName       string
	Binding          string // binding name from configuration
	BindingType      BindingType
	BindingContext   []BindingContext
	AllowFailure     bool //Task considered as 'ok' if hook failed. False by default. Can be true for some schedule hooks.

	DoModuleStartup bool // Execute onStartup and kubernetes@Synchronization hooks for module
	IsReloadAll     bool // ModuleRun task is a part of 'Reload all modules' process.

	ValuesChecksum           string // checksum of global values before first afterAll hook execution
	DynamicEnabledChecksum   string // checksum of dynamicEnabled before first afterAll hook execution
	LastAfterAllHook         bool   // true if task is a last afterAll hook in sequence
	ReloadAllOnValuesChanges bool   // whether to run DiscoverModules process if hook change global values

	KubernetesBindingId      string   // Unique id for kubernetes bindings
	WaitForSynchronization   bool     // kubernetes.Synchronization task should be waited
	MonitorIDs               []string // an array of monitor IDs to unlock Kubernetes events after Synchronization.
	ExecuteOnSynchronization bool     // A flag to skip hook execution in Synchronization tasks.
}

HookMetadata is a metadata for addon-operator tasks

func HookMetadataAccessor

func HookMetadataAccessor(t task.Task) (meta HookMetadata)

func (HookMetadata) GetBindingContext

func (hm HookMetadata) GetBindingContext() []BindingContext

func (HookMetadata) GetDescription

func (hm HookMetadata) GetDescription() string

func (HookMetadata) GetHookName

func (hm HookMetadata) GetHookName() string

func (HookMetadata) GetMonitorIDs

func (hm HookMetadata) GetMonitorIDs() []string

func (HookMetadata) IsSynchronization

func (hm HookMetadata) IsSynchronization() bool

Jump to

Keyboard shortcuts

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