strategy

package
v3.6.0-rc.0+incompatible Latest Latest
Warning

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

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

Documentation

Overview

Package strategy contains implementations of core deployment strategies.

The code in this package will be more verbose with logging given the intended application as standalone Docker container CLI support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConditionReached added in v1.3.0

func IsConditionReached(err error) bool

func NewConditionReachedErr added in v1.3.0

func NewConditionReachedErr(msg string) error

func Percentage added in v1.3.0

func Percentage(until string) (int, bool)

func PercentageBetween added in v1.3.0

func PercentageBetween(until string, min, max int) bool

Types

type DeploymentStrategy

type DeploymentStrategy interface {
	// Deploy transitions an old deployment to a new one.
	Deploy(from *kapi.ReplicationController, to *kapi.ReplicationController, desiredReplicas int) error
}

DeploymentStrategy knows how to make a deployment active.

type UpdateAcceptor added in v1.0.6

type UpdateAcceptor interface {
	// Accept returns nil if the controller is okay, otherwise returns an error.
	Accept(*kapi.ReplicationController) error
}

UpdateAcceptor is given a chance to accept or reject the new controller during a deployment each time the controller is scaled up.

After the successful scale-up of the controller, the controller is given to the UpdateAcceptor. If the UpdateAcceptor rejects the controller, the deployment is stopped with an error.

DEPRECATED: Acceptance checking has been incorporated into the rolling strategy, but we still need this around to support Recreate.

Directories

Path Synopsis
Package support is a library of code useful to any strategy.
Package support is a library of code useful to any strategy.

Jump to

Keyboard shortcuts

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