From 56ae14675e9cb2d02cb77333e3114897435a92f4 Mon Sep 17 00:00:00 2001 From: Evan Johnson Date: Thu, 1 Feb 2024 14:33:58 -0500 Subject: [PATCH] update CRD creation for VPC and setup VPC Controller in main.go --- cmd/main.go | 9 +++++++++ config/crd/kustomization.yaml | 1 + 2 files changed, 10 insertions(+) diff --git a/cmd/main.go b/cmd/main.go index 5e30a5726..1cc5293b6 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -123,6 +123,15 @@ func main() { setupLog.Error(err, "unable to create controller", "controller", "LinodeMachine") os.Exit(1) } + if err = (&controller2.LinodeVPCReconciler{ + Client: mgr.GetClient(), + Recorder: mgr.GetEventRecorderFor("LinodeVPCReconciler"), + WatchFilterValue: clusterWatchFilter, + LinodeApiKey: linodeToken, + }).SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "LinodeVPC") + os.Exit(1) + } // +kubebuilder:scaffold:builder if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil { diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index f088cd229..ef232373f 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -11,6 +11,7 @@ resources: - bases/infrastructure.cluster.x-k8s.io_linodemachines.yaml - bases/infrastructure.cluster.x-k8s.io_linodemachinetemplates.yaml - bases/infrastructure.cluster.x-k8s.io_linodeclustertemplates.yaml +- bases/infrastructure.cluster.x-k8s.io_linodevpcs.yaml #+kubebuilder:scaffold:crdkustomizeresource patches: