From a5570728c47c3ec7ea3429eb4fcd009f3db5773c Mon Sep 17 00:00:00 2001 From: m00g3n Date: Mon, 2 Dec 2024 11:56:04 +0100 Subject: [PATCH] Fix logging shoot name --- internal/controller/runtime/runtime_controller.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/controller/runtime/runtime_controller.go b/internal/controller/runtime/runtime_controller.go index 20f181fb..2967b594 100644 --- a/internal/controller/runtime/runtime_controller.go +++ b/internal/controller/runtime/runtime_controller.go @@ -64,12 +64,7 @@ func (r *RuntimeReconciler) Reconcile(ctx context.Context, request ctrl.Request) runtimeID = runtime.Name } - shootName, ok := runtime.Labels["kyma-project.io/shoot-name"] - if !ok { - shootName = "N/D" - } - - log := r.Log.WithValues("runtimeID", runtimeID, "shootName", shootName, "requestID", r.RequestID.Add(1)) + log := r.Log.WithValues("runtimeID", runtimeID, "shootName", runtime.Spec.Shoot.Name, "requestID", r.RequestID.Add(1)) log.Info("Reconciling Runtime", "Name", runtime.Name, "Namespace", runtime.Namespace) stateFSM := fsm.NewFsm(