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 a9c692e commit 49d4e44
Showing 1 changed file with 3 additions and 3 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(), "component", m.Name)
logger.Info("IsImageUpdated", "ComponentsDeployStatus", len(m.Status.ComponentsDeployStatus), "name", c.GetName(), "component", m.Status.Endpoint, "component", m.Spec)

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(), "component", m.Name)
logger.Info("IsImageUpdated", "m.Spec.Com.Image", m.Spec.Com.Image, "deployStatus.Image", deployStatus.Image, "name", c.GetName(), "component", m.Status.Endpoint, "component", m.Spec)
if m.Spec.Com.Image != deployStatus.Image {
return false
}

logger.Info("IsImageUpdated", "deployStatus.GetState()", deployStatus.GetState(), "name", c.GetName(), "component", m.Name)
logger.Info("IsImageUpdated", "deployStatus.GetState()", deployStatus.GetState(), "name", c.GetName(), "component", m.Status.Endpoint, "component", m.Spec)
if deployStatus.GetState() != v1beta1.DeploymentComplete {
return false
}
Expand Down

0 comments on commit 49d4e44

Please sign in to comment.