// rollback the deployment to the specified revision. In any case cleanup the rollback spec. func (dc *DeploymentController) rollback(ctx context.Context, d *apps.Deployment, rsList []*apps.ReplicaSet) error { … } // rollbackToTemplate compares the templates of the provided deployment and replica set and // updates the deployment with the replica set template in case they are different. It also // cleans up the rollback spec so subsequent requeues of the deployment won't end up in here. func (dc *DeploymentController) rollbackToTemplate(ctx context.Context, d *apps.Deployment, rs *apps.ReplicaSet) (bool, error) { … } func (dc *DeploymentController) emitRollbackWarningEvent(d *apps.Deployment, reason, message string) { … } func (dc *DeploymentController) emitRollbackNormalEvent(d *apps.Deployment, message string) { … } // updateDeploymentAndClearRollbackTo sets .spec.rollbackTo to nil and update the input deployment // It is assumed that the caller will have updated the deployment template appropriately (in case // we want to rollback). func (dc *DeploymentController) updateDeploymentAndClearRollbackTo(ctx context.Context, d *apps.Deployment) error { … } // TODO: Remove this when extensions/v1beta1 and apps/v1beta1 Deployment are dropped. func getRollbackTo(d *apps.Deployment) *extensions.RollbackConfig { … } // TODO: Remove this when extensions/v1beta1 and apps/v1beta1 Deployment are dropped. func setRollbackTo(d *apps.Deployment, rollbackTo *extensions.RollbackConfig) { … }