diff --git a/cyclops-ctrl/cmd/main/main.go b/cyclops-ctrl/cmd/main/main.go index 43f4614d..a7aae1ab 100644 --- a/cyclops-ctrl/cmd/main/main.go +++ b/cyclops-ctrl/cmd/main/main.go @@ -4,33 +4,33 @@ import ( "context" "flag" "fmt" - "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/modulecontroller" "os" + "strconv" + "time" + + _ "github.com/joho/godotenv/autoload" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" + _ "k8s.io/client-go/plugin/pkg/client/auth" + ctrl "sigs.k8s.io/controller-runtime" ctrlCache "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/healthz" + "sigs.k8s.io/controller-runtime/pkg/log/zap" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/webhook" - "strconv" - "time" + cyclopsv1alpha1 "github.com/cyclops-ui/cyclops/cyclops-ctrl/api/v1alpha1" "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/auth" "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/handler" "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/integrations/helm" + "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/modulecontroller" "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/prometheus" "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/telemetry" "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/template" "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/template/cache" "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/template/render" "github.com/cyclops-ui/cyclops/cyclops-ctrl/pkg/cluster/k8sclient" - _ "github.com/joho/godotenv/autoload" - "k8s.io/apimachinery/pkg/runtime" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - clientgoscheme "k8s.io/client-go/kubernetes/scheme" - _ "k8s.io/client-go/plugin/pkg/client/auth" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/log/zap" - - cyclopsv1alpha1 "github.com/cyclops-ui/cyclops/cyclops-ctrl/api/v1alpha1" ) var ( diff --git a/cyclops-ctrl/internal/handler/handler.go b/cyclops-ctrl/internal/handler/handler.go index 78531b2e..0007ef1a 100644 --- a/cyclops-ctrl/internal/handler/handler.go +++ b/cyclops-ctrl/internal/handler/handler.go @@ -2,6 +2,12 @@ package handler import ( "context" + "net/http" + "os/signal" + "syscall" + + "github.com/gin-gonic/gin" + "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/controller" "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/controller/sse" "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/integrations/helm" @@ -10,10 +16,6 @@ import ( templaterepo "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/template" "github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/template/render" "github.com/cyclops-ui/cyclops/cyclops-ctrl/pkg/cluster/k8sclient" - "github.com/gin-gonic/gin" - "net/http" - "os/signal" - "syscall" ) type Handler struct {