v1alpha1

package
v1.11.0-RC2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

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

Executor contains list of castEngine

func (*Executor) Execute

func (e *Executor) Execute() error

Execute runs list of castEngines. It returns error if there is any while running these engines

type ExecutorBuilder

type ExecutorBuilder struct {
	*errors.ErrorList
	// contains filtered or unexported fields
}

ExecutorBuilder helps to build Executor instance

func ExecutorBuilderForConfig

func ExecutorBuilderForConfig(cfg *apis.UpgradeConfig) *ExecutorBuilder

ExecutorBuilderForConfig returns an instance of ExecutorBuilder It adds object in ExecutorBuilder struct with the help of config

func (*ExecutorBuilder) Build

func (eb *ExecutorBuilder) Build() (*Executor, error)

Build builds a new instance of Executor with the help of ExecutorBuilder instance

type Upgrade

type Upgrade struct {
	// ConfigPath represents the configuration that
	// is provided to upgrade as its input
	ConfigPath string

	// Config represents the config instance
	// built from ConfigPath
	Config *apis.UpgradeConfig
}

Upgrade contains configurations to perform upgrade

func NewUpgradeForConfigPath

func NewUpgradeForConfigPath(filePath string) (*Upgrade, error)

NewUpgradeForConfigPath takes config file path and add config in upgrade instance

func (Upgrade) GoString

func (u Upgrade) GoString() string

GoString implements GoStringer interface

func (*Upgrade) Run

func (u *Upgrade) Run() error

Run runs various steps to upgrade unit of upgrades present in config.

func (Upgrade) String

func (u Upgrade) String() string

String implements Stringer interface

type UpgradeResult

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

UpgradeResult is a wrapper over upgrade.UpgradeResult struct

type UpgradeResultGetOrCreateBuilder

type UpgradeResultGetOrCreateBuilder struct {
	*errors.ErrorList
	SelfNamespace   string
	Owner           *metav1.OwnerReference      // owner reference for upgrade result cr
	UpgradeConfig   *upgrade.UpgradeConfig      // runtime config for upgrade
	ResourceDetails *upgrade.ResourceDetails    // unit of upgrade details
	Tasks           []upgrade.UpgradeResultTask // list of runtasks used to upgrade a resource
	UpgradeResult   *UpgradeResult
}

UpgradeResultGetOrCreateBuilder helps to get or create UpgradeResult instance

func NewUpgradeResultGetOrCreateBuilder

func NewUpgradeResultGetOrCreateBuilder() *UpgradeResultGetOrCreateBuilder

NewUpgradeResultGetOrCreateBuilder returns a new UpgradeResult instance

func (*UpgradeResultGetOrCreateBuilder) GetOrCreate

func (urb *UpgradeResultGetOrCreateBuilder) GetOrCreate() (
	res *upgrade.UpgradeResult, err error)

GetOrCreate builds a new instance of UpgradeResult with the helps of UpgradeResultGetOrCreateBuilder. Upgrade result cr is required to maintain resiliency in upgrade.

func (*UpgradeResultGetOrCreateBuilder) GoString

func (urb *UpgradeResultGetOrCreateBuilder) GoString() string

GoString implements GoStringer interface

func (*UpgradeResultGetOrCreateBuilder) String

String implements GoStringer interface

func (*UpgradeResultGetOrCreateBuilder) WithOwner

WithOwner adds OwnerReference in UpgradeResult instance

func (*UpgradeResultGetOrCreateBuilder) WithResourceDetails

WithResourceDetails adds ResourceDetails in UpgradeResult instance

func (*UpgradeResultGetOrCreateBuilder) WithSelfNamespace

func (urb *UpgradeResultGetOrCreateBuilder) WithSelfNamespace(
	namespace string) *UpgradeResultGetOrCreateBuilder

WithSelfNamespace adds Namespace in UpgradeResult instance

func (*UpgradeResultGetOrCreateBuilder) WithTasks

WithTasks adds Tasks in UpgradeResult instance

func (*UpgradeResultGetOrCreateBuilder) WithUpgradeConfig

WithUpgradeConfig adds UpgradeConfig in UpgradeResult instance

Jump to

Keyboard shortcuts

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