diff --git a/pkg/app/webhook.go b/pkg/app/webhook.go index 5d0c9dca..3d2c9a91 100644 --- a/pkg/app/webhook.go +++ b/pkg/app/webhook.go @@ -1,11 +1,10 @@ package app import ( - "gopkg.in/alecthomas/kingpin.v2" - "github.com/deckhouse/module-sdk/pkg/webhook/admission" "github.com/deckhouse/module-sdk/pkg/webhook/conversion" "github.com/deckhouse/module-sdk/pkg/webhook/server" + "gopkg.in/alecthomas/kingpin.v2" ) var ValidatingWebhookSettings = &admission.WebhookSettings{ diff --git a/pkg/hook/binding_context/binding_context.go b/pkg/hook/binding_context/binding_context.go index 710299fe..de954083 100644 --- a/pkg/hook/binding_context/binding_context.go +++ b/pkg/hook/binding_context/binding_context.go @@ -4,11 +4,10 @@ import ( "encoding/json" "github.com/deckhouse/deckhouse/pkg/log" - v1 "k8s.io/api/admission/v1" - apixv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - . "github.com/deckhouse/module-sdk/pkg/hook/types" . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" + v1 "k8s.io/api/admission/v1" + apixv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" ) // BindingContext contains information about event for hook diff --git a/pkg/hook/config/config.go b/pkg/hook/config/config.go index 2cf96af9..2cb2fd71 100644 --- a/pkg/hook/config/config.go +++ b/pkg/hook/config/config.go @@ -3,9 +3,8 @@ package config import ( "fmt" - "sigs.k8s.io/yaml" - . "github.com/deckhouse/module-sdk/pkg/hook/types" + "sigs.k8s.io/yaml" ) var validBindingTypes = []BindingType{OnStartup, Schedule, OnKubernetesEvent, KubernetesValidating, KubernetesMutating, KubernetesConversion} diff --git a/pkg/hook/config/config_v0.go b/pkg/hook/config/config_v0.go index 328b20f1..671e724c 100644 --- a/pkg/hook/config/config_v0.go +++ b/pkg/hook/config/config_v0.go @@ -3,13 +3,12 @@ package config import ( "fmt" - "gopkg.in/robfig/cron.v2" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - . "github.com/deckhouse/module-sdk/pkg/hook/types" "github.com/deckhouse/module-sdk/pkg/kube-events-manager" . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" . "github.com/deckhouse/module-sdk/pkg/schedule-manager/types" + "gopkg.in/robfig/cron.v2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) type HookConfigV0 struct { diff --git a/pkg/hook/config/config_v1.go b/pkg/hook/config/config_v1.go index c5b2fbb6..df18eb34 100644 --- a/pkg/hook/config/config_v1.go +++ b/pkg/hook/config/config_v1.go @@ -5,12 +5,6 @@ import ( "strconv" "time" - "github.com/hashicorp/go-multierror" - "gopkg.in/robfig/cron.v2" - v1 "k8s.io/api/admissionregistration/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - . "github.com/deckhouse/module-sdk/pkg/hook/types" "github.com/deckhouse/module-sdk/pkg/kube-events-manager" . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" @@ -18,6 +12,12 @@ import ( "github.com/deckhouse/module-sdk/pkg/webhook/admission" "github.com/deckhouse/module-sdk/pkg/webhook/conversion" "github.com/deckhouse/module-sdk/pkg/webhook/validating/validation" + "github.com/hashicorp/go-multierror" + "gopkg.in/robfig/cron.v2" + v1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "github.com/flant/shell-operator/pkg/app" ) diff --git a/pkg/hook/controller/admission_bindings_controller.go b/pkg/hook/controller/admission_bindings_controller.go index 1f23b172..65bb8651 100644 --- a/pkg/hook/controller/admission_bindings_controller.go +++ b/pkg/hook/controller/admission_bindings_controller.go @@ -2,11 +2,10 @@ package controller import ( "github.com/deckhouse/deckhouse/pkg/log" - v1 "k8s.io/api/admission/v1" - . "github.com/deckhouse/module-sdk/pkg/hook/binding-context" . "github.com/deckhouse/module-sdk/pkg/hook/types" "github.com/deckhouse/module-sdk/pkg/webhook/admission" + v1 "k8s.io/api/admission/v1" ) // AdmissionBindingToWebhookLink is a link between a hook and a webhook configuration. diff --git a/pkg/hook/controller/conversion_bindings_controller.go b/pkg/hook/controller/conversion_bindings_controller.go index 56e2aa01..e5d0269b 100644 --- a/pkg/hook/controller/conversion_bindings_controller.go +++ b/pkg/hook/controller/conversion_bindings_controller.go @@ -2,11 +2,10 @@ package controller import ( "github.com/deckhouse/deckhouse/pkg/log" - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - . "github.com/deckhouse/module-sdk/pkg/hook/binding-context" . "github.com/deckhouse/module-sdk/pkg/hook/types" "github.com/deckhouse/module-sdk/pkg/webhook/conversion" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" ) // A link between a hook and a kube monitor diff --git a/pkg/hook/controller/hook_controller.go b/pkg/hook/controller/hook_controller.go index 3af08d86..09050ca3 100644 --- a/pkg/hook/controller/hook_controller.go +++ b/pkg/hook/controller/hook_controller.go @@ -2,14 +2,14 @@ package controller import ( "github.com/deckhouse/deckhouse/pkg/log" - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - . "github.com/deckhouse/module-sdk/pkg/hook/binding-context" . "github.com/deckhouse/module-sdk/pkg/hook/types" "github.com/deckhouse/module-sdk/pkg/kube-events-manager" . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" "github.com/deckhouse/module-sdk/pkg/webhook/admission" "github.com/deckhouse/module-sdk/pkg/webhook/conversion" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "github.com/flant/shell-operator/pkg/schedule_manager" ) diff --git a/pkg/hook/controller/hook_controller_test.go b/pkg/hook/controller/hook_controller_test.go index e31f3587..868166fc 100644 --- a/pkg/hook/controller/hook_controller_test.go +++ b/pkg/hook/controller/hook_controller_test.go @@ -5,12 +5,12 @@ import ( "testing" "github.com/deckhouse/deckhouse/pkg/log" - . "github.com/onsi/gomega" - "github.com/deckhouse/module-sdk/pkg/hook/binding-context" "github.com/deckhouse/module-sdk/pkg/hook/types" "github.com/deckhouse/module-sdk/pkg/kube-events-manager" types2 "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" + . "github.com/onsi/gomega" + "github.com/flant/kube-client/fake" "github.com/flant/shell-operator/pkg/hook/config" ) diff --git a/pkg/hook/controller/kubernetes_bindings_controller.go b/pkg/hook/controller/kubernetes_bindings_controller.go index 0b1d095b..57de6252 100644 --- a/pkg/hook/controller/kubernetes_bindings_controller.go +++ b/pkg/hook/controller/kubernetes_bindings_controller.go @@ -4,11 +4,11 @@ import ( "fmt" "github.com/deckhouse/deckhouse/pkg/log" - . "github.com/deckhouse/module-sdk/pkg/hook/binding-context" . "github.com/deckhouse/module-sdk/pkg/hook/types" "github.com/deckhouse/module-sdk/pkg/kube-events-manager" . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" + utils "github.com/flant/shell-operator/pkg/utils/labels" ) diff --git a/pkg/hook/controller/schedule_bindings_controller.go b/pkg/hook/controller/schedule_bindings_controller.go index 5a3dcab0..6d5bdeb4 100644 --- a/pkg/hook/controller/schedule_bindings_controller.go +++ b/pkg/hook/controller/schedule_bindings_controller.go @@ -3,6 +3,7 @@ package controller import ( . "github.com/deckhouse/module-sdk/pkg/hook/binding-context" . "github.com/deckhouse/module-sdk/pkg/hook/types" + "github.com/flant/shell-operator/pkg/schedule_manager" ) diff --git a/pkg/hook/hook.go b/pkg/hook/hook.go index dbe25abc..75e801c7 100644 --- a/pkg/hook/hook.go +++ b/pkg/hook/hook.go @@ -9,15 +9,15 @@ import ( "strings" "github.com/deckhouse/deckhouse/pkg/log" - uuid "github.com/gofrs/uuid/v5" - "github.com/kennygrant/sanitize" - "golang.org/x/time/rate" - . "github.com/deckhouse/module-sdk/pkg/hook/binding-context" . "github.com/deckhouse/module-sdk/pkg/hook/types" "github.com/deckhouse/module-sdk/pkg/metric-storage/operation" "github.com/deckhouse/module-sdk/pkg/webhook/admission" "github.com/deckhouse/module-sdk/pkg/webhook/conversion" + uuid "github.com/gofrs/uuid/v5" + "github.com/kennygrant/sanitize" + "golang.org/x/time/rate" + "github.com/flant/shell-operator/pkg/app" "github.com/flant/shell-operator/pkg/executor" "github.com/flant/shell-operator/pkg/hook/config" diff --git a/pkg/hook/hook_manager.go b/pkg/hook/hook_manager.go index 67d40558..4215fde8 100644 --- a/pkg/hook/hook_manager.go +++ b/pkg/hook/hook_manager.go @@ -9,13 +9,13 @@ import ( "strings" "github.com/deckhouse/deckhouse/pkg/log" - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - . "github.com/deckhouse/module-sdk/pkg/hook/types" "github.com/deckhouse/module-sdk/pkg/kube-events-manager" . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" "github.com/deckhouse/module-sdk/pkg/webhook/admission" "github.com/deckhouse/module-sdk/pkg/webhook/conversion" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "github.com/flant/shell-operator/pkg/executor" "github.com/flant/shell-operator/pkg/hook/controller" "github.com/flant/shell-operator/pkg/schedule_manager" diff --git a/pkg/hook/hook_manager_test.go b/pkg/hook/hook_manager_test.go index cd474fe7..b2f3c28c 100644 --- a/pkg/hook/hook_manager_test.go +++ b/pkg/hook/hook_manager_test.go @@ -6,11 +6,11 @@ import ( "testing" "github.com/deckhouse/deckhouse/pkg/log" - . "github.com/onsi/gomega" - "github.com/deckhouse/module-sdk/pkg/hook/types" "github.com/deckhouse/module-sdk/pkg/webhook/admission" "github.com/deckhouse/module-sdk/pkg/webhook/conversion" + . "github.com/onsi/gomega" + "github.com/flant/shell-operator/pkg/app" "github.com/flant/shell-operator/pkg/hook/controller" ) diff --git a/pkg/hook/hook_test.go b/pkg/hook/hook_test.go index 2fd03caa..c7fa67da 100644 --- a/pkg/hook/hook_test.go +++ b/pkg/hook/hook_test.go @@ -6,10 +6,10 @@ import ( "time" "github.com/deckhouse/deckhouse/pkg/log" + . "github.com/deckhouse/module-sdk/pkg/hook/types" . "github.com/onsi/gomega" "golang.org/x/time/rate" - . "github.com/deckhouse/module-sdk/pkg/hook/types" "github.com/flant/shell-operator/pkg/hook/config" ) diff --git a/pkg/hook/task_metadata/task_metadata.go b/pkg/hook/task_metadata/task_metadata.go index 03db8296..eef2e649 100644 --- a/pkg/hook/task_metadata/task_metadata.go +++ b/pkg/hook/task_metadata/task_metadata.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/deckhouse/deckhouse/pkg/log" - "github.com/deckhouse/module-sdk/pkg/hook/binding-context" "github.com/deckhouse/module-sdk/pkg/hook/types" + "github.com/flant/shell-operator/pkg/task" ) diff --git a/pkg/hook/task_metadata/task_metadata_test.go b/pkg/hook/task_metadata/task_metadata_test.go index 32b5067f..bc1569ae 100644 --- a/pkg/hook/task_metadata/task_metadata_test.go +++ b/pkg/hook/task_metadata/task_metadata_test.go @@ -5,10 +5,10 @@ import ( "strings" "testing" - . "github.com/onsi/gomega" - . "github.com/deckhouse/module-sdk/pkg/hook/binding-context" . "github.com/deckhouse/module-sdk/pkg/hook/types" + . "github.com/onsi/gomega" + "github.com/flant/shell-operator/pkg/task" "github.com/flant/shell-operator/pkg/task/queue" ) diff --git a/pkg/kube_events_manager/filter.go b/pkg/kube_events_manager/filter.go index 7c01ee2e..cff2c233 100644 --- a/pkg/kube_events_manager/filter.go +++ b/pkg/kube_events_manager/filter.go @@ -8,9 +8,9 @@ import ( "runtime" "runtime/trace" + . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" "github.com/flant/shell-operator/pkg/app" "github.com/flant/shell-operator/pkg/jq" utils_checksum "github.com/flant/shell-operator/pkg/utils/checksum" diff --git a/pkg/kube_events_manager/kube_events_manager.go b/pkg/kube_events_manager/kube_events_manager.go index 3a553988..57aeb912 100644 --- a/pkg/kube_events_manager/kube_events_manager.go +++ b/pkg/kube_events_manager/kube_events_manager.go @@ -6,9 +6,9 @@ import ( "sync" "github.com/deckhouse/deckhouse/pkg/log" - . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" "github.com/deckhouse/module-sdk/pkg/metric-storage" + klient "github.com/flant/kube-client/client" ) diff --git a/pkg/kube_events_manager/kube_events_manager_test.go b/pkg/kube_events_manager/kube_events_manager_test.go index 12d985dd..fb954287 100644 --- a/pkg/kube_events_manager/kube_events_manager_test.go +++ b/pkg/kube_events_manager/kube_events_manager_test.go @@ -7,6 +7,7 @@ import ( "time" "github.com/deckhouse/deckhouse/pkg/log" + . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -14,7 +15,6 @@ import ( "k8s.io/apimachinery/pkg/version" fakediscovery "k8s.io/client-go/discovery/fake" - . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" klient "github.com/flant/kube-client/client" ) diff --git a/pkg/kube_events_manager/monitor.go b/pkg/kube_events_manager/monitor.go index 9cda8b38..94a28de9 100644 --- a/pkg/kube_events_manager/monitor.go +++ b/pkg/kube_events_manager/monitor.go @@ -6,9 +6,9 @@ import ( "sort" "github.com/deckhouse/deckhouse/pkg/log" - . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" "github.com/deckhouse/module-sdk/pkg/metric-storage" + klient "github.com/flant/kube-client/client" utils "github.com/flant/shell-operator/pkg/utils/labels" ) diff --git a/pkg/kube_events_manager/monitor_config.go b/pkg/kube_events_manager/monitor_config.go index 379189e1..2ca70b63 100644 --- a/pkg/kube_events_manager/monitor_config.go +++ b/pkg/kube_events_manager/monitor_config.go @@ -2,10 +2,9 @@ package kube_events_manager import ( "github.com/deckhouse/deckhouse/pkg/log" + . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - - . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" ) // MonitorConfig is a config that suits the latest diff --git a/pkg/kube_events_manager/monitor_test.go b/pkg/kube_events_manager/monitor_test.go index 146cdd08..3938ac32 100644 --- a/pkg/kube_events_manager/monitor_test.go +++ b/pkg/kube_events_manager/monitor_test.go @@ -6,11 +6,11 @@ import ( "testing" "github.com/deckhouse/deckhouse/pkg/log" + . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" "github.com/flant/kube-client/fake" "github.com/flant/kube-client/manifest" ) diff --git a/pkg/kube_events_manager/resource_informer.go b/pkg/kube_events_manager/resource_informer.go index 10d99352..043b29ef 100644 --- a/pkg/kube_events_manager/resource_informer.go +++ b/pkg/kube_events_manager/resource_informer.go @@ -8,14 +8,14 @@ import ( "time" "github.com/deckhouse/deckhouse/pkg/log" + . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" + "github.com/deckhouse/module-sdk/pkg/metric-storage" "github.com/gofrs/uuid/v5" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/tools/cache" - . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" - "github.com/deckhouse/module-sdk/pkg/metric-storage" klient "github.com/flant/kube-client/client" "github.com/flant/shell-operator/pkg/utils/measure" ) diff --git a/pkg/kube_events_manager/util.go b/pkg/kube_events_manager/util.go index 5debed19..60b146bc 100644 --- a/pkg/kube_events_manager/util.go +++ b/pkg/kube_events_manager/util.go @@ -5,11 +5,10 @@ import ( "math/rand/v2" "time" + . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/fields" - - . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" ) // ResourceId describes object with namespace, kind and name diff --git a/pkg/metric/storage.go b/pkg/metric/storage.go index d90eadaa..e1b68e3a 100644 --- a/pkg/metric/storage.go +++ b/pkg/metric/storage.go @@ -1,9 +1,8 @@ package metric import ( - "github.com/prometheus/client_golang/prometheus" - "github.com/deckhouse/module-sdk/pkg/metric-storage/operation" + "github.com/prometheus/client_golang/prometheus" ) type Storage interface { diff --git a/pkg/metric_storage/metric_storage.go b/pkg/metric_storage/metric_storage.go index 67d9ad10..ab11e430 100644 --- a/pkg/metric_storage/metric_storage.go +++ b/pkg/metric_storage/metric_storage.go @@ -8,12 +8,12 @@ import ( "sync" "github.com/deckhouse/deckhouse/pkg/log" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/deckhouse/module-sdk/pkg/metric" "github.com/deckhouse/module-sdk/pkg/metric-storage/operation" "github.com/deckhouse/module-sdk/pkg/metric-storage/vault" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" + . "github.com/flant/shell-operator/pkg/utils/labels" ) diff --git a/pkg/metric_storage/vault/vault.go b/pkg/metric_storage/vault/vault.go index 1916ffb7..4a62a21a 100644 --- a/pkg/metric_storage/vault/vault.go +++ b/pkg/metric_storage/vault/vault.go @@ -5,9 +5,9 @@ import ( "sync" "github.com/deckhouse/deckhouse/pkg/log" + "github.com/deckhouse/module-sdk/pkg/metric" "github.com/prometheus/client_golang/prometheus" - "github.com/deckhouse/module-sdk/pkg/metric" . "github.com/flant/shell-operator/pkg/utils/labels" ) diff --git a/pkg/schedule_manager/schedule_manager.go b/pkg/schedule_manager/schedule_manager.go index b931b367..60896927 100644 --- a/pkg/schedule_manager/schedule_manager.go +++ b/pkg/schedule_manager/schedule_manager.go @@ -4,9 +4,8 @@ import ( "context" "github.com/deckhouse/deckhouse/pkg/log" - "gopkg.in/robfig/cron.v2" - . "github.com/deckhouse/module-sdk/pkg/schedule-manager/types" + "gopkg.in/robfig/cron.v2" ) type ScheduleManager interface { diff --git a/pkg/schedule_manager/schedule_manager_test.go b/pkg/schedule_manager/schedule_manager_test.go index b8f2ae44..da519b04 100644 --- a/pkg/schedule_manager/schedule_manager_test.go +++ b/pkg/schedule_manager/schedule_manager_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/deckhouse/deckhouse/pkg/log" - "github.com/deckhouse/module-sdk/pkg/schedule-manager/types" ) diff --git a/pkg/shell-operator/bootstrap.go b/pkg/shell-operator/bootstrap.go index ff795d92..b21e4763 100644 --- a/pkg/shell-operator/bootstrap.go +++ b/pkg/shell-operator/bootstrap.go @@ -6,10 +6,10 @@ import ( "log/slog" "github.com/deckhouse/deckhouse/pkg/log" - "github.com/deckhouse/module-sdk/pkg/kube-events-manager" "github.com/deckhouse/module-sdk/pkg/webhook/admission" "github.com/deckhouse/module-sdk/pkg/webhook/conversion" + "github.com/flant/shell-operator/pkg/app" "github.com/flant/shell-operator/pkg/config" "github.com/flant/shell-operator/pkg/debug" diff --git a/pkg/shell-operator/combine_binding_context.go b/pkg/shell-operator/combine_binding_context.go index 2319b0b6..e3d191d1 100644 --- a/pkg/shell-operator/combine_binding_context.go +++ b/pkg/shell-operator/combine_binding_context.go @@ -4,6 +4,7 @@ import ( "fmt" . "github.com/deckhouse/module-sdk/pkg/hook/binding-context" + . "github.com/flant/shell-operator/pkg/hook/task_metadata" "github.com/flant/shell-operator/pkg/task" "github.com/flant/shell-operator/pkg/task/queue" diff --git a/pkg/shell-operator/combine_binding_context_test.go b/pkg/shell-operator/combine_binding_context_test.go index 3c2e215c..d487249d 100644 --- a/pkg/shell-operator/combine_binding_context_test.go +++ b/pkg/shell-operator/combine_binding_context_test.go @@ -5,11 +5,11 @@ import ( "testing" "github.com/deckhouse/deckhouse/pkg/log" - . "github.com/onsi/gomega" - "github.com/deckhouse/module-sdk/pkg/hook/binding-context" "github.com/deckhouse/module-sdk/pkg/hook/types" . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" + . "github.com/onsi/gomega" + . "github.com/flant/shell-operator/pkg/hook/task_metadata" "github.com/flant/shell-operator/pkg/task" "github.com/flant/shell-operator/pkg/task/queue" diff --git a/pkg/shell-operator/kube_client.go b/pkg/shell-operator/kube_client.go index 75bffcd7..9ad2cb79 100644 --- a/pkg/shell-operator/kube_client.go +++ b/pkg/shell-operator/kube_client.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/deckhouse/deckhouse/pkg/log" - "github.com/deckhouse/module-sdk/pkg/kube/object-patch" "github.com/deckhouse/module-sdk/pkg/metric-storage" + klient "github.com/flant/kube-client/client" "github.com/flant/shell-operator/pkg/app" utils "github.com/flant/shell-operator/pkg/utils/labels" diff --git a/pkg/shell-operator/manager_events_handler.go b/pkg/shell-operator/manager_events_handler.go index c4c5fbb1..ab401e12 100644 --- a/pkg/shell-operator/manager_events_handler.go +++ b/pkg/shell-operator/manager_events_handler.go @@ -4,9 +4,9 @@ import ( "context" "github.com/deckhouse/deckhouse/pkg/log" - "github.com/deckhouse/module-sdk/pkg/kube-events-manager" . "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" + "github.com/flant/shell-operator/pkg/schedule_manager" "github.com/flant/shell-operator/pkg/task" "github.com/flant/shell-operator/pkg/task/queue" diff --git a/pkg/shell-operator/metrics_hooks.go b/pkg/shell-operator/metrics_hooks.go index 51e8e969..25202c47 100644 --- a/pkg/shell-operator/metrics_hooks.go +++ b/pkg/shell-operator/metrics_hooks.go @@ -4,6 +4,7 @@ import ( "net/http" "github.com/deckhouse/module-sdk/pkg/metric-storage" + "github.com/flant/shell-operator/pkg/app" ) diff --git a/pkg/shell-operator/metrics_operator.go b/pkg/shell-operator/metrics_operator.go index 95574a6d..c78b312c 100644 --- a/pkg/shell-operator/metrics_operator.go +++ b/pkg/shell-operator/metrics_operator.go @@ -4,6 +4,7 @@ import ( "net/http" "github.com/deckhouse/module-sdk/pkg/metric-storage" + "github.com/flant/shell-operator/pkg/app" ) diff --git a/pkg/shell-operator/operator.go b/pkg/shell-operator/operator.go index 5c19781e..eddf57ed 100644 --- a/pkg/shell-operator/operator.go +++ b/pkg/shell-operator/operator.go @@ -6,9 +6,6 @@ import ( "time" "github.com/deckhouse/deckhouse/pkg/log" - "github.com/gofrs/uuid/v5" - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "github.com/deckhouse/module-sdk/pkg/hook/binding-context" "github.com/deckhouse/module-sdk/pkg/hook/types" "github.com/deckhouse/module-sdk/pkg/kube-events-manager" @@ -17,6 +14,9 @@ import ( "github.com/deckhouse/module-sdk/pkg/metric-storage" "github.com/deckhouse/module-sdk/pkg/webhook/admission" "github.com/deckhouse/module-sdk/pkg/webhook/conversion" + "github.com/gofrs/uuid/v5" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + klient "github.com/flant/kube-client/client" "github.com/flant/shell-operator/pkg/hook" "github.com/flant/shell-operator/pkg/hook/controller" diff --git a/pkg/shell-operator/operator_test.go b/pkg/shell-operator/operator_test.go index f58c0af4..fbd90d05 100644 --- a/pkg/shell-operator/operator_test.go +++ b/pkg/shell-operator/operator_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/deckhouse/deckhouse/pkg/log" + . "github.com/deckhouse/module-sdk/pkg/hook/types" . "github.com/onsi/gomega" - . "github.com/deckhouse/module-sdk/pkg/hook/types" . "github.com/flant/shell-operator/pkg/hook/task_metadata" "github.com/flant/shell-operator/pkg/task" utils "github.com/flant/shell-operator/pkg/utils/file" diff --git a/pkg/task/queue/queue_set.go b/pkg/task/queue/queue_set.go index e43a79bc..49d3565c 100644 --- a/pkg/task/queue/queue_set.go +++ b/pkg/task/queue/queue_set.go @@ -6,6 +6,7 @@ import ( "time" "github.com/deckhouse/module-sdk/pkg/metric-storage" + "github.com/flant/shell-operator/pkg/task" ) diff --git a/pkg/webhook/admission/manager.go b/pkg/webhook/admission/manager.go index 9cacab47..0c8c34bb 100644 --- a/pkg/webhook/admission/manager.go +++ b/pkg/webhook/admission/manager.go @@ -4,8 +4,8 @@ import ( "os" "github.com/deckhouse/deckhouse/pkg/log" - "github.com/deckhouse/module-sdk/pkg/webhook/server" + klient "github.com/flant/kube-client/client" ) diff --git a/pkg/webhook/conversion/manager.go b/pkg/webhook/conversion/manager.go index 29924912..50351a59 100644 --- a/pkg/webhook/conversion/manager.go +++ b/pkg/webhook/conversion/manager.go @@ -5,9 +5,9 @@ import ( "os" "github.com/deckhouse/deckhouse/pkg/log" + "github.com/deckhouse/module-sdk/pkg/webhook/server" v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "github.com/deckhouse/module-sdk/pkg/webhook/server" klient "github.com/flant/kube-client/client" ) diff --git a/test/hook/context/context_combiner.go b/test/hook/context/context_combiner.go index 52f295bb..9627c5aa 100644 --- a/test/hook/context/context_combiner.go +++ b/test/hook/context/context_combiner.go @@ -6,6 +6,7 @@ import ( "github.com/deckhouse/module-sdk/pkg/hook/binding-context" "github.com/deckhouse/module-sdk/pkg/hook/types" + "github.com/flant/shell-operator/pkg/hook/controller" "github.com/flant/shell-operator/pkg/hook/task_metadata" shell_operator "github.com/flant/shell-operator/pkg/shell-operator" diff --git a/test/hook/context/generator.go b/test/hook/context/generator.go index 6a7f43b3..5b2587ee 100644 --- a/test/hook/context/generator.go +++ b/test/hook/context/generator.go @@ -7,10 +7,10 @@ import ( "time" "github.com/deckhouse/deckhouse/pkg/log" - . "github.com/deckhouse/module-sdk/pkg/hook/binding-context" "github.com/deckhouse/module-sdk/pkg/hook/types" kubeeventsmanager "github.com/deckhouse/module-sdk/pkg/kube-events-manager" + "github.com/flant/kube-client/fake" "github.com/flant/shell-operator/pkg/hook" "github.com/flant/shell-operator/pkg/hook/controller" diff --git a/test/hook/context/generator_test.go b/test/hook/context/generator_test.go index 361b932b..3482915b 100644 --- a/test/hook/context/generator_test.go +++ b/test/hook/context/generator_test.go @@ -5,9 +5,8 @@ import ( "testing" "github.com/deckhouse/deckhouse/pkg/log" - . "github.com/onsi/gomega" - . "github.com/deckhouse/module-sdk/pkg/hook/binding-context" + . "github.com/onsi/gomega" ) func parseContexts(contexts string) []BindingContext { diff --git a/test/hook/context/state.go b/test/hook/context/state.go index 23f42c63..5ce34dab 100644 --- a/test/hook/context/state.go +++ b/test/hook/context/state.go @@ -7,6 +7,7 @@ import ( kubeeventsmanager "github.com/deckhouse/module-sdk/pkg/kube-events-manager" "github.com/deckhouse/module-sdk/pkg/kube-events-manager/types" + "github.com/flant/kube-client/fake" "github.com/flant/kube-client/manifest" )