c.log("Deployment is not ready: %s/%s. observedGeneration (%d) does not match spec generation (%d).",dep.Namespace,dep.Name,dep.Status.ObservedGeneration,dep.ObjectMeta.Generation)
slog.Info("Deployment is not ready: observedGeneration does not match spec generation",
c.log("DaemonSet is not ready: %s/%s. observedGeneration (%d) does not match spec generation (%d).",ds.Namespace,ds.Name,ds.Status.ObservedGeneration,ds.ObjectMeta.Generation)
slog.Info("DaemonSet is not ready: observedGeneration does not match spec generation",
c.log("DaemonSet is not ready: %s/%s. %d out of %d expected pods have been scheduled",ds.Namespace,ds.Name,ds.Status.UpdatedNumberScheduled,ds.Status.DesiredNumberScheduled)
slog.Info("DaemonSet is not ready: not enough pods scheduled",
c.log("StatefulSet is not ready: %s/%s. observedGeneration (%d) does not match spec generation (%d).",sts.Namespace,sts.Name,sts.Status.ObservedGeneration,sts.ObjectMeta.Generation)
slog.Info("StatefulSet is not ready: observedGeneration does not match spec generation",
c.log("StatefulSet is not ready: %s/%s. %d out of %d expected pods have been scheduled",sts.Namespace,sts.Name,sts.Status.UpdatedReplicas,expectedReplicas)
slog.Info("StatefulSet is not ready: not enough pods scheduled",
"namespace",sts.Namespace,
"name",sts.Name,
"updatedReplicas",sts.Status.UpdatedReplicas,
"expectedReplicas",expectedReplicas)
returnfalse
}
ifint(sts.Status.ReadyReplicas)!=replicas{
c.log("StatefulSet is not ready: %s/%s. %d out of %d expected pods are ready",sts.Namespace,sts.Name,sts.Status.ReadyReplicas,replicas)
slog.Info("StatefulSet is not ready: not enough pods ready",
"namespace",sts.Namespace,
"name",sts.Name,
"readyReplicas",sts.Status.ReadyReplicas,
"expectedReplicas",replicas)
returnfalse
}
// This check only makes sense when all partitions are being upgraded otherwise during a
// partitioned rolling upgrade, this condition will never evaluate to true, leading to
c.log("StatefulSet is not ready: %s/%s. currentRevision %s does not yet match updateRevision %s",sts.Namespace,sts.Name,sts.Status.CurrentRevision,sts.Status.UpdateRevision)
slog.Info("StatefulSet is not ready: currentRevision does not match updateRevision",
"namespace",sts.Namespace,
"name",sts.Name,
"currentRevision",sts.Status.CurrentRevision,
"updateRevision",sts.Status.UpdateRevision)
returnfalse
}
c.log("StatefulSet is ready: %s/%s. %d out of %d expected pods are ready",sts.Namespace,sts.Name,sts.Status.ReadyReplicas,replicas)
c.log("ReplicationController is not ready: %s/%s. observedGeneration (%d) does not match spec generation (%d).",rc.Namespace,rc.Name,rc.Status.ObservedGeneration,rc.ObjectMeta.Generation)
slog.Info("ReplicationController is not ready: observedGeneration does not match spec generation",
c.log("ReplicaSet is not ready: %s/%s. observedGeneration (%d) does not match spec generation (%d).",rs.Namespace,rs.Name,rs.Status.ObservedGeneration,rs.ObjectMeta.Generation)
slog.Info("ReplicaSet is not ready: observedGeneration does not match spec generation",