Skip to content

Commit

Permalink
Move passt network binding plugin to cmd/sidecars
Browse files Browse the repository at this point in the history
Signed-off-by: Or Mergi <[email protected]>
  • Loading branch information
ormergi committed Oct 19, 2023
1 parent 39b3559 commit 988843d
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ import (
"os"
"path/filepath"

srv "kubevirt.io/kubevirt/cmd/sidecars/network-passt-binding/server"

"google.golang.org/grpc"

"kubevirt.io/kubevirt/pkg/hooks"
hooksInfo "kubevirt.io/kubevirt/pkg/hooks/info"
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 988843d

Please sign in to comment.