Documentation
¶
Overview ¶
Package rollback contains the code for generating DeploymentConfigs representing rollbacks as well as REST support for API clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewREST ¶
func NewREST(generator GeneratorClient, deploymentGetter DeploymentGetter, configGetter DeploymentConfigGetter, codec runtime.Codec) apiserver.RESTStorage
NewREST safely creates a new REST.
Types ¶
type DeploymentConfigGetter ¶
type DeploymentConfigGetter interface {
GetDeploymentConfig(namespace, name string) (*deployapi.DeploymentConfig, error)
}
DeploymentConfigGetter is a local interface to DeploymentConfigs for testability.
type DeploymentGetter ¶
type DeploymentGetter interface {
GetDeployment(namespace, name string) (*kapi.ReplicationController, error)
}
DeploymentGetter is a local interface to ReplicationControllers for testability.
type GeneratorClient ¶
type GeneratorClient interface {
Generate(from, to *deployapi.DeploymentConfig, spec *deployapi.DeploymentConfigRollbackSpec) (*deployapi.DeploymentConfig, error)
}
GeneratorClient defines a local interface to a rollback generator for testability.
type REST ¶
type REST struct {
// contains filtered or unexported fields
}
REST provides a rollback generation endpoint. Only the Create method is implemented.
type RollbackGenerator ¶
type RollbackGenerator struct {
}
RollbackGenerator generates a new DeploymentConfig by merging a pair of DeploymentConfigs in a configurable way.
func (*RollbackGenerator) Generate ¶
func (g *RollbackGenerator) Generate(from, to *deployapi.DeploymentConfig, spec *deployapi.DeploymentConfigRollbackSpec) (*deployapi.DeploymentConfig, error)
Generate creates a new DeploymentConfig by merging to onto from based on the options provided by spec. The LatestVersion of the result is unconditionally incremented, as rollback candidates are should be possible to be deployed manually regardless of other system behavior such as triggering.