-
Notifications
You must be signed in to change notification settings - Fork 381
Switch from ReconciledGeneration to ObservedGeneration (or change its semantics) #1747
Comments
This issue is related to the proposed changes for retries #1715, but can be resolved independently |
To support such usage of // DeploymentComplete considers a deployment to be complete once all of its desired replicas
// are updated and available, and no old pods are running.
func DeploymentComplete(deployment *extensions.Deployment, newStatus *extensions.DeploymentStatus) bool {
return newStatus.UpdatedReplicas == *(deployment.Spec.Replicas) &&
newStatus.Replicas == *(deployment.Spec.Replicas) &&
newStatus.AvailableReplicas == *(deployment.Spec.Replicas) &&
newStatus.ObservedGeneration >= deployment.Generation
} |
Item 10 from the list:
Current |
There are places where switching from isProvisioning := false
if instance.Status.ReconciledGeneration == 0 {
isProvisioning = true
} or case instance.Status.ReconciledGeneration != 0:
return reconcileUpdate
default: // instance.Status.ReconciledGeneration == 0
return reconcileAdd so maybe we need both (and set |
I'm processing all this still. At first, I'm not exactly sure what this buys us - do we need the new fields, or do we need to be smarter about when we updated ReconciledGeneration? |
@pmorie we have a number of problems with
With |
I think that |
Closed by #1748 |
Currently, if
ReconciledGeneration
is equal to instance'sGeneration
, we don't process Add/Update events:https://github.com/kubernetes-incubator/service-catalog/blob/master/pkg/controller/controller_instance.go#L257
Hence, as far as I can see, we don't update
ReconciledGeneration
if the retriable error occurs.This is bad, because then the user can't determine which
Generation
the current status conditions are relevant for (and whether a particularGeneration
has been processed).Correct semantics is
ObservedGeneration
:ObservedGeneration
along with updating status (even if there was a temporary retriable error)i.e. additionally to checking if
ObservedGeneration == Generation
, also check if we have actually finished processing this particular version of resource.The text was updated successfully, but these errors were encountered: