Skip to content

Commit

Permalink
convert_controller: replace log.WithContext to ctrl.LoggerFrom
Browse files Browse the repository at this point in the history
Signed-off-by: haorenfsa <[email protected]>
  • Loading branch information
haorenfsa committed Jul 9, 2024
1 parent a002625 commit e94f599
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controllers/milvuscluster/convert_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (r *MilvusClusterReconciler) Reconcile(ctx context.Context, req ctrl.Reques
milvus.Annotations = make(map[string]string)
}
if milvus.Annotations[v1beta1.DependencyValuesMergedAnnotation] != v1beta1.TrueStr {
logger := logr.FromContext(ctx)
logger := ctrl.LoggerFrom(ctx)
logger.Info("sync values from beta to alpha")
milvus.Labels = betaMilvus.Labels
milvus.Annotations = betaMilvus.Annotations
Expand All @@ -106,7 +106,7 @@ func (r *MilvusClusterReconciler) Reconcile(ctx context.Context, req ctrl.Reques
}

if milvus.Annotations[v1beta1.UpgradeAnnotation] == v1beta1.AnnotationUpgraded {
logger := logr.FromContext(ctx)
logger := ctrl.LoggerFrom(ctx)
logger.Info("sync upgraded from beta to alpha")
milvus.Labels = betaMilvus.Labels
milvus.Annotations = betaMilvus.Annotations
Expand Down

0 comments on commit e94f599

Please sign in to comment.