This repository has been archived by the owner on Dec 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: add logger definition in playbookexecution controller
Signed-off-by: Gloria Ciavarrini <[email protected]>
- Loading branch information
1 parent
7fff297
commit 3591f8d
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ import ( | |
ctrl "sigs.k8s.io/controller-runtime" | ||
"sigs.k8s.io/controller-runtime/pkg/client" | ||
"sigs.k8s.io/controller-runtime/pkg/event" | ||
"sigs.k8s.io/controller-runtime/pkg/log" | ||
"sigs.k8s.io/controller-runtime/pkg/predicate" | ||
|
||
"github.com/project-flotta/flotta-operator/api/v1alpha1" | ||
|
@@ -54,6 +55,9 @@ type PlaybookExecutionReconciler struct { | |
// For more details, check Reconcile and its Result here: | ||
// - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile | ||
func (r *PlaybookExecutionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { | ||
logger := log.FromContext(ctx) | ||
logger.Info("Reconciling", "playbookExecution", req) | ||
|
||
playbookExec, err := r.PlaybookExecutionRepository.Read(ctx, req.Name, req.Namespace) | ||
if err != nil { | ||
if errors.IsNotFound(err) { | ||
|
@@ -78,7 +82,7 @@ func (r *PlaybookExecutionReconciler) Reconcile(ctx context.Context, req ctrl.Re | |
} | ||
return ctrl.Result{Requeue: true}, err | ||
} | ||
logger.Info(">>> edgeDevice found", "edgeDevice", edgeDevice) | ||
logger.Info("edgeDevice found", "edgeDevice", edgeDevice) | ||
return ctrl.Result{}, nil | ||
} | ||
|
||
|