File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,10 +132,12 @@ func GetDeploymentWithName(
132132// IsReady - validates when deployment is ready deployed to whats being requested
133133// - the requested replicas in the spec matches the ReadyReplicas of the status
134134// - the Status.Replicas match Status.ReadyReplicas. if a deployment update is in progress, Replicas > ReadyReplicas
135+ // - all pods run the current spec (UpdatedReplicas == requested replicas)
135136// - both when the Generatation of the object matches the ObservedGeneration of the Status
136137func IsReady (deployment appsv1.Deployment ) bool {
137138 return deployment .Spec .Replicas != nil &&
138139 * deployment .Spec .Replicas == deployment .Status .ReadyReplicas &&
140+ * deployment .Spec .Replicas == deployment .Status .UpdatedReplicas &&
139141 deployment .Status .Replicas == deployment .Status .ReadyReplicas &&
140142 deployment .Generation == deployment .Status .ObservedGeneration
141143}
Original file line number Diff line number Diff line change @@ -152,9 +152,11 @@ func (s *StatefulSet) Delete(
152152
153153// IsReady - validates when deployment is ready deployed to whats being requested
154154// - the requested replicas in the spec matches the ReadyReplicas of the status
155+ // - all pods run the current spec (UpdatedReplicas == requested replicas)
155156// - both when the Generatation of the object matches the ObservedGeneration of the Status
156157func IsReady (deployment appsv1.StatefulSet ) bool {
157158 return deployment .Spec .Replicas != nil &&
158159 * deployment .Spec .Replicas == deployment .Status .ReadyReplicas &&
160+ * deployment .Spec .Replicas == deployment .Status .UpdatedReplicas &&
159161 deployment .Generation == deployment .Status .ObservedGeneration
160162}
You can’t perform that action at this time.
0 commit comments