Skip to content

Commit

Permalink
fix manager config
Browse files Browse the repository at this point in the history
Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
  • Loading branch information
michi-covalent committed Aug 8, 2023
1 parent 1a1bd44 commit 758c90c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tetragonpod/internal/controller/tetragonpod_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ package controller
import (
"context"

ciliumiov1alpha1 "github.com/cilium/tetragon/tetragonpod/api/v1alpha1"
corev1 "k8s.io/api/core/v1"

"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/log"

ciliumiov1alpha1 "github.com/cilium/tetragon/tetragonpod/api/v1alpha1"
)

// TetragonPodReconciler reconciles a TetragonPod object
Expand Down Expand Up @@ -56,7 +54,7 @@ func (r *TetragonPodReconciler) Reconcile(ctx context.Context, req ctrl.Request)
return ctrl.Result{}, client.IgnoreNotFound(err)
}

l.Info("Pod", "Name", pod.Name, "Namespace", pod.Namespace)
l.Info("Reconcile this pod", "Name", pod.Name, "Namespace", pod.Namespace)

// TODO(user): your logic here

Expand All @@ -66,6 +64,7 @@ func (r *TetragonPodReconciler) Reconcile(ctx context.Context, req ctrl.Request)
// SetupWithManager sets up the controller with the Manager.
func (r *TetragonPodReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&ciliumiov1alpha1.TetragonPod{}).
For(&corev1.Pod{}).
Owns(&ciliumiov1alpha1.TetragonPod{}).
Complete(r)
}

0 comments on commit 758c90c

Please sign in to comment.