install

package
v3.11.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: Apache-2.0 Imports: 11 Imported by: 8

Documentation

Index

Constants

View Source
const (
	StrategyErrReasonComponentMissing = "ComponentMissing"
	StrategyErrReasonWaiting          = "Waiting"
	StrategyErrReasonInvalidStrategy  = "InvalidStrategy"
	StrategyErrReasonTimeout          = "Timeout"
	StrategyErrReasonUnknown          = "Unknown"
)
View Source
const (
	InstallStrategyNameDeployment = "deployment"
)
View Source
const TimedOutReason = "ProgressDeadlineExceeded"

Variables

This section is empty.

Functions

func DeploymentStatus

func DeploymentStatus(deployment *appsv1.Deployment) (string, bool, error)

Status returns a message describing deployment status, and a bool value indicating if the status is considered done.

func IsErrorUnrecoverable

func IsErrorUnrecoverable(err error) bool

IsErrorUnrecoverable reports if a given strategy error is one of the predefined unrecoverable types

Types

type NullStrategyInstaller

type NullStrategyInstaller struct{}

func (*NullStrategyInstaller) CheckInstalled

func (i *NullStrategyInstaller) CheckInstalled(s Strategy) (bool, error)

func (*NullStrategyInstaller) Install

func (i *NullStrategyInstaller) Install(s Strategy) error

type Strategy

type Strategy interface {
	GetStrategyName() string
}

type StrategyDeploymentInstaller

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

func (*StrategyDeploymentInstaller) CheckInstalled

func (i *StrategyDeploymentInstaller) CheckInstalled(s Strategy) (installed bool, err error)

CheckInstalled can return nil (installed), or errors Errors can indicate: some component missing (keep installing), unable to query (check again later), or unrecoverable (failed in a way we know we can't recover from)

func (*StrategyDeploymentInstaller) Install

type StrategyDeploymentPermissions

type StrategyDeploymentPermissions struct {
	ServiceAccountName string            `json:"serviceAccountName"`
	Rules              []rbac.PolicyRule `json:"rules"`
}

StrategyDeploymentPermissions describe the rbac rules and service account needed by the install strategy

type StrategyDeploymentSpec

type StrategyDeploymentSpec struct {
	Name string                `json:"name"`
	Spec appsv1.DeploymentSpec `json:"spec"`
}

StrategyDeploymentSpec contains the name and spec for the deployment ALM should create

type StrategyDetailsDeployment

type StrategyDetailsDeployment struct {
	DeploymentSpecs []StrategyDeploymentSpec        `json:"deployments"`
	Permissions     []StrategyDeploymentPermissions `json:"permissions,omitempty"`
}

StrategyDetailsDeployment represents the parsed details of a Deployment InstallStrategy.

func (*StrategyDetailsDeployment) GetStrategyName

func (d *StrategyDetailsDeployment) GetStrategyName() string

type StrategyError

type StrategyError struct {
	Reason  string
	Message string
}

StrategyError is used to represent error types for install strategies

func (StrategyError) Error

func (e StrategyError) Error() string

Error implements the Error interface.

type StrategyInstaller

type StrategyInstaller interface {
	Install(strategy Strategy) error
	CheckInstalled(strategy Strategy) (bool, error)
}

func NewStrategyDeploymentInstaller

func NewStrategyDeploymentInstaller(strategyClient wrappers.InstallStrategyDeploymentInterface, owner ownerutil.Owner, previousStrategy Strategy) StrategyInstaller

type StrategyResolver

type StrategyResolver struct{}

func (*StrategyResolver) InstallerForStrategy

func (r *StrategyResolver) InstallerForStrategy(strategyName string, opClient operatorclient.ClientInterface, owner ownerutil.Owner, previousStrategy Strategy) StrategyInstaller

func (*StrategyResolver) UnmarshalStrategy

func (r *StrategyResolver) UnmarshalStrategy(s v1alpha1.NamedInstallStrategy) (strategy Strategy, err error)

type StrategyResolverInterface

type StrategyResolverInterface interface {
	UnmarshalStrategy(s v1alpha1.NamedInstallStrategy) (strategy Strategy, err error)
	InstallerForStrategy(strategyName string, opClient operatorclient.ClientInterface, owner ownerutil.Owner, previousStrategy Strategy) StrategyInstaller
}

Jump to

Keyboard shortcuts

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