Skip to content

Commit

Permalink
Add controllers logis
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Mahmoud <mmahmoud@redhat.com>
  • Loading branch information
msherif1234 committed May 17, 2024
1 parent 682cd74 commit 751837e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions controllers/bpfapplication_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ package controllers
import (
"context"

bpfmaniov1alpha1 "github.com/bpfman/bpfman-operator/apis/v1alpha1"

"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"

bpfmaniov1alpha1 "github.com/bpfman/bpfman-operator/apis/v1alpha1"
)

// BpfApplicationReconciler reconciles a BpfApplication object
Expand Down
9 changes: 4 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import (
"flag"
"os"

bpfmaniov1alpha1 "github.com/bpfman/bpfman-operator/apis/v1alpha1"
"github.com/bpfman/bpfman-operator/controllers"

// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
// to ensure that exec-entrypoint and run can make use of them.
_ "k8s.io/client-go/plugin/pkg/client/auth"
Expand All @@ -32,10 +35,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/webhook"

bpfmaniov1alpha1 "github.com/bpfman/bpfman-operator/apis/v1alpha1"
"github.com/bpfman/bpfman-operator/controllers"
//+kubebuilder:scaffold:imports
)

var (
Expand Down Expand Up @@ -120,7 +119,7 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "BpfApplication")
os.Exit(1)
}
if err = (&bpfmaniov1alpha1.BpfApplication{}).SetupWebhookWithManager(mgr); err != nil {
if err = (&bpfmaniov1alpha1.BpfApplicationWebhook{}).SetupWebhookWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create webhook", "webhook", "BpfApplication")
os.Exit(1)
}
Expand Down

0 comments on commit 751837e

Please sign in to comment.