Skip to content

Commit

Permalink
return paths
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
  • Loading branch information
Pavel Okhlopkov committed Nov 15, 2024
1 parent a002b19 commit 845beaf
Show file tree
Hide file tree
Showing 30 changed files with 55 additions and 53 deletions.
2 changes: 1 addition & 1 deletion examples/700-go-hook/global-hooks/global-go-hook.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package global_hooks

import (
gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/sdk"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/sdk"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/dominikbraun/graph v0.23.0
github.com/ettle/strcase v0.2.0
github.com/flant/kube-client v1.2.2
github.com/flant/shell-operator v0.0.0-20241115132535-5cf5a377fd63
github.com/flant/shell-operator v0.0.0-20241115161140-7d9a675cda60
github.com/go-chi/chi/v5 v5.1.0
github.com/go-openapi/loads v0.19.5
github.com/go-openapi/spec v0.19.8
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ github.com/flant/libjq-go v1.6.3-0.20201126171326-c46a40ff22ee h1:evii83J+/6QGNv
github.com/flant/libjq-go v1.6.3-0.20201126171326-c46a40ff22ee/go.mod h1:f+REaGl/+pZR97rbTcwHEka/MAipoQQ2Mc0iQUj4ak0=
github.com/flant/shell-operator v0.0.0-20241115132535-5cf5a377fd63 h1:qsnqTVS+wVrsBIGFAyyI8SC26fktcyfulaHINzoQV+0=
github.com/flant/shell-operator v0.0.0-20241115132535-5cf5a377fd63/go.mod h1:Kbq8JNtKfoT8aqbHxygvgd6WoMImne8/upAYx9QyHUA=
github.com/flant/shell-operator v0.0.0-20241115161140-7d9a675cda60 h1:t1d19J9FmAtNibTPRis9ftBiyxdUNuAHn6hMU2RorQw=
github.com/flant/shell-operator v0.0.0-20241115161140-7d9a675cda60/go.mod h1:Kbq8JNtKfoT8aqbHxygvgd6WoMImne8/upAYx9QyHUA=
github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8=
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI=
Expand Down
2 changes: 1 addition & 1 deletion pkg/addon-operator/kube_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/flant/addon-operator/pkg/helm_resources_manager"
klient "github.com/flant/kube-client/client"
shapp "github.com/flant/shell-operator/pkg/app"
metricstorage "github.com/flant/shell-operator/pkg/metric-storage"
metricstorage "github.com/flant/shell-operator/pkg/metric_storage"
utils "github.com/flant/shell-operator/pkg/utils/labels"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/addon-operator/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package addon_operator
import (
"time"

metricstorage "github.com/flant/shell-operator/pkg/metric-storage"
metricstorage "github.com/flant/shell-operator/pkg/metric_storage"
"github.com/flant/shell-operator/pkg/task/queue"
)

Expand Down
8 changes: 4 additions & 4 deletions pkg/addon-operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/flant/addon-operator/pkg/kube_config_manager"
"github.com/flant/addon-operator/pkg/kube_config_manager/config"
"github.com/flant/addon-operator/pkg/module_manager"
gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/pkg/module_manager/models/hooks"
"github.com/flant/addon-operator/pkg/module_manager/models/hooks/kind"
"github.com/flant/addon-operator/pkg/module_manager/models/modules"
Expand All @@ -40,11 +40,11 @@ import (
shapp "github.com/flant/shell-operator/pkg/app"
runtimeConfig "github.com/flant/shell-operator/pkg/config"
"github.com/flant/shell-operator/pkg/debug"
bc "github.com/flant/shell-operator/pkg/hook/binding-context"
bc "github.com/flant/shell-operator/pkg/hook/binding_context"
"github.com/flant/shell-operator/pkg/hook/controller"
htypes "github.com/flant/shell-operator/pkg/hook/types"
"github.com/flant/shell-operator/pkg/kube-events-manager/types"
metricstorage "github.com/flant/shell-operator/pkg/metric-storage"
"github.com/flant/shell-operator/pkg/kube_events_manager/types"
metricstorage "github.com/flant/shell-operator/pkg/metric_storage"
shell_operator "github.com/flant/shell-operator/pkg/shell-operator"
sh_task "github.com/flant/shell-operator/pkg/task"
"github.com/flant/shell-operator/pkg/task/queue"
Expand Down
2 changes: 1 addition & 1 deletion pkg/addon-operator/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/flant/addon-operator/pkg/task"
"github.com/flant/kube-client/fake"
. "github.com/flant/shell-operator/pkg/hook/types"
metricstorage "github.com/flant/shell-operator/pkg/metric-storage"
metricstorage "github.com/flant/shell-operator/pkg/metric_storage"
sh_task "github.com/flant/shell-operator/pkg/task"
"github.com/flant/shell-operator/pkg/task/queue"
file_utils "github.com/flant/shell-operator/pkg/utils/file"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

"github.com/flant/addon-operator/pkg/module_manager/go-hook/metrics"
"github.com/flant/shell-operator/pkg/kube-events-manager/types"
objectpatch "github.com/flant/shell-operator/pkg/object-patch"
"github.com/flant/addon-operator/pkg/module_manager/go_hook/metrics"
"github.com/flant/shell-operator/pkg/kube_events_manager/types"
objectpatch "github.com/flant/shell-operator/pkg/object_patch"
)

type GoHook interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package metrics
import (
pointer "k8s.io/utils/ptr"

"github.com/flant/shell-operator/pkg/metric-storage/operation"
"github.com/flant/shell-operator/pkg/metric_storage/operation"
)

type MemoryMetricsCollector struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/module_manager/models/hooks/dependency.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (

"github.com/flant/addon-operator/pkg/module_manager/models/hooks/kind"
"github.com/flant/addon-operator/pkg/utils"
bindingcontext "github.com/flant/shell-operator/pkg/hook/binding-context"
bindingcontext "github.com/flant/shell-operator/pkg/hook/binding_context"
"github.com/flant/shell-operator/pkg/hook/config"
"github.com/flant/shell-operator/pkg/hook/controller"
metricoperation "github.com/flant/shell-operator/pkg/metric-storage/operation"
objectpatch "github.com/flant/shell-operator/pkg/object-patch"
metricoperation "github.com/flant/shell-operator/pkg/metric_storage/operation"
objectpatch "github.com/flant/shell-operator/pkg/object_patch"
)

type hooksMetricsStorage interface {
Expand Down
2 changes: 1 addition & 1 deletion pkg/module_manager/models/hooks/global_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

addon_op_types "github.com/flant/addon-operator/pkg/hook/types"
gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/pkg/module_manager/models/hooks/kind"
shell_op_types "github.com/flant/shell-operator/pkg/hook/types"
)
Expand Down
8 changes: 4 additions & 4 deletions pkg/module_manager/models/hooks/global_hook_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"sigs.k8s.io/yaml"

. "github.com/flant/addon-operator/pkg/hook/types"
gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/shell-operator/pkg/hook/config"
. "github.com/flant/shell-operator/pkg/hook/types"
kubeeventsmanager "github.com/flant/shell-operator/pkg/kube-events-manager"
eventtypes "github.com/flant/shell-operator/pkg/kube-events-manager/types"
schdulertypes "github.com/flant/shell-operator/pkg/schedule-manager/types"
kubeeventsmanager "github.com/flant/shell-operator/pkg/kube_events_manager"
eventtypes "github.com/flant/shell-operator/pkg/kube_events_manager/types"
schdulertypes "github.com/flant/shell-operator/pkg/schedule_manager/types"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions pkg/module_manager/models/hooks/kind/gohook.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import (

"github.com/deckhouse/deckhouse/pkg/log"

gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
"github.com/flant/addon-operator/pkg/module_manager/go-hook/metrics"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/pkg/module_manager/go_hook/metrics"
"github.com/flant/addon-operator/pkg/utils"
sh_hook "github.com/flant/shell-operator/pkg/hook"
bindingcontext "github.com/flant/shell-operator/pkg/hook/binding-context"
bindingcontext "github.com/flant/shell-operator/pkg/hook/binding_context"
"github.com/flant/shell-operator/pkg/hook/config"
"github.com/flant/shell-operator/pkg/hook/controller"
objectpatch "github.com/flant/shell-operator/pkg/object-patch"
objectpatch "github.com/flant/shell-operator/pkg/object_patch"
)

type GoHook struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/module_manager/models/hooks/kind/gohook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

. "github.com/onsi/gomega"

gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
. "github.com/flant/shell-operator/pkg/hook/binding-context"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
. "github.com/flant/shell-operator/pkg/hook/binding_context"
)

