orchestration

package
v0.0.0-...-fb2c256 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0, Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GardenerRuntimeResolver

type GardenerRuntimeResolver struct {
	// contains filtered or unexported fields
}

GardenerRuntimeResolver is the default resolver which implements the RuntimeResolver interface. This resolver uses the Shoot resources on the Gardener cluster to resolve the runtime targets.

Naive implementation, listing all the shoots and perfom filtering on the result. The logic could be optimized with k8s client cache using shoot lister / indexer. The implementation is thread safe, i.e. it is safe to call Resolve() from multiple threads concurrently.

func NewGardenerRuntimeResolver

func NewGardenerRuntimeResolver(gardenerClient gardenerclient.CoreV1beta1Interface, gardenerNamespace string, lister InstanceLister, logger logrus.FieldLogger) *GardenerRuntimeResolver

NewGardenerRuntimeResolver constructs a GardenerRuntimeResolver with the mandatory input parameters.

func (*GardenerRuntimeResolver) Resolve

func (resolver *GardenerRuntimeResolver) Resolve(targets orchestration.TargetSpec) ([]internal.Runtime, error)

Resolve given an input slice of target specs to include and exclude, returns back a list of unique Runtime objects

type InstanceLister

type InstanceLister interface {
	FindAllJoinedWithOperations(prct ...predicate.Predicate) ([]internal.InstanceWithOperation, error)
}

InstanceLister is the interface to get InstanceWithOperation objects from KEB storage

type ParallelOrchestrationStrategy

type ParallelOrchestrationStrategy struct {
	// contains filtered or unexported fields
}

func (*ParallelOrchestrationStrategy) Execute

type RuntimeResolver

type RuntimeResolver interface {
	Resolve(targets orchestration.TargetSpec) ([]internal.Runtime, error)
}

RuntimeResolver given an input slice of target specs to include and exclude, resolves and returns a list of unique Runtime objects.

type Strategy

type Strategy interface {
	// Execute invokes operation managers' Execute(operationID string) method for each operation according to the encapsulated strategy.
	Execute(operations []internal.RuntimeOperation, strategySpec orchestration.StrategySpec) (time.Duration, error)
}

Strategy interface encapsulates the strategy how the orchestration is performed.

func NewParallelOrchestrationStrategy

func NewParallelOrchestrationStrategy(executor process.Executor, log logrus.FieldLogger) Strategy

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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