Documentation
¶
Overview ¶
This file implements a rolling update FSM
Index ¶
- func NewMachine(ctx context.Context, config Config) (*fsm.FSM, error)
- func RuntimeConfigUpdates(manifest schema.Manifest, operator ConfigPackageRotator, ...) (updates []storage.UpdateServer, err error)
- func RuntimeConfigUpdatesWithSecrets(manifest schema.Manifest, operator ConfigPackageRotator, ...) (updates []storage.UpdateServer, err error)
- type Builder
- type Config
- type ConfigPackageRotator
- type Dispatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMachine ¶
NewMachine creates an operation FSM that implements a rolling update strategy
func RuntimeConfigUpdates ¶
func RuntimeConfigUpdates( manifest schema.Manifest, operator ConfigPackageRotator, operationKey ops.SiteOperationKey, servers []storage.Server, ) (updates []storage.UpdateServer, err error)
RuntimeConfigUpdates computes the runtime configuration updates for the specified list of servers
func RuntimeConfigUpdatesWithSecrets ¶
func RuntimeConfigUpdatesWithSecrets( manifest schema.Manifest, operator ConfigPackageRotator, operationKey ops.SiteOperationKey, servers []storage.Server, ) (updates []storage.UpdateServer, err error)
RuntimeConfigUpdatesWithSecrets computes the runtime configuration updates for the specified list of servers. The result includes updates for the secrets packages.
Types ¶
type Builder ¶
type Builder struct { // App specifies the cluster application App loc.Locator // CustomUpdate optionally specifies the custom phase CustomUpdate *storage.OperationPhase }
Builder builds an operation plan
type Config ¶
type Config struct { update.Config // Dispatcher specifies optional phase dispatcher. // If unspecified, default dispatcher is used. // // Implementations that reimplement certain steps or implement new steps // can set this field and use an instance of the default dispatcher as a fallback Dispatcher // HostLocalPackages specifies the package service on local host HostLocalPackages update.LocalPackageService // Apps is the cluster application service Apps app.Applications // ClusterPackages specifies the cluster package service ClusterPackages pack.PackageService // Client specifies the optional kubernetes client Client *kubernetes.Clientset }
Config describes configuration for executing a rolling update operation
type ConfigPackageRotator ¶
type ConfigPackageRotator interface { RotatePlanetConfig(ops.RotatePlanetConfigRequest) (*ops.RotatePackageResponse, error) RotateSecrets(ops.RotateSecretsRequest) (*ops.RotatePackageResponse, error) }
ConfigPackageRotator defines the subset of Operator for updating package configuration
type Dispatcher ¶
type Dispatcher interface { // Dispatch returns an executor for the given parameters and the specified remote Dispatch(Config, fsm.ExecutorParams, fsm.Remote, log.FieldLogger) (fsm.PhaseExecutor, error) }
Dispatcher routes the set of execution parameters to a specific operation phase
func NewDefaultDispatcher ¶
func NewDefaultDispatcher() Dispatcher
NewDefaultDispatcher returns a new instance of the default phase dispatcher