func Test_Config_GoHook(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/module_manager/models/hooks/kind/kind.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package kind

import (
gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/pkg/utils"
"github.com/flant/shell-operator/pkg/executor"
metricoperation "github.com/flant/shell-operator/pkg/metric-storage/operation"
objectpatch "github.com/flant/shell-operator/pkg/object-patch"
metricoperation "github.com/flant/shell-operator/pkg/metric_storage/operation"
objectpatch "github.com/flant/shell-operator/pkg/object_patch"
)

// HookKind kind of the hook
Expand Down
6 changes: 3 additions & 3 deletions pkg/module_manager/models/hooks/kind/shellhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"github.com/flant/addon-operator/pkg/utils"
"github.com/flant/shell-operator/pkg/executor"
sh_hook "github.com/flant/shell-operator/pkg/hook"
bindingcontext "github.com/flant/shell-operator/pkg/hook/binding-context"
bindingcontext "github.com/flant/shell-operator/pkg/hook/binding_context"
"github.com/flant/shell-operator/pkg/hook/config"
"github.com/flant/shell-operator/pkg/hook/controller"
metricoperation "github.com/flant/shell-operator/pkg/metric-storage/operation"
objectpatch "github.com/flant/shell-operator/pkg/object-patch"
metricoperation "github.com/flant/shell-operator/pkg/metric_storage/operation"
objectpatch "github.com/flant/shell-operator/pkg/object_patch"
)

