Documentation
¶
Index ¶
- Constants
- func DeploymentStatus(deployment *appsv1.Deployment) (string, bool, error)
- func IsErrorUnrecoverable(err error) bool
- type NullStrategyInstaller
- type Strategy
- type StrategyDeploymentInstaller
- type StrategyDeploymentPermissions
- type StrategyDeploymentSpec
- type StrategyDetailsDeployment
- type StrategyError
- type StrategyInstaller
- type StrategyResolver
- type StrategyResolverInterface
Constants ¶
const ( StrategyErrReasonComponentMissing = "ComponentMissing" StrategyErrReasonWaiting = "Waiting" StrategyErrReasonInvalidStrategy = "InvalidStrategy" StrategyErrReasonTimeout = "Timeout" StrategyErrReasonUnknown = "Unknown" )
const (
InstallStrategyNameDeployment = "deployment"
)
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 ¶
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 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 ¶
func (i *StrategyDeploymentInstaller) Install(s Strategy) error
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 ¶
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 }