Skip to content

Conversation

@ewoutp
Copy link
Contributor

@ewoutp ewoutp commented Mar 27, 2018

This PR change the State field in DeploymentStatus to Phase and greatly reduced the number of phases.
The Phase is intended to indicate where in the lifetime a deployment is.
All other state related indicators are now communicated using conditions.

Furthermore, this PR prevents a deployment from going into a Failed phase (from which there is no recover possible) where-ever possible.

Copy link
Member

@neunhoef neunhoef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But see question for knowledge transfer.

if err := d.resources.EnsureServices(); err != nil {
d.failOnError(err, "Failed to create services")
return
d.CreateEvent(k8sutil.NewErrorEvent("Failed to create services", err, d.GetAPIObject()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does d.CreateEvent somehow leave this function early (maybe with a panic)? If not, is it right to simply move on, for example if the services have not been setup, should we go on to pods?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CreateEvent just comes back.
The inspection loop will keep trying to create all resources, so if something fails here, we just keep trying later.

@ewoutp ewoutp merged commit e5e30df into master Mar 28, 2018
@ewoutp ewoutp deleted the deployment-phase branch March 28, 2018 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants