Skip to content

Commit

Permalink
remove sdk
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Okhlopkov <[email protected]>
  • Loading branch information
Pavel Okhlopkov committed Nov 15, 2024
1 parent e33ff1e commit b5eb36e
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 307 deletions.
142 changes: 0 additions & 142 deletions sdk/registry/registry.go

This file was deleted.

74 changes: 0 additions & 74 deletions sdk/registry/registry_test.go

This file was deleted.

41 changes: 0 additions & 41 deletions sdk/registry/test/sdk_test.go

This file was deleted.

15 changes: 0 additions & 15 deletions sdk/registry/test/simple_operator/global-hooks/go-hook.go

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions sdk/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,8 @@ package sdk
import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"

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/addon-operator/sdk/registry"
)

var RegisterFunc = func(config *gohook.HookConfig, reconcileFunc kind.ReconcileFunc) bool {
registry.Registry().Add(kind.NewGoHook(config, reconcileFunc))
return true
}

func ToUnstructured(obj interface{}) (*unstructured.Unstructured, error) {
content, err := runtime.DefaultUnstructuredConverter.ToUnstructured(obj)
return &unstructured.Unstructured{Object: content}, err
Expand Down

0 comments on commit b5eb36e

Please sign in to comment.