Skip to content

Commit

Permalink
old spec and cur spec log print
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-lss committed Mar 12, 2024
1 parent 856024b commit 257db21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pkg/controllers/component_condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package controllers
import (
"context"
"fmt"

"github.com/milvus-io/milvus-operator/apis/milvus.io/v1beta1"
"github.com/milvus-io/milvus-operator/pkg/util/rest"
"github.com/pkg/errors"
Expand Down Expand Up @@ -180,12 +179,8 @@ var HasTerminatingPodByListOpts = func(ctx context.Context, cli client.Client, m
if err := cli.List(ctx, podList, opts); err != nil {
return false, err
}
// Done : add logger
logger := ctrl.LoggerFrom(ctx)
logger.Info("pod lists", "pods count", len(podList.Items))

for _, pod := range podList.Items {
logger.Info("pod lists", "pod info.", pod)
if pod.DeletionTimestamp != nil {
return true, nil
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/controllers/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ func (r *MilvusReconciler) ReconcileComponentDeployment(
if IsEqual(old, cur) {
// Done: nothing diff
r.logger.Info("nothing diff context", "name", cur.Name, "namespace", cur.Namespace)
r.logger.Info("old spec", "spec", old)
r.logger.Info("cur spec", "spec", cur)
return nil
}

Expand Down

0 comments on commit 257db21

Please sign in to comment.