Documentation ¶
Overview ¶
Package controller contains all the controllers which taken together implement the deployment system's behavior.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicDeploymentController ¶
type BasicDeploymentController struct { DeploymentUpdater bdcDeploymentUpdater ReplicationControllerClient bdcReplicationControllerClient NextDeployment func() *deployapi.Deployment }
BasicDeploymentController implements the DeploymentStrategyTypeBasic deployment strategy. Its behavior is to create new replication controllers as defined on a Deployment, and delete any previously existing replication controllers for the same DeploymentConfig associated with the deployment.
func (*BasicDeploymentController) HandleDeployment ¶
func (dc *BasicDeploymentController) HandleDeployment() error
HandleDeployment executes a single Deployment. It's assumed that the strategy of the deployment is DeploymentStrategyTypeBasic.
func (*BasicDeploymentController) Run ¶
func (dc *BasicDeploymentController) Run()
type CustomPodDeploymentController ¶
type CustomPodDeploymentController struct { DeploymentInterface dcDeploymentInterface PodInterface dcPodInterface Environment []kapi.EnvVar NextDeployment func() *deployapi.Deployment NextPod func() *kapi.Pod DeploymentStore cache.Store DefaultImage string UseLocalImages bool }
CustomPodDeploymentController implements the DeploymentStrategyTypeCustomPod deployment strategy. Its behavior is to delegate the deployment logic to a pod. The status of the resulting Deployment will follow the status of the corresponding pod.
func (*CustomPodDeploymentController) HandleDeployment ¶
func (dc *CustomPodDeploymentController) HandleDeployment() error
Invokes the appropriate handler for the current state of the given deployment.
func (*CustomPodDeploymentController) HandlePod ¶
func (dc *CustomPodDeploymentController) HandlePod() error
func (*CustomPodDeploymentController) Run ¶
func (dc *CustomPodDeploymentController) Run()
Run begins watching and synchronizing deployment states.
type DeploymentConfigChangeController ¶
type DeploymentConfigChangeController struct { ChangeStrategy changeStrategy NextDeploymentConfig func() *deployapi.DeploymentConfig DeploymentStore cache.Store }
DeploymentConfigChangeController watches for changes to DeploymentConfigs and regenerates them only when detecting a change to the PodTemplate of a DeploymentConfig containing a ConfigChange trigger.
func (*DeploymentConfigChangeController) HandleDeploymentConfig ¶
func (dc *DeploymentConfigChangeController) HandleDeploymentConfig()
HandleDeploymentConfig handles the next DeploymentConfig change that happens.
func (*DeploymentConfigChangeController) Run ¶
func (dc *DeploymentConfigChangeController) Run()
Run watches for config change events.
type DeploymentConfigController ¶
type DeploymentConfigController struct { DeploymentInterface deploymentInterface // Blocks until the next DeploymentConfig is available NextDeploymentConfig func() *deployapi.DeploymentConfig }
DeploymentConfigController is responsible for creating a Deployment when a DeploymentConfig is updated with a new LatestVersion. Any deployment created is correlated to a DeploymentConfig by setting the DeploymentConfigLabel on the deployment.
func (*DeploymentConfigController) HandleDeploymentConfig ¶
func (c *DeploymentConfigController) HandleDeploymentConfig()
Process a single DeploymentConfig event.
func (*DeploymentConfigController) Run ¶
func (c *DeploymentConfigController) Run()
Process DeploymentConfig events one at a time.
type ImageChangeController ¶
type ImageChangeController struct { DeploymentConfigInterface icDeploymentConfigInterface NextImageRepository func() *imageapi.ImageRepository DeploymentConfigStore cache.Store }
ImageChangeController watches for changes to ImageRepositories and regenerates DeploymentConfigs when a new version of a tag referenced by a DeploymentConfig is available.
func (*ImageChangeController) HandleImageRepo ¶
func (c *ImageChangeController) HandleImageRepo()
HandleImageRepo processes the next ImageRepository event.
func (*ImageChangeController) Run ¶
func (c *ImageChangeController) Run()
Run processes ImageRepository events one by one.