diff --git a/pkg/object_patch/helpers.go b/pkg/kube/object_patch/helpers.go similarity index 99% rename from pkg/object_patch/helpers.go rename to pkg/kube/object_patch/helpers.go index 2f330840..a17c5288 100644 --- a/pkg/object_patch/helpers.go +++ b/pkg/kube/object_patch/helpers.go @@ -1,4 +1,4 @@ -package objectpatch +package object_patch import ( "bytes" diff --git a/pkg/object_patch/operation.go b/pkg/kube/object_patch/operation.go similarity index 99% rename from pkg/object_patch/operation.go rename to pkg/kube/object_patch/operation.go index d0961f6f..8128f139 100644 --- a/pkg/object_patch/operation.go +++ b/pkg/kube/object_patch/operation.go @@ -1,4 +1,4 @@ -package objectpatch +package object_patch import ( "fmt" diff --git a/pkg/object_patch/options.go b/pkg/kube/object_patch/options.go similarity index 99% rename from pkg/object_patch/options.go rename to pkg/kube/object_patch/options.go index 1980a4fe..c6900ee9 100644 --- a/pkg/object_patch/options.go +++ b/pkg/kube/object_patch/options.go @@ -1,4 +1,4 @@ -package objectpatch +package object_patch import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/object_patch/patch.go b/pkg/kube/object_patch/patch.go similarity index 99% rename from pkg/object_patch/patch.go rename to pkg/kube/object_patch/patch.go index 5010aa2d..f46e22b7 100644 --- a/pkg/object_patch/patch.go +++ b/pkg/kube/object_patch/patch.go @@ -1,4 +1,4 @@ -package objectpatch +package object_patch import ( "bytes" diff --git a/pkg/object_patch/patch_collector.go b/pkg/kube/object_patch/patch_collector.go similarity index 99% rename from pkg/object_patch/patch_collector.go rename to pkg/kube/object_patch/patch_collector.go index faccb287..229f9b56 100644 --- a/pkg/object_patch/patch_collector.go +++ b/pkg/kube/object_patch/patch_collector.go @@ -1,4 +1,4 @@ -package objectpatch +package object_patch import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/pkg/object_patch/patch_test.go b/pkg/kube/object_patch/patch_test.go similarity index 99% rename from pkg/object_patch/patch_test.go rename to pkg/kube/object_patch/patch_test.go index ec0b5f43..bc0a29ce 100644 --- a/pkg/object_patch/patch_test.go +++ b/pkg/kube/object_patch/patch_test.go @@ -1,4 +1,4 @@ -package objectpatch +package object_patch import ( "context" diff --git a/pkg/object_patch/testdata/serialized_operations/invalid_create.yaml b/pkg/kube/object_patch/testdata/serialized_operations/invalid_create.yaml similarity index 100% rename from pkg/object_patch/testdata/serialized_operations/invalid_create.yaml rename to pkg/kube/object_patch/testdata/serialized_operations/invalid_create.yaml diff --git a/pkg/object_patch/testdata/serialized_operations/invalid_delete.yaml b/pkg/kube/object_patch/testdata/serialized_operations/invalid_delete.yaml similarity index 100% rename from pkg/object_patch/testdata/serialized_operations/invalid_delete.yaml rename to pkg/kube/object_patch/testdata/serialized_operations/invalid_delete.yaml diff --git a/pkg/object_patch/testdata/serialized_operations/invalid_patch.yaml b/pkg/kube/object_patch/testdata/serialized_operations/invalid_patch.yaml similarity index 100% rename from pkg/object_patch/testdata/serialized_operations/invalid_patch.yaml rename to pkg/kube/object_patch/testdata/serialized_operations/invalid_patch.yaml diff --git a/pkg/object_patch/testdata/serialized_operations/valid_create.yaml b/pkg/kube/object_patch/testdata/serialized_operations/valid_create.yaml similarity index 100% rename from pkg/object_patch/testdata/serialized_operations/valid_create.yaml rename to pkg/kube/object_patch/testdata/serialized_operations/valid_create.yaml diff --git a/pkg/object_patch/testdata/serialized_operations/valid_delete.yaml b/pkg/kube/object_patch/testdata/serialized_operations/valid_delete.yaml similarity index 100% rename from pkg/object_patch/testdata/serialized_operations/valid_delete.yaml rename to pkg/kube/object_patch/testdata/serialized_operations/valid_delete.yaml diff --git a/pkg/object_patch/testdata/serialized_operations/valid_patch.yaml b/pkg/kube/object_patch/testdata/serialized_operations/valid_patch.yaml similarity index 100% rename from pkg/object_patch/testdata/serialized_operations/valid_patch.yaml rename to pkg/kube/object_patch/testdata/serialized_operations/valid_patch.yaml diff --git a/pkg/object_patch/validation.go b/pkg/kube/object_patch/validation.go similarity index 99% rename from pkg/object_patch/validation.go rename to pkg/kube/object_patch/validation.go index a651b89f..e8055a67 100644 --- a/pkg/object_patch/validation.go +++ b/pkg/kube/object_patch/validation.go @@ -1,4 +1,4 @@ -package objectpatch +package object_patch import ( "encoding/json" diff --git a/pkg/object_patch/validation_test.go b/pkg/kube/object_patch/validation_test.go similarity index 96% rename from pkg/object_patch/validation_test.go rename to pkg/kube/object_patch/validation_test.go index 5240744d..73d28580 100644 --- a/pkg/object_patch/validation_test.go +++ b/pkg/kube/object_patch/validation_test.go @@ -1,4 +1,4 @@ -package objectpatch +package object_patch import ( "testing" diff --git a/pkg/shell-operator/kube_client.go b/pkg/shell-operator/kube_client.go index d556b43f..91b1cd35 100644 --- a/pkg/shell-operator/kube_client.go +++ b/pkg/shell-operator/kube_client.go @@ -7,8 +7,8 @@ import ( klient "github.com/flant/kube-client/client" "github.com/flant/shell-operator/pkg/app" + objectpatch "github.com/flant/shell-operator/pkg/kube/object_patch" metricstorage "github.com/flant/shell-operator/pkg/metric_storage" - objectpatch "github.com/flant/shell-operator/pkg/object_patch" utils "github.com/flant/shell-operator/pkg/utils/labels" ) diff --git a/pkg/shell-operator/operator.go b/pkg/shell-operator/operator.go index 8c7d0a0c..81120506 100644 --- a/pkg/shell-operator/operator.go +++ b/pkg/shell-operator/operator.go @@ -15,10 +15,10 @@ import ( "github.com/flant/shell-operator/pkg/hook/controller" "github.com/flant/shell-operator/pkg/hook/task_metadata" "github.com/flant/shell-operator/pkg/hook/types" + objectpatch "github.com/flant/shell-operator/pkg/kube/object_patch" kubeeventsmanager "github.com/flant/shell-operator/pkg/kube_events_manager" kemTypes "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" "github.com/flant/shell-operator/pkg/task" "github.com/flant/shell-operator/pkg/task/queue" diff --git a/test/integration/kubeclient/object_patch_test.go b/test/integration/kubeclient/object_patch_test.go index eae6242e..95af445f 100644 --- a/test/integration/kubeclient/object_patch_test.go +++ b/test/integration/kubeclient/object_patch_test.go @@ -7,7 +7,7 @@ import ( "context" "encoding/json" - objectpatch "github.com/flant/shell-operator/pkg/object_patch" + objectpatch "github.com/flant/shell-operator/pkg/kube/object_patch" . "github.com/flant/shell-operator/test/integration/suite" uuid "github.com/gofrs/uuid/v5" . "github.com/onsi/ginkgo" diff --git a/test/integration/suite/run.go b/test/integration/suite/run.go index e8444e4f..9ede565f 100644 --- a/test/integration/suite/run.go +++ b/test/integration/suite/run.go @@ -9,7 +9,7 @@ import ( "github.com/deckhouse/deckhouse/pkg/log" klient "github.com/flant/kube-client/client" - objectpatch "github.com/flant/shell-operator/pkg/object_patch" + objectpatch "github.com/flant/shell-operator/pkg/kube/object_patch" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" )