-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment state -> phase #83
Conversation
There was a problem hiding this 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.
} | ||
|
||
// Create services | ||
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())) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
This PR change the
State
field inDeploymentStatus
toPhase
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.