diff --git a/BUILD.bazel b/BUILD.bazel index 597de1a37800..e292b091eb82 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -193,7 +193,7 @@ container_bundle( "$(container_prefix)/$(image_prefix)example-disk-mutation-hook-sidecar:$(container_tag)": "//cmd/sidecars/disk-mutation:example-disk-mutation-hook-sidecar-image", "$(container_prefix)/$(image_prefix)example-cloudinit-hook-sidecar:$(container_tag)": "//cmd/sidecars/cloudinit:example-cloudinit-hook-sidecar-image", "$(container_prefix)/$(image_prefix)network-slirp-binding:$(container_tag)": "//cmd/sidecars/network-slirp-binding:network-slirp-binding-image", - "$(container_prefix)/$(image_prefix)network-passt-binding:$(container_tag)": "//cmd/network-passt-binding:network-passt-binding-image", + "$(container_prefix)/$(image_prefix)network-passt-binding:$(container_tag)": "//cmd/sidecars/network-passt-binding:network-passt-binding-image", # container-disk images "$(container_prefix)/$(image_prefix)alpine-container-disk-demo:$(container_tag)": "//containerimages:alpine-container-disk-image", "$(container_prefix)/$(image_prefix)cirros-container-disk-demo:$(container_tag)": "//containerimages:cirros-container-disk-image", @@ -343,7 +343,7 @@ container_push( container_push( name = "push-network-passt-binding", format = "Docker", - image = "//cmd/network-passt-binding:network-passt-binding-image", + image = "//cmd/sidecars/network-passt-binding:network-passt-binding-image", registry = "$(container_prefix)", repository = "$(image_prefix)network-passt-binding", tag = "$(container_tag)", diff --git a/cmd/network-passt-binding/BUILD.bazel b/cmd/sidecars/network-passt-binding/BUILD.bazel similarity index 88% rename from cmd/network-passt-binding/BUILD.bazel rename to cmd/sidecars/network-passt-binding/BUILD.bazel index ed955ff7b993..68a914ca4380 100644 --- a/cmd/network-passt-binding/BUILD.bazel +++ b/cmd/sidecars/network-passt-binding/BUILD.bazel @@ -3,10 +3,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") go_library( name = "go_default_library", srcs = ["main.go"], - importpath = "kubevirt.io/kubevirt/cmd/network-passt-binding", + importpath = "kubevirt.io/kubevirt/cmd/sidecars/network-passt-binding", visibility = ["//visibility:private"], deps = [ - "//cmd/network-passt-binding/server:go_default_library", + "//cmd/sidecars/network-passt-binding/server:go_default_library", "//pkg/hooks:go_default_library", "//pkg/hooks/info:go_default_library", "//pkg/hooks/v1alpha2:go_default_library", diff --git a/cmd/network-passt-binding/README.md b/cmd/sidecars/network-passt-binding/README.md similarity index 100% rename from cmd/network-passt-binding/README.md rename to cmd/sidecars/network-passt-binding/README.md diff --git a/cmd/network-passt-binding/callback/BUILD.bazel b/cmd/sidecars/network-passt-binding/callback/BUILD.bazel similarity index 89% rename from cmd/network-passt-binding/callback/BUILD.bazel rename to cmd/sidecars/network-passt-binding/callback/BUILD.bazel index 9df7eaa04e7b..6dff4ed7a102 100644 --- a/cmd/network-passt-binding/callback/BUILD.bazel +++ b/cmd/sidecars/network-passt-binding/callback/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", srcs = ["callback.go"], - importpath = "kubevirt.io/kubevirt/cmd/network-passt-binding/callback", + importpath = "kubevirt.io/kubevirt/cmd/sidecars/network-passt-binding/callback", visibility = ["//visibility:public"], deps = ["//pkg/virt-launcher/virtwrap/api:go_default_library"], ) diff --git a/cmd/network-passt-binding/callback/callback.go b/cmd/sidecars/network-passt-binding/callback/callback.go similarity index 100% rename from cmd/network-passt-binding/callback/callback.go rename to cmd/sidecars/network-passt-binding/callback/callback.go diff --git a/cmd/network-passt-binding/callback/callback_suite_test.go b/cmd/sidecars/network-passt-binding/callback/callback_suite_test.go similarity index 100% rename from cmd/network-passt-binding/callback/callback_suite_test.go rename to cmd/sidecars/network-passt-binding/callback/callback_suite_test.go diff --git a/cmd/network-passt-binding/callback/callback_test.go b/cmd/sidecars/network-passt-binding/callback/callback_test.go similarity index 97% rename from cmd/network-passt-binding/callback/callback_test.go rename to cmd/sidecars/network-passt-binding/callback/callback_test.go index a1f56d452905..e0186630ce3e 100644 --- a/cmd/network-passt-binding/callback/callback_test.go +++ b/cmd/sidecars/network-passt-binding/callback/callback_test.go @@ -23,12 +23,12 @@ import ( "encoding/xml" "fmt" + "kubevirt.io/kubevirt/cmd/sidecars/network-passt-binding/callback" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" domainschema "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap/api" - - "kubevirt.io/kubevirt/cmd/network-passt-binding/callback" ) var _ = Describe("passt hook callback handler", func() { diff --git a/cmd/network-passt-binding/domain/BUILD.bazel b/cmd/sidecars/network-passt-binding/domain/BUILD.bazel similarity index 93% rename from cmd/network-passt-binding/domain/BUILD.bazel rename to cmd/sidecars/network-passt-binding/domain/BUILD.bazel index 69fe1d14b057..263d296f9abb 100644 --- a/cmd/network-passt-binding/domain/BUILD.bazel +++ b/cmd/sidecars/network-passt-binding/domain/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", srcs = ["configurator.go"], - importpath = "kubevirt.io/kubevirt/cmd/network-passt-binding/domain", + importpath = "kubevirt.io/kubevirt/cmd/sidecars/network-passt-binding/domain", visibility = ["//visibility:public"], deps = [ "//pkg/network/istio:go_default_library", diff --git a/cmd/network-passt-binding/domain/configurator.go b/cmd/sidecars/network-passt-binding/domain/configurator.go similarity index 100% rename from cmd/network-passt-binding/domain/configurator.go rename to cmd/sidecars/network-passt-binding/domain/configurator.go diff --git a/cmd/network-passt-binding/domain/configurator_test.go b/cmd/sidecars/network-passt-binding/domain/configurator_test.go similarity index 99% rename from cmd/network-passt-binding/domain/configurator_test.go rename to cmd/sidecars/network-passt-binding/domain/configurator_test.go index 1ab6493573bc..8abc88815843 100644 --- a/cmd/network-passt-binding/domain/configurator_test.go +++ b/cmd/sidecars/network-passt-binding/domain/configurator_test.go @@ -24,9 +24,9 @@ import ( . "github.com/onsi/gomega" vmschema "kubevirt.io/api/core/v1" - domainschema "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap/api" + "kubevirt.io/kubevirt/cmd/sidecars/network-passt-binding/domain" - "kubevirt.io/kubevirt/cmd/network-passt-binding/domain" + domainschema "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap/api" ) var _ = Describe("pod network configurator", func() { diff --git a/cmd/network-passt-binding/domain/domain_suite_test.go b/cmd/sidecars/network-passt-binding/domain/domain_suite_test.go similarity index 100% rename from cmd/network-passt-binding/domain/domain_suite_test.go rename to cmd/sidecars/network-passt-binding/domain/domain_suite_test.go diff --git a/cmd/network-passt-binding/main.go b/cmd/sidecars/network-passt-binding/main.go similarity index 95% rename from cmd/network-passt-binding/main.go rename to cmd/sidecars/network-passt-binding/main.go index ba90e5cdb3b1..9fc4670ab4b4 100644 --- a/cmd/network-passt-binding/main.go +++ b/cmd/sidecars/network-passt-binding/main.go @@ -24,6 +24,8 @@ import ( "os" "path/filepath" + srv "kubevirt.io/kubevirt/cmd/sidecars/network-passt-binding/server" + "google.golang.org/grpc" "kubevirt.io/kubevirt/pkg/hooks" @@ -31,8 +33,6 @@ import ( hooksV1alpha2 "kubevirt.io/kubevirt/pkg/hooks/v1alpha2" "kubevirt.io/client-go/log" - - srv "kubevirt.io/kubevirt/cmd/network-passt-binding/server" ) const hookSocket = "passt.sock" diff --git a/cmd/network-passt-binding/server/BUILD.bazel b/cmd/sidecars/network-passt-binding/server/BUILD.bazel similarity index 60% rename from cmd/network-passt-binding/server/BUILD.bazel rename to cmd/sidecars/network-passt-binding/server/BUILD.bazel index 9a7ccdd54c69..3a564fc691d3 100644 --- a/cmd/network-passt-binding/server/BUILD.bazel +++ b/cmd/sidecars/network-passt-binding/server/BUILD.bazel @@ -3,11 +3,11 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["server.go"], - importpath = "kubevirt.io/kubevirt/cmd/network-passt-binding/server", + importpath = "kubevirt.io/kubevirt/cmd/sidecars/network-passt-binding/server", visibility = ["//visibility:public"], deps = [ - "//cmd/network-passt-binding/callback:go_default_library", - "//cmd/network-passt-binding/domain:go_default_library", + "//cmd/sidecars/network-passt-binding/callback:go_default_library", + "//cmd/sidecars/network-passt-binding/domain:go_default_library", "//pkg/hooks/info:go_default_library", "//pkg/hooks/v1alpha2:go_default_library", "//staging/src/kubevirt.io/api/core/v1:go_default_library", diff --git a/cmd/network-passt-binding/server/server.go b/cmd/sidecars/network-passt-binding/server/server.go similarity index 95% rename from cmd/network-passt-binding/server/server.go rename to cmd/sidecars/network-passt-binding/server/server.go index 600a3d8d6203..045b4901f94c 100644 --- a/cmd/network-passt-binding/server/server.go +++ b/cmd/sidecars/network-passt-binding/server/server.go @@ -30,8 +30,8 @@ import ( hooksInfo "kubevirt.io/kubevirt/pkg/hooks/info" hooksV1alpha2 "kubevirt.io/kubevirt/pkg/hooks/v1alpha2" - "kubevirt.io/kubevirt/cmd/network-passt-binding/callback" - "kubevirt.io/kubevirt/cmd/network-passt-binding/domain" + "kubevirt.io/kubevirt/cmd/sidecars/network-passt-binding/callback" + "kubevirt.io/kubevirt/cmd/sidecars/network-passt-binding/domain" ) type InfoServer struct {