upgrade

package
v0.29.4-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OperatorPhase

type OperatorPhase interface {
	Exec(startFrom string, upgradeState *State) error
	Self() *cluster.OperationPhase
	SetUpgrade(upgradeEnabled bool)
}

type OperatorPhaseAsync

type OperatorPhaseAsync interface {
	OperatorPhase
	Stop() error
}

type OperatorPhaseAsyncDecorator

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

func NewOperatorPhaseAsyncDecorator

func NewOperatorPhaseAsyncDecorator(
	storer Storer,
	phase OperatorPhaseAsync,
	dryRun bool,
	upgr *Upgrade,
) *OperatorPhaseAsyncDecorator

func (*OperatorPhaseAsyncDecorator) Exec

func (d *OperatorPhaseAsyncDecorator) Exec(startFrom string, upgradeState *State) error

func (*OperatorPhaseAsyncDecorator) Self

func (*OperatorPhaseAsyncDecorator) SetUpgrade added in v0.29.4

func (d *OperatorPhaseAsyncDecorator) SetUpgrade(upgradeEnabled bool)

func (*OperatorPhaseAsyncDecorator) Stop

type OperatorPhaseDecorator

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

func NewOperatorPhaseDecorator

func NewOperatorPhaseDecorator(
	storer Storer,
	phase OperatorPhase,
	dryRun bool,
	upgr *Upgrade,
) *OperatorPhaseDecorator

func (*OperatorPhaseDecorator) Exec

func (d *OperatorPhaseDecorator) Exec(startFrom string, upgradeState *State) error

func (*OperatorPhaseDecorator) Self

func (*OperatorPhaseDecorator) SetUpgrade added in v0.29.4

func (d *OperatorPhaseDecorator) SetUpgrade(upgradeEnabled bool)

type Phase

type Phase struct {
	Status PhaseStatus `yaml:"status"`
}

type PhaseStatus

type PhaseStatus string
const (
	PhaseStatusSuccess PhaseStatus = "success"
	PhaseStatusFailed  PhaseStatus = "failed"
	PhaseStatusPending PhaseStatus = "pending"
)

type Phases

type Phases struct {
	PreInfrastructure  *Phase `yaml:"preInfrastructure,omitempty"`
	Infrastructure     *Phase `yaml:"infrastructure,omitempty"`
	PostInfrastructure *Phase `yaml:"postInfrastructure,omitempty"`
	PreKubernetes      *Phase `yaml:"preKubernetes,omitempty"`
	Kubernetes         *Phase `yaml:"kubernetes,omitempty"`
	PostKubernetes     *Phase `yaml:"postKubernetes,omitempty"`
	PreDistribution    *Phase `yaml:"preDistribution,omitempty"`
	Distribution       *Phase `yaml:"distribution,omitempty"`
	PostDistribution   *Phase `yaml:"postDistribution,omitempty"`
}

type ReducerOperatorPhaseAsyncDecorator

type ReducerOperatorPhaseAsyncDecorator[T Reducers] struct {
	// contains filtered or unexported fields
}

func NewReducerOperatorPhaseAsyncDecorator

func NewReducerOperatorPhaseAsyncDecorator[T Reducers](
	storer Storer,
	phase ReducersOperatorPhaseAsync[T],
	dryRun bool,
	upgr *Upgrade,
) *ReducerOperatorPhaseAsyncDecorator[T]

func (*ReducerOperatorPhaseAsyncDecorator[T]) Exec

func (d *ReducerOperatorPhaseAsyncDecorator[T]) Exec(reducers T, startFrom string, upgradeState *State) error

func (*ReducerOperatorPhaseAsyncDecorator[T]) Self

func (*ReducerOperatorPhaseAsyncDecorator[T]) SetUpgrade added in v0.29.4

func (d *ReducerOperatorPhaseAsyncDecorator[T]) SetUpgrade(upgradeEnabled bool)

func (*ReducerOperatorPhaseAsyncDecorator[T]) Stop

type ReducerOperatorPhaseDecorator

type ReducerOperatorPhaseDecorator[T Reducers] struct {
	// contains filtered or unexported fields
}

func NewReducerOperatorPhaseDecorator

func NewReducerOperatorPhaseDecorator[T Reducers](
	storer Storer,
	phase ReducersOperatorPhase[T],
	dryRun bool,
	upgr *Upgrade,
) *ReducerOperatorPhaseDecorator[T]

func (*ReducerOperatorPhaseDecorator[T]) Exec

func (d *ReducerOperatorPhaseDecorator[T]) Exec(reducers T, startFrom string, upgradeState *State) error

func (*ReducerOperatorPhaseDecorator[T]) Self

func (*ReducerOperatorPhaseDecorator[T]) SetUpgrade added in v0.29.4

func (d *ReducerOperatorPhaseDecorator[T]) SetUpgrade(upgradeEnabled bool)

type Reducers

type Reducers = any

type ReducersOperatorPhase

type ReducersOperatorPhase[T Reducers] interface {
	Exec(reducers T, startFrom string, upgradeState *State) error
	SetUpgrade(upgradeEnabled bool)
	Self() *cluster.OperationPhase
}

type ReducersOperatorPhaseAsync

type ReducersOperatorPhaseAsync[T Reducers] interface {
	ReducersOperatorPhase[T]
	Stop() error
}

type State

type State struct {
	Phases Phases `yaml:"phases"`
}

type StateStore

type StateStore struct {
	WorkDir       string
	KubectlRunner *kubectl.Runner
}

func NewStateStore

func NewStateStore(workDir, kubectlVersion, binPath string) *StateStore

func (*StateStore) Delete

func (s *StateStore) Delete() error

func (*StateStore) Get

func (s *StateStore) Get() ([]byte, error)

func (*StateStore) GetLatestResumablePhase

func (*StateStore) GetLatestResumablePhase(state *State) string

func (*StateStore) Store

func (s *StateStore) Store(state *State) error

type Storer

type Storer interface {
	Store(state *State) error
	Get() ([]byte, error)
	Delete() error
	GetLatestResumablePhase(state *State) string
}

type Upgrade

type Upgrade struct {
	Enabled bool
	From    string
	To      string
	// contains filtered or unexported fields
}

func New

func New(
	paths cluster.CreatorPaths,
	kind string,
) *Upgrade

func (*Upgrade) Exec

func (u *Upgrade) Exec(workdir, phase string) error

Jump to

Keyboard shortcuts

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