Skip to content

Commit

Permalink
Reorder fields and logs
Browse files Browse the repository at this point in the history
  • Loading branch information
VOID404 committed Nov 22, 2024
1 parent 32e3626 commit 86293a9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/controller/runtime/runtime_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ func (r *RuntimeReconciler) Reconcile(ctx context.Context, request ctrl.Request)
}, client.IgnoreNotFound(err)
}

r.Log.Info("Reconciling Runtime", "Name", runtime.Name, "Namespace", runtime.Namespace)

runtimeID, ok := runtime.Labels["kyma-project.io/runtime-id"]
if !ok {
runtimeID = runtime.Name
Expand All @@ -69,8 +67,11 @@ func (r *RuntimeReconciler) Reconcile(ctx context.Context, request ctrl.Request)
shootName = "N/D"
}

log := r.Log.WithValues("runtime", runtimeID, "shoot", shootName)
log.Info("Reconciling Runtime", "Name", runtime.Name, "Namespace", runtime.Namespace)

stateFSM := fsm.NewFsm(
r.Log.WithName(fmt.Sprintf("reqID %d", requCounter)).WithValues("runtime", runtimeID, "shoot", shootName),
log.WithName(fmt.Sprintf("reqID %d", requCounter)),
r.Cfg,
fsm.K8s{
Client: r.Client,
Expand Down

0 comments on commit 86293a9

Please sign in to comment.