type ShellHook struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/module_manager/models/hooks/module_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"

addon_op_types "github.com/flant/addon-operator/pkg/hook/types"
gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/pkg/module_manager/models/hooks/kind"
"github.com/flant/shell-operator/pkg/hook/controller"
shell_op_types "github.com/flant/shell-operator/pkg/hook/types"
Expand Down
2 changes: 1 addition & 1 deletion pkg/module_manager/models/hooks/module_hook_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sigs.k8s.io/yaml"

. "github.com/flant/addon-operator/pkg/hook/types"
gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/shell-operator/pkg/hook/config"
. "github.com/flant/shell-operator/pkg/hook/types"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/module_manager/models/modules/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/flant/addon-operator/pkg/values/validation"
"github.com/flant/addon-operator/sdk"
"github.com/flant/shell-operator/pkg/executor"
bindingcontext "github.com/flant/shell-operator/pkg/hook/binding-context"
bindingcontext "github.com/flant/shell-operator/pkg/hook/binding_context"
sh_op_types "github.com/flant/shell-operator/pkg/hook/types"
utils_file "github.com/flant/shell-operator/pkg/utils/file"
"github.com/flant/shell-operator/pkg/utils/measure"
Expand Down
2 changes: 1 addition & 1 deletion pkg/module_manager/models/modules/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/flant/addon-operator/pkg/utils"
"github.com/flant/addon-operator/pkg/values/validation"
"github.com/flant/addon-operator/sdk"
bindingcontext "github.com/flant/shell-operator/pkg/hook/binding-context"
bindingcontext "github.com/flant/shell-operator/pkg/hook/binding_context"
sh_op_types "github.com/flant/shell-operator/pkg/hook/types"
utils_file "github.com/flant/shell-operator/pkg/utils/file"
)
Expand Down
14 changes: 7 additions & 7 deletions pkg/module_manager/module_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/flant/addon-operator/pkg/helm_resources_manager"
. "github.com/flant/addon-operator/pkg/hook/types"
"github.com/flant/addon-operator/pkg/kube_config_manager/config"
gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/pkg/module_manager/loader"
"github.com/flant/addon-operator/pkg/module_manager/loader/fs"
"github.com/flant/addon-operator/pkg/module_manager/models/hooks"
Expand All @@ -33,14 +33,14 @@ import (
"github.com/flant/addon-operator/pkg/module_manager/scheduler/node"
"github.com/flant/addon-operator/pkg/task"
"github.com/flant/addon-operator/pkg/utils"
. "github.com/flant/shell-operator/pkg/hook/binding-context"
. "github.com/flant/shell-operator/pkg/hook/binding_context"
"github.com/flant/shell-operator/pkg/hook/controller"
. "github.com/flant/shell-operator/pkg/hook/types"
kubeeventsmanager "github.com/flant/shell-operator/pkg/kube-events-manager"
. "github.com/flant/shell-operator/pkg/kube-events-manager/types"
metricstorage "github.com/flant/shell-operator/pkg/metric-storage"
objectpatch "github.com/flant/shell-operator/pkg/object-patch"
schedulemanager "github.com/flant/shell-operator/pkg/schedule-manager"
kubeeventsmanager "github.com/flant/shell-operator/pkg/kube_events_manager"
. "github.com/flant/shell-operator/pkg/kube_events_manager/types"
metricstorage "github.com/flant/shell-operator/pkg/metric_storage"
objectpatch "github.com/flant/shell-operator/pkg/object_patch"
schedulemanager "github.com/flant/shell-operator/pkg/schedule_manager"
sh_task "github.com/flant/shell-operator/pkg/task"
"github.com/flant/shell-operator/pkg/task/queue"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/module_manager/module_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ import (
_ "github.com/flant/addon-operator/pkg/module_manager/test/go_hooks/global-hooks"
"github.com/flant/addon-operator/pkg/utils"
klient "github.com/flant/kube-client/client"
. "github.com/flant/shell-operator/pkg/hook/binding-context"
. "github.com/flant/shell-operator/pkg/hook/binding_context"
. "github.com/flant/shell-operator/pkg/hook/types"
"github.com/flant/shell-operator/pkg/kube-events-manager/types"
"github.com/flant/shell-operator/pkg/kube_events_manager/types"
utils_file "github.com/flant/shell-operator/pkg/utils/file"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/task/hook_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/flant/addon-operator/pkg/module_manager/models/modules"
"github.com/flant/addon-operator/pkg/module_manager/scheduler/node"
bindingcontext "github.com/flant/shell-operator/pkg/hook/binding-context"
bindingcontext "github.com/flant/shell-operator/pkg/hook/binding_context"
"github.com/flant/shell-operator/pkg/hook/task_metadata"
"github.com/flant/shell-operator/pkg/hook/types"
"github.com/flant/shell-operator/pkg/task"
Expand Down
2 changes: 1 addition & 1 deletion sdk/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime"
"sync"

gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/pkg/module_manager/models/hooks/kind"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/pkg/module_manager/models/hooks/kind"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/test/simple_operator/global-hooks/go-hook.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package global_hooks

import (
gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/sdk"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package hooks

import (
gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/sdk"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package sublevel

import (
gohook "github.com/flant/addon-operator/pkg/module_manager/go-hook"
gohook "github.com/flant/addon-operator/pkg/module_manager/go_hook"
"github.com/flant/addon-operator/sdk"
)

Expand Down

0 comments on commit 845beaf

Please sign in to comment.