Skip to content

Commit

Permalink
add log print to reconcile
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-lss committed Mar 18, 2024
1 parent 5f6021c commit d6736da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/controllers/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,18 +395,18 @@ func (c MilvusComponent) IsImageUpdated(m *v1beta1.Milvus) bool {
defer cancel()

logger := ctrl.LoggerFrom(ctx)
logger.Info("IsImageUpdated", "ComponentsDeployStatus", len(m.Status.ComponentsDeployStatus), "name", c.GetName())
logger.Info("IsImageUpdated", "ComponentsDeployStatus", len(m.Status.ComponentsDeployStatus), "name", c.GetName(), "component", m.GetName())

if m.Status.ComponentsDeployStatus == nil {
return false
}
deployStatus := m.Status.ComponentsDeployStatus[c.GetName()]
logger.Info("IsImageUpdated", "m.Spec.Com.Image", m.Spec.Com.Image, "deployStatus.Image", deployStatus.Image, "name", c.GetName())
logger.Info("IsImageUpdated", "m.Spec.Com.Image", m.Spec.Com.Image, "deployStatus.Image", deployStatus.Image, "name", c.GetName(), "component", m.GetName())
if m.Spec.Com.Image != deployStatus.Image {
return false
}

logger.Info("IsImageUpdated", "deployStatus.GetState()", deployStatus.GetState(), "name", c.GetName())
logger.Info("IsImageUpdated", "deployStatus.GetState()", deployStatus.GetState(), "name", c.GetName(), "component", m.GetName())
if deployStatus.GetState() != v1beta1.DeploymentComplete {
return false
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/deployment_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func (m milvusDeploymentUpdater) RollingUpdateImageDependencyReady() bool {
logger.Info("RollingUpdateImageDependencyReady", "dep count", len(deps), "component", m.component)

for _, dep := range deps {
logger.Info("RollingUpdateImageDependencyReady", "dep", fmt.Sprintf("%s:%s", dep.Name, dep.FieldName))
logger.Info("RollingUpdateImageDependencyReady", "dep", fmt.Sprintf("%s:%s", dep.Name, dep.FieldName), "component", m.component)
if !dep.IsImageUpdated(m.GetMilvus()) {
return false
}
Expand Down

0 comments on commit d6736da

Please sign in to comment.