From 9e9e36645c80f834be9574e1f01b089d71d984fe Mon Sep 17 00:00:00 2001 From: Artyom Lukianov Date: Wed, 30 Jan 2019 13:45:39 +0200 Subject: [PATCH] Add bazel BUILD and WORKSPACE files --- .gitignore | 1 + BUILD.bazel | 159 ++++++++++++++++++ WORKSPACE | 142 ++++++++++++++++ cmd/container-disk-v1alpha/BUILD.bazel | 125 ++++++++++++++ .../BUILD.bazel | 22 +++ cmd/example-hook-sidecar/BUILD.bazel | 37 ++++ cmd/fake-qemu-process/BUILD.bazel | 15 ++ cmd/subresource-access-test/BUILD.bazel | 33 ++++ cmd/virt-api/BUILD.bazel | 47 ++++++ cmd/virt-controller/BUILD.bazel | 45 +++++ cmd/virt-handler/BUILD.bazel | 65 +++++++ cmd/virt-launcher/BUILD.bazel | 83 +++++++++ cmd/virt-operator/BUILD.bazel | 42 +++++ cmd/virtctl/BUILD.bazel | 21 +++ images/cdi-http-import-server/BUILD.bazel | 47 ++++++ images/disks-images-provider/BUILD.bazel | 64 +++++++ images/vm-killer/BUILD.bazel | 10 ++ images/winrmcli/BUILD.bazel | 12 ++ pkg/api/BUILD.bazel | 8 + pkg/api/v1/BUILD.bazel | 55 ++++++ pkg/certificates/BUILD.bazel | 27 +++ pkg/cloud-init/BUILD.bazel | 37 ++++ pkg/config/BUILD.bazel | 33 ++++ pkg/container-disk/BUILD.bazel | 31 ++++ pkg/controller/BUILD.bazel | 72 ++++++++ pkg/emptydisk/BUILD.bazel | 25 +++ pkg/ephemeral-disk-utils/BUILD.bazel | 12 ++ pkg/ephemeral-disk/BUILD.bazel | 28 +++ pkg/healthz/BUILD.bazel | 13 ++ pkg/hooks/BUILD.bazel | 37 ++++ pkg/hooks/info/BUILD.bazel | 24 +++ pkg/hooks/v1alpha1/BUILD.bazel | 24 +++ pkg/hooks/v1alpha2/BUILD.bazel | 24 +++ pkg/host-disk/BUILD.bazel | 37 ++++ pkg/inotify-informer/BUILD.bazel | 36 ++++ pkg/kubecli/BUILD.bazel | 106 ++++++++++++ pkg/log/BUILD.bazel | 33 ++++ pkg/middleware/BUILD.bazel | 34 ++++ pkg/monitoring/client/prometheus/BUILD.bazel | 12 ++ .../reflector/prometheus/BUILD.bazel | 12 ++ .../workqueue/prometheus/BUILD.bazel | 12 ++ pkg/precond/BUILD.bazel | 8 + pkg/rest/BUILD.bazel | 8 + pkg/rest/endpoints/BUILD.bazel | 53 ++++++ pkg/rest/filter/BUILD.bazel | 12 ++ pkg/service/BUILD.bazel | 9 + pkg/staging/glog/BUILD.bazel | 9 + pkg/testutils/BUILD.bazel | 28 +++ pkg/util/BUILD.bazel | 11 ++ pkg/util/hardware/BUILD.bazel | 24 +++ pkg/util/net/dns/BUILD.bazel | 28 +++ pkg/util/openapi/BUILD.bazel | 18 ++ pkg/util/subresources/BUILD.bazel | 8 + pkg/util/types/BUILD.bazel | 35 ++++ pkg/version/BUILD.bazel | 12 ++ pkg/virt-api/BUILD.bazel | 71 ++++++++ pkg/virt-api/rest/BUILD.bazel | 65 +++++++ pkg/virt-api/webhooks/BUILD.bazel | 22 +++ .../webhooks/mutating-webhook/BUILD.bazel | 51 ++++++ .../webhooks/validating-webhook/BUILD.bazel | 53 ++++++ pkg/virt-config/BUILD.bazel | 21 +++ .../leaderelectionconfig/BUILD.bazel | 16 ++ pkg/virt-controller/rest/BUILD.bazel | 12 ++ pkg/virt-controller/services/BUILD.bazel | 55 ++++++ pkg/virt-controller/watch/BUILD.bazel | 92 ++++++++++ pkg/virt-handler/BUILD.bazel | 67 ++++++++ pkg/virt-handler/cache/BUILD.bazel | 43 +++++ pkg/virt-handler/cmd-client/BUILD.bazel | 17 ++ pkg/virt-handler/device-manager/BUILD.bazel | 36 ++++ .../deviceplugin/v1beta1/BUILD.bazel | 21 +++ pkg/virt-handler/isolation/BUILD.bazel | 33 ++++ pkg/virt-handler/migration-proxy/BUILD.bazel | 23 +++ pkg/virt-handler/notify-server/BUILD.bazel | 18 ++ pkg/virt-launcher/BUILD.bazel | 30 ++++ pkg/virt-launcher/notify-client/BUILD.bazel | 50 ++++++ pkg/virt-launcher/virtwrap/BUILD.bazel | 59 +++++++ .../virtwrap/agent-poller/BUILD.bazel | 28 +++ pkg/virt-launcher/virtwrap/api/BUILD.bazel | 57 +++++++ pkg/virt-launcher/virtwrap/cli/BUILD.bazel | 32 ++++ .../virtwrap/cmd-server/BUILD.bazel | 34 ++++ pkg/virt-launcher/virtwrap/errors/BUILD.bazel | 9 + .../virtwrap/network/BUILD.bazel | 47 ++++++ .../virtwrap/network/dhcp/BUILD.bazel | 35 ++++ pkg/virt-launcher/virtwrap/util/BUILD.bazel | 36 ++++ pkg/virt-operator/BUILD.bazel | 69 ++++++++ pkg/virt-operator/creation/BUILD.bazel | 16 ++ .../creation/components/BUILD.bazel | 24 +++ pkg/virt-operator/creation/rbac/BUILD.bazel | 22 +++ pkg/virt-operator/deletion/BUILD.bazel | 20 +++ pkg/virt-operator/util/BUILD.bazel | 46 +++++ pkg/virtctl/BUILD.bazel | 24 +++ pkg/virtctl/console/BUILD.bazel | 15 ++ pkg/virtctl/expose/BUILD.bazel | 41 +++++ pkg/virtctl/imageupload/BUILD.bazel | 47 ++++++ pkg/virtctl/templates/BUILD.bazel | 8 + pkg/virtctl/version/BUILD.bazel | 15 ++ pkg/virtctl/vm/BUILD.bazel | 34 ++++ pkg/virtctl/vnc/BUILD.bazel | 15 ++ pkg/watchdog/BUILD.bazel | 31 ++++ tests/BUILD.bazel | 131 +++++++++++++++ tools/manifest-templator/BUILD.bazel | 15 ++ tools/openapispec/BUILD.bazel | 22 +++ tools/resource-generator/BUILD.bazel | 20 +++ tools/util/BUILD.bazel | 23 +++ tools/vms-generator/BUILD.bazel | 22 +++ tools/vms-generator/utils/BUILD.bazel | 21 +++ .../openshift/api/apps/v1/BUILD.bazel | 29 ++++ .../api/authorization/v1/BUILD.bazel | 27 +++ .../openshift/api/build/v1/BUILD.bazel | 26 +++ .../openshift/api/config/v1/BUILD.bazel | 22 +++ .../openshift/api/image/v1/BUILD.bazel | 27 +++ .../openshift/api/network/v1/BUILD.bazel | 24 +++ .../openshift/api/oauth/v1/BUILD.bazel | 25 +++ .../api/operator/v1alpha1/BUILD.bazel | 23 +++ .../openshift/api/project/v1/BUILD.bazel | 24 +++ .../openshift/api/quota/v1/BUILD.bazel | 25 +++ .../openshift/api/route/v1/BUILD.bazel | 25 +++ .../openshift/api/security/v1/BUILD.bazel | 24 +++ .../servicecertsigner/v1alpha1/BUILD.bazel | 24 +++ .../openshift/api/template/v1/BUILD.bazel | 29 ++++ .../openshift/api/user/v1/BUILD.bazel | 25 +++ .../openshift/api/webconsole/v1/BUILD.bazel | 24 +++ 122 files changed, 4182 insertions(+) create mode 100644 BUILD.bazel create mode 100644 WORKSPACE create mode 100644 cmd/container-disk-v1alpha/BUILD.bazel create mode 100644 cmd/example-cloudinit-hook-sidecar/BUILD.bazel create mode 100644 cmd/example-hook-sidecar/BUILD.bazel create mode 100644 cmd/fake-qemu-process/BUILD.bazel create mode 100644 cmd/subresource-access-test/BUILD.bazel create mode 100644 cmd/virt-api/BUILD.bazel create mode 100644 cmd/virt-controller/BUILD.bazel create mode 100644 cmd/virt-handler/BUILD.bazel create mode 100644 cmd/virt-launcher/BUILD.bazel create mode 100644 cmd/virt-operator/BUILD.bazel create mode 100644 cmd/virtctl/BUILD.bazel create mode 100644 images/cdi-http-import-server/BUILD.bazel create mode 100644 images/disks-images-provider/BUILD.bazel create mode 100644 images/vm-killer/BUILD.bazel create mode 100644 images/winrmcli/BUILD.bazel create mode 100644 pkg/api/BUILD.bazel create mode 100644 pkg/api/v1/BUILD.bazel create mode 100644 pkg/certificates/BUILD.bazel create mode 100644 pkg/cloud-init/BUILD.bazel create mode 100644 pkg/config/BUILD.bazel create mode 100644 pkg/container-disk/BUILD.bazel create mode 100644 pkg/controller/BUILD.bazel create mode 100644 pkg/emptydisk/BUILD.bazel create mode 100644 pkg/ephemeral-disk-utils/BUILD.bazel create mode 100644 pkg/ephemeral-disk/BUILD.bazel create mode 100644 pkg/healthz/BUILD.bazel create mode 100644 pkg/hooks/BUILD.bazel create mode 100644 pkg/hooks/info/BUILD.bazel create mode 100644 pkg/hooks/v1alpha1/BUILD.bazel create mode 100644 pkg/hooks/v1alpha2/BUILD.bazel create mode 100644 pkg/host-disk/BUILD.bazel create mode 100644 pkg/inotify-informer/BUILD.bazel create mode 100644 pkg/kubecli/BUILD.bazel create mode 100644 pkg/log/BUILD.bazel create mode 100644 pkg/middleware/BUILD.bazel create mode 100644 pkg/monitoring/client/prometheus/BUILD.bazel create mode 100644 pkg/monitoring/reflector/prometheus/BUILD.bazel create mode 100644 pkg/monitoring/workqueue/prometheus/BUILD.bazel create mode 100644 pkg/precond/BUILD.bazel create mode 100644 pkg/rest/BUILD.bazel create mode 100644 pkg/rest/endpoints/BUILD.bazel create mode 100644 pkg/rest/filter/BUILD.bazel create mode 100644 pkg/service/BUILD.bazel create mode 100644 pkg/staging/glog/BUILD.bazel create mode 100644 pkg/testutils/BUILD.bazel create mode 100644 pkg/util/BUILD.bazel create mode 100644 pkg/util/hardware/BUILD.bazel create mode 100644 pkg/util/net/dns/BUILD.bazel create mode 100644 pkg/util/openapi/BUILD.bazel create mode 100644 pkg/util/subresources/BUILD.bazel create mode 100644 pkg/util/types/BUILD.bazel create mode 100644 pkg/version/BUILD.bazel create mode 100644 pkg/virt-api/BUILD.bazel create mode 100644 pkg/virt-api/rest/BUILD.bazel create mode 100644 pkg/virt-api/webhooks/BUILD.bazel create mode 100644 pkg/virt-api/webhooks/mutating-webhook/BUILD.bazel create mode 100644 pkg/virt-api/webhooks/validating-webhook/BUILD.bazel create mode 100644 pkg/virt-config/BUILD.bazel create mode 100644 pkg/virt-controller/leaderelectionconfig/BUILD.bazel create mode 100644 pkg/virt-controller/rest/BUILD.bazel create mode 100644 pkg/virt-controller/services/BUILD.bazel create mode 100644 pkg/virt-controller/watch/BUILD.bazel create mode 100644 pkg/virt-handler/BUILD.bazel create mode 100644 pkg/virt-handler/cache/BUILD.bazel create mode 100644 pkg/virt-handler/cmd-client/BUILD.bazel create mode 100644 pkg/virt-handler/device-manager/BUILD.bazel create mode 100644 pkg/virt-handler/device-manager/deviceplugin/v1beta1/BUILD.bazel create mode 100644 pkg/virt-handler/isolation/BUILD.bazel create mode 100644 pkg/virt-handler/migration-proxy/BUILD.bazel create mode 100644 pkg/virt-handler/notify-server/BUILD.bazel create mode 100644 pkg/virt-launcher/BUILD.bazel create mode 100644 pkg/virt-launcher/notify-client/BUILD.bazel create mode 100644 pkg/virt-launcher/virtwrap/BUILD.bazel create mode 100644 pkg/virt-launcher/virtwrap/agent-poller/BUILD.bazel create mode 100644 pkg/virt-launcher/virtwrap/api/BUILD.bazel create mode 100644 pkg/virt-launcher/virtwrap/cli/BUILD.bazel create mode 100644 pkg/virt-launcher/virtwrap/cmd-server/BUILD.bazel create mode 100644 pkg/virt-launcher/virtwrap/errors/BUILD.bazel create mode 100644 pkg/virt-launcher/virtwrap/network/BUILD.bazel create mode 100644 pkg/virt-launcher/virtwrap/network/dhcp/BUILD.bazel create mode 100644 pkg/virt-launcher/virtwrap/util/BUILD.bazel create mode 100644 pkg/virt-operator/BUILD.bazel create mode 100644 pkg/virt-operator/creation/BUILD.bazel create mode 100644 pkg/virt-operator/creation/components/BUILD.bazel create mode 100644 pkg/virt-operator/creation/rbac/BUILD.bazel create mode 100644 pkg/virt-operator/deletion/BUILD.bazel create mode 100644 pkg/virt-operator/util/BUILD.bazel create mode 100644 pkg/virtctl/BUILD.bazel create mode 100644 pkg/virtctl/console/BUILD.bazel create mode 100644 pkg/virtctl/expose/BUILD.bazel create mode 100644 pkg/virtctl/imageupload/BUILD.bazel create mode 100644 pkg/virtctl/templates/BUILD.bazel create mode 100644 pkg/virtctl/version/BUILD.bazel create mode 100644 pkg/virtctl/vm/BUILD.bazel create mode 100644 pkg/virtctl/vnc/BUILD.bazel create mode 100644 pkg/watchdog/BUILD.bazel create mode 100644 tests/BUILD.bazel create mode 100644 tools/manifest-templator/BUILD.bazel create mode 100644 tools/openapispec/BUILD.bazel create mode 100644 tools/resource-generator/BUILD.bazel create mode 100644 tools/util/BUILD.bazel create mode 100644 tools/vms-generator/BUILD.bazel create mode 100644 tools/vms-generator/utils/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/apps/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/authorization/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/build/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/config/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/image/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/network/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/oauth/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/operator/v1alpha1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/project/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/quota/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/route/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/security/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/servicecertsigner/v1alpha1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/template/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/user/v1/BUILD.bazel create mode 100644 vendor/github.com/openshift/api/webconsole/v1/BUILD.bazel diff --git a/.gitignore b/.gitignore index 84cb11521970..673e9b5da524 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ tools/vms-generator/vms-generator .coverprofile coverage.html manifests/**/*.tmp +bazel-* diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 000000000000..286e66f063b4 --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,159 @@ +load("@bazel_gazelle//:def.bzl", "gazelle") + +gazelle( + name = "gazelle", + prefix = "kubevirt.io", +) + +genrule( + name = "get-version", + srcs = [], + outs = [".version"], + cmd = "grep ^STABLE_BUILD_SCM_REVISION bazel-out/stable-status.txt | cut -d' ' -f2 >$@", + stamp = 1, + visibility = ["//visibility:public"], +) + +genrule( + name = "libvirt-shared-libs", + srcs = ["@libvirt_libs//file"], + outs = [ + "libvirt.so.0.5000.0", + "libvirt-lxc.so.0.5000.0", + "libvirt-qemu.so.0.5000.0", + ], + cmd = "\n".join([ + "rpm2archive $(location @libvirt_libs//file)", + "tar -xzf $(location @libvirt_libs//file).tgz", + "cp -R usr/lib64/*.so.0.5000.0 $(@D)", + ]), +) + +cc_library( + name = "libvirt-libs", + srcs = [ + ":libvirt-shared-libs", + ], + visibility = ["//visibility:public"], +) + +genrule( + name = "libvirt-devel-headers", + srcs = ["@libvirt_devel//file"], + outs = [ + "libvirt/libvirt-admin.h", + "libvirt/libvirt-common.h", + "libvirt/libvirt-domain.h", + "libvirt/libvirt-domain-snapshot.h", + "libvirt/libvirt-event.h", + "libvirt/libvirt.h", + "libvirt/libvirt-host.h", + "libvirt/libvirt-interface.h", + "libvirt/libvirt-lxc.h", + "libvirt/libvirt-network.h", + "libvirt/libvirt-nodedev.h", + "libvirt/libvirt-nwfilter.h", + "libvirt/libvirt-qemu.h", + "libvirt/libvirt-secret.h", + "libvirt/libvirt-storage.h", + "libvirt/libvirt-stream.h", + "libvirt/virterror.h", + ], + cmd = "\n".join([ + "rpm2archive $(location @libvirt_devel//file)", + "tar -xzf $(location @libvirt_devel//file).tgz", + "cp -R usr/include/libvirt $(@D)", + ]), +) + +cc_library( + name = "libvirt-headers", + hdrs = [ + ":libvirt-devel-headers", + ], + visibility = ["//visibility:public"], +) + +load("@io_bazel_rules_docker//contrib:passwd.bzl", "passwd_entry", "passwd_file") +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") + +passwd_entry( + name = "nonroot-user", + home = "/home/nonroot-user", + shell = "/bin/bash", + uid = 1001, + gid = 1001, + username = "nonroot-user", +) + +passwd_file( + name = "passwd", + entries = [ + ":nonroot-user", + ], +) + +pkg_tar( + name = "passwd-tar", + srcs = [":passwd"], + mode = "0644", + package_dir = "etc", + visibility = ["//visibility:public"], +) + +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", + container_repositories = "repositories", +) + +container_image( + name = "passwd-image", + base = "@fedora//image", + tars = [":passwd-tar"], + user = "1001", + visibility = ["//visibility:public"], +) + +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_bundle", + container_repositories = "repositories", +) + +config_setting( + name = "release", + values = {"define": "release=true"}, +) + +container_bundle( + name = "build-images", + images = { + # cmd images + "$(container_prefix)/container-disk-v1alpha:$(container_tag)": "//cmd/container-disk-v1alpha:container-disk-v1alpha-image", + "$(container_prefix)/example-hook-sidecar:$(container_tag)": "//cmd/example-hook-sidecar:example-hook-sidecar-image", + "$(container_prefix)/subresource-access-test:$(container_tag)": "//cmd/subresource-access-test:subresource-access-test-image", + "$(container_prefix)/virt-controller:$(container_tag)": "//cmd/virt-controller:virt-controller-image", + "$(container_prefix)/virt-launcher:$(container_tag)": "//cmd/virt-launcher:virt-launcher-image", + "$(container_prefix)/virt-handler:$(container_tag)": "//cmd/virt-handler:virt-handler-image", + "$(container_prefix)/virt-api:$(container_tag)": "//cmd/virt-api:virt-api-image", + "$(container_prefix)/virt-operator:$(container_tag)": "//cmd/virt-operator:virt-operator-image", + # container-disk images + "$(container_prefix)/alpine-container-disk-demo:$(container_tag)": "//cmd/container-disk-v1alpha:alpine-container-disk-image", + "$(container_prefix)/cirros-container-disk-demo:$(container_tag)": "//cmd/container-disk-v1alpha:cirros-container-disk-image", + "$(container_prefix)/fedora-cloud-container-disk-demo:$(container_tag)": "//cmd/container-disk-v1alpha:fedora-cloud-container-disk-image", + "$(container_prefix)/virtio-container-disk:$(container_tag)": "//cmd/container-disk-v1alpha:virtio-container-disk-image", + # testing images + "$(container_prefix)/disks-images-provider:$(container_tag)": "//images/disks-images-provider:disks-images-provider-image", + "$(container_prefix)/cdi-http-import-server:$(container_tag)": "//images/cdi-http-import-server:cdi-http-import-server-image", + "$(container_prefix)/vm-killer:$(container_tag)": "//images/vm-killer:vm-killer-image", + "$(container_prefix)/winrmcli:$(container_tag)": "//images/winrmcli:winrmcli-image", + }, +) + +load("@io_bazel_rules_docker//contrib:push-all.bzl", "docker_push") + +docker_push( + name = "push-images", + bundle = ":build-images", +) diff --git a/WORKSPACE b/WORKSPACE new file mode 100644 index 000000000000..4a55cb5e8d86 --- /dev/null +++ b/WORKSPACE @@ -0,0 +1,142 @@ +load( + "@bazel_tools//tools/build_defs/repo:http.bzl", + "http_archive", + "http_file", +) + +# Additional bazel rules +http_archive( + name = "io_bazel_rules_go", + url = "https://github.com/bazelbuild/rules_go/releases/download/0.16.5/rules_go-0.16.5.tar.gz", + sha256 = "7be7dc01f1e0afdba6c8eb2b43d2fa01c743be1b9273ab1eaf6c233df078d705", +) + +http_archive( + name = "bazel_gazelle", + urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.16.0/bazel-gazelle-0.16.0.tar.gz"], + sha256 = "7949fc6cc17b5b191103e97481cf8889217263acf52e00b560683413af204fcb", +) + +load( + "@bazel_tools//tools/build_defs/repo:git.bzl", + "git_repository", +) + +git_repository( + name = "io_bazel_rules_docker", + remote = "https://github.com/bazelbuild/rules_docker.git", + tag = "v0.5.1", +) + +# Libvirt dependencies +http_file( + name = "libvirt_libs", + urls = [ + "https://libvirt.org/sources/libvirt-libs-5.0.0-1.fc28.x86_64.rpm", + ], + sha256 = "95d317fd645fb52745d642578263a9bcb0d796beadf00aeadebc0d692f5529ba", +) + +http_file( + name = "libvirt_devel", + urls = [ + "https://libvirt.org/sources/libvirt-devel-5.0.0-1.fc28.x86_64.rpm", + ], + sha256 = "6573a047d777ed00f6858c2e75c780053b1f898ae1c3f7415e991c94c5ccdd70", +) + +# Disk images +http_file( + name = "alpine_image", + urls = [ + "http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/x86_64/alpine-virt-3.7.0-x86_64.iso", + ], + sha256 = "5a4b2588afd32e7024dd61d9558b77b03a4f3189cb4c9fc05e9e944fb780acdd", +) + +http_file( + name = "cirros_image", + urls = [ + "https://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img", + ], + sha256 = "a8dd75ecffd4cdd96072d60c2237b448e0c8b2bc94d57f10fdbc8c481d9005b8", +) + +http_file( + name = "fedora_image", + urls = [ + "https://download.fedoraproject.org/pub/fedora/linux/releases/29/Cloud/x86_64/images/Fedora-Cloud-Base-29-1.2.x86_64.qcow2", + ], + sha256 = "a30549d620bf6bf41d30a9a58626e59dfa70bb011fd7d50f6c4511ad2e479a39", +) + +http_file( + name = "virtio_win_image", + urls = [ + "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso", + ], + sha256 = "43c969f99b02ec6467ecb1f6d93689327a248cfa8de9c4b34d65b6b41e7bc556", +) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_rules_dependencies", + "go_register_toolchains", +) +go_rules_dependencies() +go_register_toolchains() + +load( + "@bazel_gazelle//:deps.bzl", + "gazelle_dependencies", + "go_repository", +) +gazelle_dependencies() + +# Winrmcli dependencies +go_repository( + name = "com_github_masterzen_winrmcli", + commit = "c85a68ee8b6e3ac95af2a5fd62d2f41c9e9c5f32", + importpath = "github.com/masterzen/winrm-cli", +) + +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_pull", + "container_image", + container_repositories = "repositories", +) +container_repositories() + +# Pull base image fedora28 +container_pull( + name = "fedora", + registry = "index.docker.io", + repository = "library/fedora", + digest = "sha256:57d86e03971841e79585379f8346289ceb5a3e8ee06933fbd5064b4f004659d1", + #tag = "28", +) + +# Pull base image libvirt +container_pull( + name = "libvirt", + registry = "index.docker.io", + repository = "alukiano/libvirt", + digest = "sha256:23cb9e64909fb9519d1b256ceefc546deb3eb81ccbe7e83c3ef461a7cd2b3da9", + #tag = "4.9.0", +) + +# Pull base image cdi-http-import-server +container_pull( + name = "cdi-http-import-server-base", + registry = "index.docker.io", + repository = "kubevirt/cdi-http-import-server-base", + digest = "sha256:7cf1dd568d853884e558f714a24566682c091ff783495cccac0349e82c8a874f", + #tag = "28", +) + +load( + "@io_bazel_rules_docker//go:image.bzl", + _go_image_repos = "repositories", +) +_go_image_repos() diff --git a/cmd/container-disk-v1alpha/BUILD.bazel b/cmd/container-disk-v1alpha/BUILD.bazel new file mode 100644 index 000000000000..b58e7fb65bac --- /dev/null +++ b/cmd/container-disk-v1alpha/BUILD.bazel @@ -0,0 +1,125 @@ +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", +) +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") + +container_image( + name = "container-disk-v1alpha-image", + base = "@libvirt//image", + files = ["entrypoint.sh"], + directory = "/", + entrypoint = ["/entrypoint.sh"], + visibility = ["//visibility:public"], +) + +genrule( + name = "alpine-iso", + srcs = ["@alpine_image//file"], + outs = ["disk/alpine.iso"], + cmd = "mkdir disk && cat $(location @alpine_image//file) > $@", +) + +pkg_tar( + name = "alpine-iso-tar", + srcs = [":alpine-iso"], + mode = "0644", + package_dir = "disk", +) + +container_image( + name = "alpine-container-disk-image", + base = ":container-disk-v1alpha-image", + tars = [":alpine-iso-tar"], + directory = "/", + entrypoint = ["/entrypoint.sh"], + visibility = ["//visibility:public"], +) + +genrule( + name = "cirros-iso", + srcs = ["@cirros_image//file"], + outs = ["disk/cirros.img"], + cmd = "mkdir disk && cat $(location @cirros_image//file) > $@", +) + +pkg_tar( + name = "cirros-iso-tar", + srcs = [":cirros-iso"], + mode = "0644", + package_dir = "disk", +) + +genrule( + name = "cirros-custom-iso", + srcs = ["@cirros_image//file"], + outs = ["custom-disk/cirros.img"], + cmd = "mkdir custom-disk && cat $(location @cirros_image//file) > $@", +) + +pkg_tar( + name = "cirros-custom-iso-tar", + srcs = [":cirros-custom-iso"], + mode = "0644", + package_dir = "custom-disk", +) + +container_image( + name = "cirros-container-disk-image", + base = ":container-disk-v1alpha-image", + tars = [ + ":cirros-iso-tar", + ":cirros-custom-iso-tar", + ], + directory = "/", + entrypoint = ["/entrypoint.sh"], + visibility = ["//visibility:public"], +) + +genrule( + name = "fedora-cloud-iso", + srcs = ["@fedora_image//file"], + outs = ["disk/fedora.qcow2"], + cmd = "mkdir disk && cat $(location @fedora_image//file) > $@", +) + +pkg_tar( + name = "fedora-cloud-iso-tar", + srcs = [":fedora-cloud-iso"], + mode = "0644", + package_dir = "disk", + visibility = ["//visibility:public"], +) + +container_image( + name = "fedora-cloud-container-disk-image", + base = ":container-disk-v1alpha-image", + tars = [":fedora-cloud-iso-tar"], + directory = "/", + entrypoint = ["/entrypoint.sh"], + visibility = ["//visibility:public"], +) + +genrule( + name = "virtio-win-iso", + srcs = ["@virtio_win_image//file"], + outs = ["disk/virtio-win.iso"], + cmd = "mkdir disk && cat $(location @virtio_win_image//file) > $@", +) + +pkg_tar( + name = "virtio-win-iso-tar", + srcs = [":virtio-win-iso"], + mode = "0644", + package_dir = "disk", + visibility = ["//visibility:public"], +) + +container_image( + name = "virtio-container-disk-image", + base = ":container-disk-v1alpha-image", + tars = [":virtio-win-iso-tar"], + directory = "/", + entrypoint = ["/entrypoint.sh"], + visibility = ["//visibility:public"], +) diff --git a/cmd/example-cloudinit-hook-sidecar/BUILD.bazel b/cmd/example-cloudinit-hook-sidecar/BUILD.bazel new file mode 100644 index 000000000000..e55a7880dc2c --- /dev/null +++ b/cmd/example-cloudinit-hook-sidecar/BUILD.bazel @@ -0,0 +1,22 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["cloudinit.go"], + importpath = "kubevirt.io/kubevirt/cmd/example-cloudinit-hook-sidecar", + visibility = ["//visibility:private"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/hooks:go_default_library", + "//pkg/hooks/info:go_default_library", + "//pkg/hooks/v1alpha2:go_default_library", + "//pkg/log:go_default_library", + "@org_golang_google_grpc//:go_default_library", + ], +) + +go_binary( + name = "example-cloudinit-hook-sidecar", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) diff --git a/cmd/example-hook-sidecar/BUILD.bazel b/cmd/example-hook-sidecar/BUILD.bazel new file mode 100644 index 000000000000..1081e4ed3eba --- /dev/null +++ b/cmd/example-hook-sidecar/BUILD.bazel @@ -0,0 +1,37 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["smbios.go"], + importpath = "kubevirt.io/kubevirt/cmd/example-hook-sidecar", + visibility = ["//visibility:private"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/hooks:go_default_library", + "//pkg/hooks/info:go_default_library", + "//pkg/hooks/v1alpha1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "@org_golang_google_grpc//:go_default_library", + ], +) + +go_binary( + name = "example-hook-sidecar", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) + +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", +) + +container_image( + name = "example-hook-sidecar-image", + base = "@fedora//image", + files = [":example-hook-sidecar"], + directory = "/", + entrypoint = ["/example-hook-sidecar"], + visibility = ["//visibility:public"], +) diff --git a/cmd/fake-qemu-process/BUILD.bazel b/cmd/fake-qemu-process/BUILD.bazel new file mode 100644 index 000000000000..b4f9adad8df0 --- /dev/null +++ b/cmd/fake-qemu-process/BUILD.bazel @@ -0,0 +1,15 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["fake-qemu.go"], + importpath = "kubevirt.io/kubevirt/cmd/fake-qemu-process", + visibility = ["//visibility:private"], + deps = ["//vendor/github.com/spf13/pflag:go_default_library"], +) + +go_binary( + name = "fake-qemu-process", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) diff --git a/cmd/subresource-access-test/BUILD.bazel b/cmd/subresource-access-test/BUILD.bazel new file mode 100644 index 000000000000..587b5b58f271 --- /dev/null +++ b/cmd/subresource-access-test/BUILD.bazel @@ -0,0 +1,33 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["subresource-access-test.go"], + importpath = "kubevirt.io/kubevirt/cmd/subresource-access-test", + visibility = ["//visibility:private"], + deps = [ + "//pkg/kubecli:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + ], +) + +go_binary( + name = "subresource-access-test", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) + +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", +) + +container_image( + name = "subresource-access-test-image", + base = "//:passwd-image", + files = [":subresource-access-test"], + directory = "/", + entrypoint = ["/subresource-access-test"], + user = "1001", + visibility = ["//visibility:public"], +) diff --git a/cmd/virt-api/BUILD.bazel b/cmd/virt-api/BUILD.bazel new file mode 100644 index 000000000000..d91bb2f01f5d --- /dev/null +++ b/cmd/virt-api/BUILD.bazel @@ -0,0 +1,47 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["virt-api.go"], + importpath = "kubevirt.io/kubevirt/cmd/virt-api", + visibility = ["//visibility:private"], + deps = [ + "//pkg/log:go_default_library", + "//pkg/monitoring/client/prometheus:go_default_library", + "//pkg/monitoring/reflector/prometheus:go_default_library", + "//pkg/monitoring/workqueue/prometheus:go_default_library", + "//pkg/service:go_default_library", + "//pkg/virt-api:go_default_library", + ], +) + +load("//pkg/version:def.bzl", "version_x_defs") + +go_binary( + name = "virt-api", + embed = [":go_default_library"], + visibility = ["//visibility:public"], + x_defs = version_x_defs(), +) + +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", +) + +container_image( + name = "version-container", + base = "//:passwd-image", + files = ["//:get-version"], + directory = "/", +) + +container_image( + name = "virt-api-image", + base = ":version-container", + files = [":virt-api"], + directory = "/usr/bin/", + entrypoint = ["/usr/bin/virt-api"], + user = "1001", + visibility = ["//visibility:public"], +) diff --git a/cmd/virt-controller/BUILD.bazel b/cmd/virt-controller/BUILD.bazel new file mode 100644 index 000000000000..9347dab3dd7a --- /dev/null +++ b/cmd/virt-controller/BUILD.bazel @@ -0,0 +1,45 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["virt-controller.go"], + importpath = "kubevirt.io/kubevirt/cmd/virt-controller", + visibility = ["//visibility:private"], + deps = [ + "//pkg/monitoring/client/prometheus:go_default_library", + "//pkg/monitoring/reflector/prometheus:go_default_library", + "//pkg/monitoring/workqueue/prometheus:go_default_library", + "//pkg/virt-controller/watch:go_default_library", + ], +) + +load("//pkg/version:def.bzl", "version_x_defs") + +go_binary( + name = "virt-controller", + embed = [":go_default_library"], + visibility = ["//visibility:public"], + x_defs = version_x_defs(), +) + +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", +) + +container_image( + name = "version-container", + base = "//:passwd-image", + files = ["//:get-version"], + directory = "/", +) + +container_image( + name = "virt-controller-image", + base = ":version-container", + files = [":virt-controller"], + directory = "/usr/bin/", + entrypoint = ["/usr/bin/virt-controller"], + user = "1001", + visibility = ["//visibility:public"], +) diff --git a/cmd/virt-handler/BUILD.bazel b/cmd/virt-handler/BUILD.bazel new file mode 100644 index 000000000000..964832b4217b --- /dev/null +++ b/cmd/virt-handler/BUILD.bazel @@ -0,0 +1,65 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["virt-handler.go"], + importpath = "kubevirt.io/kubevirt/cmd/virt-handler", + visibility = ["//visibility:private"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/certificates:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/inotify-informer:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/monitoring/client/prometheus:go_default_library", + "//pkg/monitoring/reflector/prometheus:go_default_library", + "//pkg/monitoring/workqueue/prometheus:go_default_library", + "//pkg/service:go_default_library", + "//pkg/util:go_default_library", + "//pkg/virt-handler:go_default_library", + "//pkg/virt-handler/cache:go_default_library", + "//pkg/virt-launcher:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//vendor/github.com/prometheus/client_golang/prometheus/promhttp:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + "@com_github_golang_glog//:go_default_library", + ], +) + +load("//pkg/version:def.bzl", "version_x_defs") + +go_binary( + name = "virt-handler", + embed = [":go_default_library"], + visibility = ["//visibility:public"], + x_defs = version_x_defs(), +) + +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", +) + +container_image( + name = "version-container", + base = "@fedora//image", + files = ["//:get-version"], + directory = "/", +) + +container_image( + name = "virt-handler-image", + base = ":version-container", + files = [":virt-handler"], + directory = "/usr/bin/", + entrypoint = ["/usr/bin/virt-handler"], + visibility = ["//visibility:public"], +) diff --git a/cmd/virt-launcher/BUILD.bazel b/cmd/virt-launcher/BUILD.bazel new file mode 100644 index 000000000000..1c538eb9ed6d --- /dev/null +++ b/cmd/virt-launcher/BUILD.bazel @@ -0,0 +1,83 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["virt-launcher.go"], + importpath = "kubevirt.io/kubevirt/cmd/virt-launcher", + visibility = ["//visibility:private"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/cloud-init:go_default_library", + "//pkg/config:go_default_library", + "//pkg/container-disk:go_default_library", + "//pkg/ephemeral-disk:go_default_library", + "//pkg/hooks:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-handler/cmd-client:go_default_library", + "//pkg/virt-launcher:go_default_library", + "//pkg/virt-launcher/notify-client:go_default_library", + "//pkg/virt-launcher/virtwrap:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/virt-launcher/virtwrap/cli:go_default_library", + "//pkg/virt-launcher/virtwrap/cmd-server:go_default_library", + "//pkg/virt-launcher/virtwrap/util:go_default_library", + "//pkg/watchdog:go_default_library", + "//vendor/github.com/libvirt/libvirt-go:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + ], +) + +load("//pkg/version:def.bzl", "version_x_defs") + +go_binary( + name = "virt-launcher", + embed = [":go_default_library"], + visibility = ["//visibility:public"], + x_defs = version_x_defs(), +) + +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") + +pkg_tar( + name = "sock-connector-tar", + srcs = [ + "sock-connector", + ], + package_dir = "/usr/share/kubevirt/virt-launcher", + mode = "755", +) + +pkg_tar( + name = "virt-launcher-tar", + srcs = [ + ":virt-launcher", + ], + mode = "755", + package_dir = "/usr/bin", +) + +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", +) + +container_image( + name = "version-container", + base = "@libvirt//image", + files = ["//:get-version"], + directory = "/", +) + +container_image( + name = "virt-launcher-image", + base = ":version-container", + entrypoint = ["/usr/bin/virt-launcher"], + tars = [ + ":sock-connector-tar", + ":virt-launcher-tar", + ], + visibility = ["//visibility:public"], +) diff --git a/cmd/virt-operator/BUILD.bazel b/cmd/virt-operator/BUILD.bazel new file mode 100644 index 000000000000..844b86cdb865 --- /dev/null +++ b/cmd/virt-operator/BUILD.bazel @@ -0,0 +1,42 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["virt-operator.go"], + importpath = "kubevirt.io/kubevirt/cmd/virt-operator", + visibility = ["//visibility:private"], + deps = [ + "//pkg/monitoring/client/prometheus:go_default_library", + "//pkg/monitoring/reflector/prometheus:go_default_library", + "//pkg/monitoring/workqueue/prometheus:go_default_library", + "//pkg/virt-operator:go_default_library", + ], +) + +go_binary( + name = "virt-operator", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) + +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", +) + +container_image( + name = "version-container", + base = "//:passwd-image", + files = ["//:get-version"], + directory = "/", +) + +container_image( + name = "virt-operator-image", + base = ":version-container", + files = [":virt-operator"], + directory = "/usr/bin/", + entrypoint = ["/usr/bin/virt-operator"], + user = "1001", + visibility = ["//visibility:public"], +) diff --git a/cmd/virtctl/BUILD.bazel b/cmd/virtctl/BUILD.bazel new file mode 100644 index 000000000000..94c162a4ec18 --- /dev/null +++ b/cmd/virtctl/BUILD.bazel @@ -0,0 +1,21 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["virtctl.go"], + importpath = "kubevirt.io/kubevirt/cmd/virtctl", + visibility = ["//visibility:private"], + deps = [ + "//pkg/virtctl:go_default_library", + "//vendor/k8s.io/client-go/plugin/pkg/client/auth:go_default_library", + ], +) + +load("//pkg/version:def.bzl", "version_x_defs") + +go_binary( + name = "virtctl", + embed = [":go_default_library"], + visibility = ["//visibility:public"], + x_defs = version_x_defs(), +) diff --git a/images/cdi-http-import-server/BUILD.bazel b/images/cdi-http-import-server/BUILD.bazel new file mode 100644 index 000000000000..549df8fba3eb --- /dev/null +++ b/images/cdi-http-import-server/BUILD.bazel @@ -0,0 +1,47 @@ +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", +) +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") + +genrule( + name = "alpine-iso", + srcs = ["@alpine_image//file"], + outs = ["usr/share/nginx/html/images/alpine.iso"], + cmd = "mkdir -p usr/share/nginx/html/images && cat $(location @alpine_image//file) > $@", +) + +pkg_tar( + name = "alpine-tar", + srcs = [ + ":alpine-iso", + ], + mode = "644", + package_dir = "usr/share/nginx/html/images", +) + +pkg_tar( + name = "nginx-config-tar", + srcs = [ + "nginx.conf", + ], + mode = "664", + package_dir = "/etc/nginx", +) + +container_image( + name = "cdi-http-import-server-image", + base = "@cdi-http-import-server-base//image", + files = [ + "entrypoint.sh", + "expose-as-iscsi.sh", + ], + tars = [ + ":alpine-tar", + ":nginx-config-tar", + ], + directory = "/", + ports = ["80"], + entrypoint = ["/entrypoint.sh"], + visibility = ["//visibility:public"], +) diff --git a/images/disks-images-provider/BUILD.bazel b/images/disks-images-provider/BUILD.bazel new file mode 100644 index 000000000000..7d1b276c1d82 --- /dev/null +++ b/images/disks-images-provider/BUILD.bazel @@ -0,0 +1,64 @@ +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", +) +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") + +genrule( + name = "alpine-img", + srcs = ["@alpine_image//file"], + outs = ["images/alpine/disk.img"], + cmd = "mkdir -p images/alpine && cat $(location @alpine_image//file) > $@", +) + +genrule( + name = "cirros-img", + srcs = ["@cirros_image//file"], + outs = ["images/cirros/disk.img"], + cmd = "mkdir -p images/cirros && cat $(location @cirros_image//file) > $@", +) + +genrule( + name = "custom-img", + srcs = [], + outs = ["images/custom/disk.img"], + cmd = "mkdir -p images/custom && truncate -s 64M disk.img && cat disk.img > $@", +) + +pkg_tar( + name = "alpine-tar", + srcs = [ + ":alpine-img", + ], + package_dir = "images/alpine", +) + +pkg_tar( + name = "cirros-tar", + srcs = [ + ":cirros-img", + ], + package_dir = "images/cirros", +) + +pkg_tar( + name = "custom-tar", + srcs = [ + ":custom-img", + ], + package_dir = "images/custom", +) + +container_image( + name = "disks-images-provider-image", + base = "@libvirt//image", + files = ["entrypoint.sh"], + tars = [ + ":alpine-tar", + ":cirros-tar", + ":custom-tar", + ], + directory = "/", + entrypoint = ["/entrypoint.sh"], + visibility = ["//visibility:public"], +) diff --git a/images/vm-killer/BUILD.bazel b/images/vm-killer/BUILD.bazel new file mode 100644 index 000000000000..f835afc231bf --- /dev/null +++ b/images/vm-killer/BUILD.bazel @@ -0,0 +1,10 @@ +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", +) + +container_image( + name = "vm-killer-image", + base = "@libvirt//image", + visibility = ["//visibility:public"], +) diff --git a/images/winrmcli/BUILD.bazel b/images/winrmcli/BUILD.bazel new file mode 100644 index 000000000000..7464ca88284b --- /dev/null +++ b/images/winrmcli/BUILD.bazel @@ -0,0 +1,12 @@ +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_image", +) + +container_image( + name = "winrmcli-image", + base = "@fedora//image", + files = ["@com_github_masterzen_winrmcli//:winrm-cli"], + directory = "/usr/bin", + visibility = ["//visibility:public"], +) diff --git a/pkg/api/BUILD.bazel b/pkg/api/BUILD.bazel new file mode 100644 index 000000000000..0706bf82fa23 --- /dev/null +++ b/pkg/api/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["types.go"], + importpath = "kubevirt.io/kubevirt/pkg/api", + visibility = ["//visibility:public"], +) diff --git a/pkg/api/v1/BUILD.bazel b/pkg/api/v1/BUILD.bazel new file mode 100644 index 000000000000..2c6ba4c82777 --- /dev/null +++ b/pkg/api/v1/BUILD.bazel @@ -0,0 +1,55 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "deepcopy_generated.go", + "defaults.go", + "doc.go", + "openapi_generated.go", + "schema.go", + "schema_swagger_generated.go", + "types.go", + "types_swagger_generated.go", + "zz_generated.defaults.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/api/v1", + visibility = ["//visibility:public"], + deps = [ + "//pkg/precond:go_default_library", + "//vendor/github.com/go-openapi/spec:go_default_library", + "//vendor/github.com/pborman/uuid:go_default_library", + "//vendor/k8s.io/api/autoscaling/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "deepcopy_test.go", + "defaults_test.go", + "schema_test.go", + "types_test.go", + "v1_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/log:go_default_library", + "//vendor/github.com/google/gofuzz:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + ], +) diff --git a/pkg/certificates/BUILD.bazel b/pkg/certificates/BUILD.bazel new file mode 100644 index 000000000000..dbaacc80ccbb --- /dev/null +++ b/pkg/certificates/BUILD.bazel @@ -0,0 +1,27 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["certificates.go"], + importpath = "kubevirt.io/kubevirt/pkg/certificates", + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/client-go/util/cert:go_default_library", + "//vendor/k8s.io/client-go/util/cert/triple:go_default_library", + "//vendor/k8s.io/client-go/util/certificate:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "certificates_suite_test.go", + "certificates_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/pkg/cloud-init/BUILD.bazel b/pkg/cloud-init/BUILD.bazel new file mode 100644 index 000000000000..7d2d18d088d3 --- /dev/null +++ b/pkg/cloud-init/BUILD.bazel @@ -0,0 +1,37 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["cloud-init.go"], + importpath = "kubevirt.io/kubevirt/pkg/cloud-init", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/ephemeral-disk-utils:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/precond:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "cloud-init_test.go", + "cloudinit_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/precond:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", + ], +) diff --git a/pkg/config/BUILD.bazel b/pkg/config/BUILD.bazel new file mode 100644 index 000000000000..46bebf956532 --- /dev/null +++ b/pkg/config/BUILD.bazel @@ -0,0 +1,33 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "config.go", + "config-map.go", + "secret.go", + "service-account.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/config", + visibility = ["//visibility:public"], + deps = ["//pkg/api/v1:go_default_library"], +) + +go_test( + name = "go_default_test", + srcs = [ + "config-map_test.go", + "config_suite_test.go", + "config_test.go", + "secret_test.go", + "service-account_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + ], +) diff --git a/pkg/container-disk/BUILD.bazel b/pkg/container-disk/BUILD.bazel new file mode 100644 index 000000000000..47fc127fad69 --- /dev/null +++ b/pkg/container-disk/BUILD.bazel @@ -0,0 +1,31 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["container-disk.go"], + importpath = "kubevirt.io/kubevirt/pkg/container-disk", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/ephemeral-disk-utils:go_default_library", + "//pkg/precond:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "container-disk_suite_test.go", + "container-disk_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/pkg/controller/BUILD.bazel b/pkg/controller/BUILD.bazel new file mode 100644 index 000000000000..b883dfd994df --- /dev/null +++ b/pkg/controller/BUILD.bazel @@ -0,0 +1,72 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "conditions.go", + "controller.go", + "controller_ref.go", + "controller_ref_manager.go", + "expectations.go", + "virtinformers.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/controller", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/testutils:go_default_library", + "//vendor/github.com/openshift/api/security/v1:go_default_library", + "//vendor/k8s.io/api/apps/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/api/rbac/v1:go_default_library", + "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", + "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/util/workqueue:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/client/informers/externalversions:go_default_library", + "@com_github_golang_glog//:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "controller_ref_manager_test.go", + "controller_suite_test.go", + "expectations_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library", + ], +) diff --git a/pkg/emptydisk/BUILD.bazel b/pkg/emptydisk/BUILD.bazel new file mode 100644 index 000000000000..200c9741265c --- /dev/null +++ b/pkg/emptydisk/BUILD.bazel @@ -0,0 +1,25 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["emptydisk.go"], + importpath = "kubevirt.io/kubevirt/pkg/emptydisk", + visibility = ["//visibility:public"], + deps = ["//pkg/api/v1:go_default_library"], +) + +go_test( + name = "go_default_test", + srcs = [ + "emptydisk_suite_test.go", + "emptydisk_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + ], +) diff --git a/pkg/ephemeral-disk-utils/BUILD.bazel b/pkg/ephemeral-disk-utils/BUILD.bazel new file mode 100644 index 000000000000..582a7f294c51 --- /dev/null +++ b/pkg/ephemeral-disk-utils/BUILD.bazel @@ -0,0 +1,12 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["utils.go"], + importpath = "kubevirt.io/kubevirt/pkg/ephemeral-disk-utils", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + ], +) diff --git a/pkg/ephemeral-disk/BUILD.bazel b/pkg/ephemeral-disk/BUILD.bazel new file mode 100644 index 000000000000..6bc3c5a5cc29 --- /dev/null +++ b/pkg/ephemeral-disk/BUILD.bazel @@ -0,0 +1,28 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["ephemeral-disk.go"], + importpath = "kubevirt.io/kubevirt/pkg/ephemeral-disk", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/ephemeral-disk-utils:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "ephemeral-disk_suite_test.go", + "ephemeral-disk_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + ], +) diff --git a/pkg/healthz/BUILD.bazel b/pkg/healthz/BUILD.bazel new file mode 100644 index 000000000000..e7b8f501eb00 --- /dev/null +++ b/pkg/healthz/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["healthz.go"], + importpath = "kubevirt.io/kubevirt/pkg/healthz", + visibility = ["//visibility:public"], + deps = [ + "//pkg/kubecli:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", + ], +) diff --git a/pkg/hooks/BUILD.bazel b/pkg/hooks/BUILD.bazel new file mode 100644 index 000000000000..c67b0f64a3b5 --- /dev/null +++ b/pkg/hooks/BUILD.bazel @@ -0,0 +1,37 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "hooks.go", + "manager.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/hooks", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/hooks/info:go_default_library", + "//pkg/hooks/v1alpha1:go_default_library", + "//pkg/hooks/v1alpha2:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "@org_golang_google_grpc//:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "hooks_suite_test.go", + "hooks_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ], +) diff --git a/pkg/hooks/info/BUILD.bazel b/pkg/hooks/info/BUILD.bazel new file mode 100644 index 000000000000..10c062cbb234 --- /dev/null +++ b/pkg/hooks/info/BUILD.bazel @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") + +proto_library( + name = "kubevirt_hooks_info_proto", + srcs = ["api.proto"], + visibility = ["//visibility:public"], +) + +go_proto_library( + name = "kubevirt_hooks_info_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "kubevirt.io/kubevirt/pkg/hooks/info", + proto = ":kubevirt_hooks_info_proto", + visibility = ["//visibility:public"], +) + +go_library( + name = "go_default_library", + srcs = ["info.go"], + embed = [":kubevirt_hooks_info_go_proto"], + importpath = "kubevirt.io/kubevirt/pkg/hooks/info", + visibility = ["//visibility:public"], +) diff --git a/pkg/hooks/v1alpha1/BUILD.bazel b/pkg/hooks/v1alpha1/BUILD.bazel new file mode 100644 index 000000000000..aee0666b8347 --- /dev/null +++ b/pkg/hooks/v1alpha1/BUILD.bazel @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") + +proto_library( + name = "kubevirt_hooks_v1alpha1_proto", + srcs = ["api.proto"], + visibility = ["//visibility:public"], +) + +go_proto_library( + name = "kubevirt_hooks_v1alpha1_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "kubevirt.io/kubevirt/pkg/hooks/v1alpha1", + proto = ":kubevirt_hooks_v1alpha1_proto", + visibility = ["//visibility:public"], +) + +go_library( + name = "go_default_library", + srcs = ["v1alpha1.go"], + embed = [":kubevirt_hooks_v1alpha1_go_proto"], + importpath = "kubevirt.io/kubevirt/pkg/hooks/v1alpha1", + visibility = ["//visibility:public"], +) diff --git a/pkg/hooks/v1alpha2/BUILD.bazel b/pkg/hooks/v1alpha2/BUILD.bazel new file mode 100644 index 000000000000..427b6f4e5587 --- /dev/null +++ b/pkg/hooks/v1alpha2/BUILD.bazel @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") + +proto_library( + name = "kubevirt_hooks_v1alpha2_proto", + srcs = ["api.proto"], + visibility = ["//visibility:public"], +) + +go_proto_library( + name = "kubevirt_hooks_v1alpha2_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "kubevirt.io/kubevirt/pkg/hooks/v1alpha2", + proto = ":kubevirt_hooks_v1alpha2_proto", + visibility = ["//visibility:public"], +) + +go_library( + name = "go_default_library", + srcs = ["v1alpha2.go"], + embed = [":kubevirt_hooks_v1alpha2_go_proto"], + importpath = "kubevirt.io/kubevirt/pkg/hooks/v1alpha2", + visibility = ["//visibility:public"], +) diff --git a/pkg/host-disk/BUILD.bazel b/pkg/host-disk/BUILD.bazel new file mode 100644 index 000000000000..fad45ad6ccd1 --- /dev/null +++ b/pkg/host-disk/BUILD.bazel @@ -0,0 +1,37 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["host-disk.go"], + importpath = "kubevirt.io/kubevirt/pkg/host-disk", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/util/types:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "host-disk_test.go", + "host_disk_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", + ], +) diff --git a/pkg/inotify-informer/BUILD.bazel b/pkg/inotify-informer/BUILD.bazel new file mode 100644 index 000000000000..b04d3c880efe --- /dev/null +++ b/pkg/inotify-informer/BUILD.bazel @@ -0,0 +1,36 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["inotify.go"], + importpath = "kubevirt.io/kubevirt/pkg/inotify-informer", + visibility = ["//visibility:public"], + deps = [ + "//pkg/log:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//vendor/github.com/fsnotify/fsnotify:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "inotify_suite_test.go", + "inotify_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/controller:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/util/workqueue:go_default_library", + ], +) diff --git a/pkg/kubecli/BUILD.bazel b/pkg/kubecli/BUILD.bazel new file mode 100644 index 000000000000..a95f2eb2702d --- /dev/null +++ b/pkg/kubecli/BUILD.bazel @@ -0,0 +1,106 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "generated_mock_kubevirt.go", + "handler.go", + "kubecli.go", + "kubevirt.go", + "kubevirt_test_utils.go", + "kv.go", + "migration.go", + "replicaset.go", + "version.go", + "vm.go", + "vmi.go", + "vmpreset.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/kubecli", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/util/subresources:go_default_library", + "//pkg/version:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/gorilla/websocket:go_default_library", + "//vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/clientset/versioned:go_default_library", + "//vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/api/autoscaling/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/kubernetes:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/networking/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/client/clientset/versioned:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "kubecli_suite_test.go", + "kv_test.go", + "migration_test.go", + "replicaset_test.go", + "version_test.go", + "vm_test.go", + "vmi_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/version:go_default_library", + "//vendor/github.com/gorilla/websocket:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/github.com/onsi/gomega/ghttp:go_default_library", + "//vendor/k8s.io/api/autoscaling/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + ], +) diff --git a/pkg/log/BUILD.bazel b/pkg/log/BUILD.bazel new file mode 100644 index 000000000000..b4f62dd54036 --- /dev/null +++ b/pkg/log/BUILD.bazel @@ -0,0 +1,33 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["log.go"], + importpath = "kubevirt.io/kubevirt/pkg/log", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/go-kit/kit/log:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "@com_github_golang_glog//:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "log_suite_test.go", + "log_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ], +) diff --git a/pkg/middleware/BUILD.bazel b/pkg/middleware/BUILD.bazel new file mode 100644 index 000000000000..3772926eaaeb --- /dev/null +++ b/pkg/middleware/BUILD.bazel @@ -0,0 +1,34 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["middleware.go"], + importpath = "kubevirt.io/kubevirt/pkg/middleware", + visibility = ["//visibility:public"], + deps = [ + "//pkg/log:go_default_library", + "//pkg/precond:go_default_library", + "//vendor/github.com/go-kit/kit/endpoint:go_default_library", + "//vendor/github.com/go-kit/kit/log:go_default_library", + "//vendor/golang.org/x/net/context:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "middleware_suite_test.go", + "middleware_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/log:go_default_library", + "//pkg/precond:go_default_library", + "//vendor/github.com/go-kit/kit/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/golang.org/x/net/context:go_default_library", + ], +) diff --git a/pkg/monitoring/client/prometheus/BUILD.bazel b/pkg/monitoring/client/prometheus/BUILD.bazel new file mode 100644 index 000000000000..2942761a7eda --- /dev/null +++ b/pkg/monitoring/client/prometheus/BUILD.bazel @@ -0,0 +1,12 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["prometheus.go"], + importpath = "kubevirt.io/kubevirt/pkg/monitoring/client/prometheus", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", + "//vendor/k8s.io/client-go/tools/metrics:go_default_library", + ], +) diff --git a/pkg/monitoring/reflector/prometheus/BUILD.bazel b/pkg/monitoring/reflector/prometheus/BUILD.bazel new file mode 100644 index 000000000000..d078e30b246c --- /dev/null +++ b/pkg/monitoring/reflector/prometheus/BUILD.bazel @@ -0,0 +1,12 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["prometheus.go"], + importpath = "kubevirt.io/kubevirt/pkg/monitoring/reflector/prometheus", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) diff --git a/pkg/monitoring/workqueue/prometheus/BUILD.bazel b/pkg/monitoring/workqueue/prometheus/BUILD.bazel new file mode 100644 index 000000000000..c826d352c84e --- /dev/null +++ b/pkg/monitoring/workqueue/prometheus/BUILD.bazel @@ -0,0 +1,12 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["prometheus.go"], + importpath = "kubevirt.io/kubevirt/pkg/monitoring/workqueue/prometheus", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", + "//vendor/k8s.io/client-go/util/workqueue:go_default_library", + ], +) diff --git a/pkg/precond/BUILD.bazel b/pkg/precond/BUILD.bazel new file mode 100644 index 000000000000..0ea0af2bfaf0 --- /dev/null +++ b/pkg/precond/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["precond.go"], + importpath = "kubevirt.io/kubevirt/pkg/precond", + visibility = ["//visibility:public"], +) diff --git a/pkg/rest/BUILD.bazel b/pkg/rest/BUILD.bazel new file mode 100644 index 000000000000..c78d63ae774a --- /dev/null +++ b/pkg/rest/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["mime.go"], + importpath = "kubevirt.io/kubevirt/pkg/rest", + visibility = ["//visibility:public"], +) diff --git a/pkg/rest/endpoints/BUILD.bazel b/pkg/rest/endpoints/BUILD.bazel new file mode 100644 index 000000000000..2a81405a79f2 --- /dev/null +++ b/pkg/rest/endpoints/BUILD.bazel @@ -0,0 +1,53 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "builder.go", + "decoders.go", + "encoders.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/rest/endpoints", + visibility = ["//visibility:public"], + deps = [ + "//pkg/middleware:go_default_library", + "//pkg/precond:go_default_library", + "//pkg/rest:go_default_library", + "//vendor/github.com/asaskevich/govalidator:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + "//vendor/github.com/ghodss/yaml:go_default_library", + "//vendor/github.com/go-kit/kit/endpoint:go_default_library", + "//vendor/github.com/go-kit/kit/transport/http:go_default_library", + "//vendor/golang.org/x/net/context:go_default_library", + "//vendor/gopkg.in/ini.v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "delete_test.go", + "endpoints_suite_test.go", + "get_test.go", + "patch_test.go", + "post_test.go", + "put_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/log:go_default_library", + "//pkg/middleware:go_default_library", + "//pkg/rest:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + "//vendor/github.com/evanphx/json-patch:go_default_library", + "//vendor/github.com/ghodss/yaml:go_default_library", + "//vendor/github.com/go-kit/kit/transport/http:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/golang.org/x/net/context:go_default_library", + "//vendor/gopkg.in/ini.v1:go_default_library", + "//vendor/gopkg.in/yaml.v2:go_default_library", + ], +) diff --git a/pkg/rest/filter/BUILD.bazel b/pkg/rest/filter/BUILD.bazel new file mode 100644 index 000000000000..10dca354b515 --- /dev/null +++ b/pkg/rest/filter/BUILD.bazel @@ -0,0 +1,12 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["filter.go"], + importpath = "kubevirt.io/kubevirt/pkg/rest/filter", + visibility = ["//visibility:public"], + deps = [ + "//pkg/log:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + ], +) diff --git a/pkg/service/BUILD.bazel b/pkg/service/BUILD.bazel new file mode 100644 index 000000000000..1ed2d045d05e --- /dev/null +++ b/pkg/service/BUILD.bazel @@ -0,0 +1,9 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["service.go"], + importpath = "kubevirt.io/kubevirt/pkg/service", + visibility = ["//visibility:public"], + deps = ["//vendor/github.com/spf13/pflag:go_default_library"], +) diff --git a/pkg/staging/glog/BUILD.bazel b/pkg/staging/glog/BUILD.bazel new file mode 100644 index 000000000000..941d191c025f --- /dev/null +++ b/pkg/staging/glog/BUILD.bazel @@ -0,0 +1,9 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["glog.go"], + importpath = "kubevirt.io/kubevirt/pkg/staging/glog", + visibility = ["//visibility:public"], + deps = ["//vendor/github.com/go-kit/kit/log:go_default_library"], +) diff --git a/pkg/testutils/BUILD.bazel b/pkg/testutils/BUILD.bazel new file mode 100644 index 000000000000..18ec3115a21a --- /dev/null +++ b/pkg/testutils/BUILD.bazel @@ -0,0 +1,28 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "matchers.go", + "mock_queue.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/testutils", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/rest:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//vendor/github.com/ghodss/yaml:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/github.com/onsi/gomega/types:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/cache/testing:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/client-go/util/workqueue:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library", + ], +) diff --git a/pkg/util/BUILD.bazel b/pkg/util/BUILD.bazel new file mode 100644 index 000000000000..b7f0f4afd4f9 --- /dev/null +++ b/pkg/util/BUILD.bazel @@ -0,0 +1,11 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "hw_helper.go", + "util.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/util", + visibility = ["//visibility:public"], +) diff --git a/pkg/util/hardware/BUILD.bazel b/pkg/util/hardware/BUILD.bazel new file mode 100644 index 000000000000..ff66f5f22e56 --- /dev/null +++ b/pkg/util/hardware/BUILD.bazel @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["hw_utils.go"], + importpath = "kubevirt.io/kubevirt/pkg/util/hardware", + visibility = ["//visibility:public"], + deps = ["//pkg/api/v1:go_default_library"], +) + +go_test( + name = "go_default_test", + srcs = [ + "hw_utils_suite_test.go", + "hw_utils_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/pkg/util/net/dns/BUILD.bazel b/pkg/util/net/dns/BUILD.bazel new file mode 100644 index 000000000000..331dca7209ac --- /dev/null +++ b/pkg/util/net/dns/BUILD.bazel @@ -0,0 +1,28 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "resolveconf.go", + "sanitize.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/util/net/dns", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "dns_suite_test.go", + "resolveconf_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/pkg/util/openapi/BUILD.bazel b/pkg/util/openapi/BUILD.bazel new file mode 100644 index 000000000000..4819448466fc --- /dev/null +++ b/pkg/util/openapi/BUILD.bazel @@ -0,0 +1,18 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["openapi.go"], + importpath = "kubevirt.io/kubevirt/pkg/util/openapi", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/emicklei/go-restful:go_default_library", + "//vendor/github.com/emicklei/go-restful-openapi:go_default_library", + "//vendor/github.com/go-openapi/errors:go_default_library", + "//vendor/github.com/go-openapi/spec:go_default_library", + "//vendor/github.com/go-openapi/strfmt:go_default_library", + "//vendor/github.com/go-openapi/validate:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "@com_github_golang_glog//:go_default_library", + ], +) diff --git a/pkg/util/subresources/BUILD.bazel b/pkg/util/subresources/BUILD.bazel new file mode 100644 index 000000000000..98f45e25e0f7 --- /dev/null +++ b/pkg/util/subresources/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["constants.go"], + importpath = "kubevirt.io/kubevirt/pkg/util/subresources", + visibility = ["//visibility:public"], +) diff --git a/pkg/util/types/BUILD.bazel b/pkg/util/types/BUILD.bazel new file mode 100644 index 000000000000..ebb48c4b5316 --- /dev/null +++ b/pkg/util/types/BUILD.bazel @@ -0,0 +1,35 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["pvc.go"], + importpath = "kubevirt.io/kubevirt/pkg/util/types", + visibility = ["//visibility:public"], + deps = [ + "//pkg/kubecli:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "pvc_test.go", + "types_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) diff --git a/pkg/version/BUILD.bazel b/pkg/version/BUILD.bazel new file mode 100644 index 000000000000..101285560f43 --- /dev/null +++ b/pkg/version/BUILD.bazel @@ -0,0 +1,12 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "base.go", + "types.go", + "version.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/version", + visibility = ["//visibility:public"], +) diff --git a/pkg/virt-api/BUILD.bazel b/pkg/virt-api/BUILD.bazel new file mode 100644 index 000000000000..e555c0c3a661 --- /dev/null +++ b/pkg/virt-api/BUILD.bazel @@ -0,0 +1,71 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "api.go", + "filesystem.go", + "generated_mock_filesystem.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-api", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/healthz:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/rest/filter:go_default_library", + "//pkg/service:go_default_library", + "//pkg/util:go_default_library", + "//pkg/util/openapi:go_default_library", + "//pkg/version:go_default_library", + "//pkg/virt-api/rest:go_default_library", + "//pkg/virt-api/webhooks:go_default_library", + "//pkg/virt-api/webhooks/mutating-webhook:go_default_library", + "//pkg/virt-api/webhooks/validating-webhook:go_default_library", + "//pkg/virt-config:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + "//vendor/github.com/emicklei/go-restful-openapi:go_default_library", + "//vendor/github.com/go-openapi/spec:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/prometheus/client_golang/prometheus/promhttp:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/util/cert:go_default_library", + "//vendor/k8s.io/client-go/util/cert/triple:go_default_library", + "//vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1:go_default_library", + "//vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "api_test.go", + "virt-api_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-api/rest:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/github.com/onsi/gomega/ghttp:go_default_library", + "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", + "//vendor/k8s.io/client-go/util/cert:go_default_library", + "//vendor/k8s.io/client-go/util/cert/triple:go_default_library", + "//vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset:go_default_library", + ], +) diff --git a/pkg/virt-api/rest/BUILD.bazel b/pkg/virt-api/rest/BUILD.bazel new file mode 100644 index 000000000000..5c529417eac2 --- /dev/null +++ b/pkg/virt-api/rest/BUILD.bazel @@ -0,0 +1,65 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "authorizer.go", + "definitions.go", + "generated_mock_authorizer.go", + "subresource.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-api/rest", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/rest:go_default_library", + "//pkg/util/subresources:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/gorilla/websocket:go_default_library", + "//vendor/k8s.io/api/authorization/v1beta1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/remotecommand:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "authorizer_test.go", + "rest_suite_test.go", + "subresource_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-controller/services:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + "//vendor/github.com/gorilla/websocket:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/github.com/onsi/gomega/ghttp:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", + ], +) diff --git a/pkg/virt-api/webhooks/BUILD.bazel b/pkg/virt-api/webhooks/BUILD.bazel new file mode 100644 index 000000000000..be1505effaec --- /dev/null +++ b/pkg/virt-api/webhooks/BUILD.bazel @@ -0,0 +1,22 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["utils.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-api/webhooks", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/util:go_default_library", + "//pkg/util/openapi:go_default_library", + "//pkg/virt-api/rest:go_default_library", + "//vendor/k8s.io/api/admission/v1beta1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "@com_github_golang_glog//:go_default_library", + ], +) diff --git a/pkg/virt-api/webhooks/mutating-webhook/BUILD.bazel b/pkg/virt-api/webhooks/mutating-webhook/BUILD.bazel new file mode 100644 index 000000000000..c4538a19649e --- /dev/null +++ b/pkg/virt-api/webhooks/mutating-webhook/BUILD.bazel @@ -0,0 +1,51 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "mutating-webhook.go", + "namespace-limits.go", + "preset.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-api/webhooks/mutating-webhook", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-api/webhooks:go_default_library", + "//vendor/k8s.io/api/admission/v1beta1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "mutating-webhook_suite_test.go", + "mutating-webhook_test.go", + "namespace-limits_test.go", + "preset_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/testutils:go_default_library", + "//pkg/virt-api/webhooks:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/admission/v1beta1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) diff --git a/pkg/virt-api/webhooks/validating-webhook/BUILD.bazel b/pkg/virt-api/webhooks/validating-webhook/BUILD.bazel new file mode 100644 index 000000000000..9ee892fbe806 --- /dev/null +++ b/pkg/virt-api/webhooks/validating-webhook/BUILD.bazel @@ -0,0 +1,53 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["validating-webhook.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-api/webhooks/validating-webhook", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/util:go_default_library", + "//pkg/util/hardware:go_default_library", + "//pkg/virt-api/webhooks:go_default_library", + "//pkg/virt-config:go_default_library", + "//vendor/k8s.io/api/admission/v1beta1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "validating-webhook_suite_test.go", + "validating-webhook_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/testutils:go_default_library", + "//pkg/virt-api/webhooks:go_default_library", + "//pkg/virt-config:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/admission/v1beta1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library", + ], +) diff --git a/pkg/virt-config/BUILD.bazel b/pkg/virt-config/BUILD.bazel new file mode 100644 index 000000000000..5837322f7744 --- /dev/null +++ b/pkg/virt-config/BUILD.bazel @@ -0,0 +1,21 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "config-map.go", + "feature-gates.go", + "virt-properties.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-config", + visibility = ["//visibility:public"], + deps = [ + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/util:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + ], +) diff --git a/pkg/virt-controller/leaderelectionconfig/BUILD.bazel b/pkg/virt-controller/leaderelectionconfig/BUILD.bazel new file mode 100644 index 000000000000..90db266aac68 --- /dev/null +++ b/pkg/virt-controller/leaderelectionconfig/BUILD.bazel @@ -0,0 +1,16 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "config.go", + "types.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-controller/leaderelectionconfig", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", + ], +) diff --git a/pkg/virt-controller/rest/BUILD.bazel b/pkg/virt-controller/rest/BUILD.bazel new file mode 100644 index 000000000000..d00317d0313f --- /dev/null +++ b/pkg/virt-controller/rest/BUILD.bazel @@ -0,0 +1,12 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["rest.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-controller/rest", + visibility = ["//visibility:public"], + deps = [ + "//pkg/healthz:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + ], +) diff --git a/pkg/virt-controller/services/BUILD.bazel b/pkg/virt-controller/services/BUILD.bazel new file mode 100644 index 000000000000..99d93936269c --- /dev/null +++ b/pkg/virt-controller/services/BUILD.bazel @@ -0,0 +1,55 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["template.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-controller/services", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/config:go_default_library", + "//pkg/container-disk:go_default_library", + "//pkg/hooks:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/precond:go_default_library", + "//pkg/util:go_default_library", + "//pkg/util/hardware:go_default_library", + "//pkg/util/net/dns:go_default_library", + "//pkg/util/types:go_default_library", + "//pkg/virt-config:go_default_library", + "//vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "services_suite_test.go", + "template_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/hooks:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-config:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1:go_default_library", + "//vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/clientset/versioned/fake:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) diff --git a/pkg/virt-controller/watch/BUILD.bazel b/pkg/virt-controller/watch/BUILD.bazel new file mode 100644 index 000000000000..6ac5d5061bac --- /dev/null +++ b/pkg/virt-controller/watch/BUILD.bazel @@ -0,0 +1,92 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "application.go", + "migration.go", + "node.go", + "replicaset.go", + "vm.go", + "vmi.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-controller/watch", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/certificates:go_default_library", + "//pkg/container-disk:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/service:go_default_library", + "//pkg/util:go_default_library", + "//pkg/virt-config:go_default_library", + "//pkg/virt-controller/leaderelectionconfig:go_default_library", + "//pkg/virt-controller/rest:go_default_library", + "//pkg/virt-controller/services:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + "//vendor/github.com/pborman/uuid:go_default_library", + "//vendor/github.com/prometheus/client_golang/prometheus/promhttp:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/leaderelection:go_default_library", + "//vendor/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/client-go/util/workqueue:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library", + "@com_github_golang_glog//:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "application_test.go", + "migration_test.go", + "node_test.go", + "replicaset_test.go", + "vm_test.go", + "vmi_test.go", + "watch_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/rest:go_default_library", + "//pkg/testutils:go_default_library", + "//pkg/virt-controller/services:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/clientset/versioned/fake:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/github.com/pborman/uuid:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/cache/testing:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/client/clientset/versioned/fake:go_default_library", + ], +) diff --git a/pkg/virt-handler/BUILD.bazel b/pkg/virt-handler/BUILD.bazel new file mode 100644 index 000000000000..4ded462810d1 --- /dev/null +++ b/pkg/virt-handler/BUILD.bazel @@ -0,0 +1,67 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["vm.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-handler", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/cloud-init:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/host-disk:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/precond:go_default_library", + "//pkg/util/types:go_default_library", + "//pkg/virt-config:go_default_library", + "//pkg/virt-handler/cmd-client:go_default_library", + "//pkg/virt-handler/device-manager:go_default_library", + "//pkg/virt-handler/isolation:go_default_library", + "//pkg/virt-handler/migration-proxy:go_default_library", + "//pkg/virt-launcher:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/watchdog:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/client-go/util/workqueue:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "virt_handler_suite_test.go", + "vm_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/precond:go_default_library", + "//pkg/testutils:go_default_library", + "//pkg/virt-handler/cmd-client:go_default_library", + "//pkg/virt-launcher:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/watchdog:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/cache/testing:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + ], +) diff --git a/pkg/virt-handler/cache/BUILD.bazel b/pkg/virt-handler/cache/BUILD.bazel new file mode 100644 index 000000000000..43126fe5f3fa --- /dev/null +++ b/pkg/virt-handler/cache/BUILD.bazel @@ -0,0 +1,43 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["cache.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-handler/cache", + visibility = ["//visibility:public"], + deps = [ + "//pkg/log:go_default_library", + "//pkg/virt-handler/cmd-client:go_default_library", + "//pkg/virt-handler/notify-server:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/watchdog:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "cache_suite_test.go", + "cache_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/log:go_default_library", + "//pkg/virt-handler/cmd-client:go_default_library", + "//pkg/virt-launcher/notify-client:go_default_library", + "//pkg/virt-launcher/virtwrap:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/virt-launcher/virtwrap/cmd-server:go_default_library", + "//pkg/watchdog:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) diff --git a/pkg/virt-handler/cmd-client/BUILD.bazel b/pkg/virt-handler/cmd-client/BUILD.bazel new file mode 100644 index 000000000000..3efc5a6e8739 --- /dev/null +++ b/pkg/virt-handler/cmd-client/BUILD.bazel @@ -0,0 +1,17 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "client.go", + "generated_mock_client.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-handler/cmd-client", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/ephemeral-disk-utils:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + ], +) diff --git a/pkg/virt-handler/device-manager/BUILD.bazel b/pkg/virt-handler/device-manager/BUILD.bazel new file mode 100644 index 000000000000..ea4093739d73 --- /dev/null +++ b/pkg/virt-handler/device-manager/BUILD.bazel @@ -0,0 +1,36 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +# gazelle:ignore + +go_library( + name = "go_default_library", + srcs = [ + "device_controller.go", + "generic_device.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-handler/device-manager", + visibility = ["//visibility:public"], + deps = [ + "//pkg/log:go_default_library", + "//pkg/virt-handler/device-manager/deviceplugin/v1beta1:go_default_library", + "//vendor/github.com/fsnotify/fsnotify:go_default_library", + "//vendor/golang.org/x/net/context:go_default_library", + "//vendor/google.golang.org/grpc:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "device_controller_test.go", + "device_manager_suite_test.go", + "generic_device_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/log:go_default_library", + "//pkg/virt-handler/device-manager/deviceplugin/v1beta1:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/pkg/virt-handler/device-manager/deviceplugin/v1beta1/BUILD.bazel b/pkg/virt-handler/device-manager/deviceplugin/v1beta1/BUILD.bazel new file mode 100644 index 000000000000..39aea4c5de35 --- /dev/null +++ b/pkg/virt-handler/device-manager/deviceplugin/v1beta1/BUILD.bazel @@ -0,0 +1,21 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") + +# gazelle:ignore + +go_library( + name = "go_default_library", + srcs = [ + "api.pb.go", + "constants.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-handler/device-manager/deviceplugin/v1beta1", + deps = [ + "//vendor/github.com/gogo/protobuf/gogoproto:go_default_library", + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", + "//vendor/golang.org/x/net/context:go_default_library", + "//vendor/google.golang.org/grpc:go_default_library", + ], + visibility = ["//visibility:public"], +) diff --git a/pkg/virt-handler/isolation/BUILD.bazel b/pkg/virt-handler/isolation/BUILD.bazel new file mode 100644 index 000000000000..60523e384e07 --- /dev/null +++ b/pkg/virt-handler/isolation/BUILD.bazel @@ -0,0 +1,33 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "generated_mock_isolation.go", + "isolation.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-handler/isolation", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-handler/cmd-client:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "isolation_suite_test.go", + "isolation_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-handler/cmd-client:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/pkg/virt-handler/migration-proxy/BUILD.bazel b/pkg/virt-handler/migration-proxy/BUILD.bazel new file mode 100644 index 000000000000..1266664c4556 --- /dev/null +++ b/pkg/virt-handler/migration-proxy/BUILD.bazel @@ -0,0 +1,23 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["migration-proxy.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-handler/migration-proxy", + visibility = ["//visibility:public"], + deps = ["//pkg/log:go_default_library"], +) + +go_test( + name = "go_default_test", + srcs = [ + "migration-proxy_test.go", + "migration_proxy_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/pkg/virt-handler/notify-server/BUILD.bazel b/pkg/virt-handler/notify-server/BUILD.bazel new file mode 100644 index 000000000000..469fe227b998 --- /dev/null +++ b/pkg/virt-handler/notify-server/BUILD.bazel @@ -0,0 +1,18 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["server.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-handler/notify-server", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + ], +) diff --git a/pkg/virt-launcher/BUILD.bazel b/pkg/virt-launcher/BUILD.bazel new file mode 100644 index 000000000000..ecca837d8f34 --- /dev/null +++ b/pkg/virt-launcher/BUILD.bazel @@ -0,0 +1,30 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["monitor.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-launcher", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/ephemeral-disk-utils:go_default_library", + "//pkg/log:go_default_library", + "//pkg/precond:go_default_library", + "//pkg/virt-handler/cmd-client:go_default_library", + "//pkg/watchdog:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "monitor_test.go", + "virt_launcher_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/pkg/virt-launcher/notify-client/BUILD.bazel b/pkg/virt-launcher/notify-client/BUILD.bazel new file mode 100644 index 000000000000..99f95abfdd36 --- /dev/null +++ b/pkg/virt-launcher/notify-client/BUILD.bazel @@ -0,0 +1,50 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["client.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-launcher/notify-client", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-handler/notify-server:go_default_library", + "//pkg/virt-launcher/virtwrap/agent-poller:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/virt-launcher/virtwrap/cli:go_default_library", + "//pkg/virt-launcher/virtwrap/errors:go_default_library", + "//pkg/virt-launcher/virtwrap/util:go_default_library", + "//vendor/github.com/libvirt/libvirt-go:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/tools/reference:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "client_suite_test.go", + "notify_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/testutils:go_default_library", + "//pkg/virt-handler/notify-server:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/virt-launcher/virtwrap/cli:go_default_library", + "//pkg/virt-launcher/virtwrap/util:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/libvirt/libvirt-go:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + ], +) diff --git a/pkg/virt-launcher/virtwrap/BUILD.bazel b/pkg/virt-launcher/virtwrap/BUILD.bazel new file mode 100644 index 000000000000..e2f86c2f0006 --- /dev/null +++ b/pkg/virt-launcher/virtwrap/BUILD.bazel @@ -0,0 +1,59 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "generated_mock_manager.go", + "manager.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/cloud-init:go_default_library", + "//pkg/config:go_default_library", + "//pkg/container-disk:go_default_library", + "//pkg/emptydisk:go_default_library", + "//pkg/ephemeral-disk:go_default_library", + "//pkg/hooks:go_default_library", + "//pkg/host-disk:go_default_library", + "//pkg/log:go_default_library", + "//pkg/util/net/dns:go_default_library", + "//pkg/virt-handler/migration-proxy:go_default_library", + "//pkg/virt-launcher/notify-client:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/virt-launcher/virtwrap/cli:go_default_library", + "//pkg/virt-launcher/virtwrap/errors:go_default_library", + "//pkg/virt-launcher/virtwrap/network:go_default_library", + "//pkg/virt-launcher/virtwrap/util:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/libvirt/libvirt-go:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "manager_test.go", + "virtwrap_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/cloud-init:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/virt-launcher/virtwrap/cli:go_default_library", + "//pkg/virt-launcher/virtwrap/network:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/libvirt/libvirt-go:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ], +) diff --git a/pkg/virt-launcher/virtwrap/agent-poller/BUILD.bazel b/pkg/virt-launcher/virtwrap/agent-poller/BUILD.bazel new file mode 100644 index 000000000000..39c1f57bd5cc --- /dev/null +++ b/pkg/virt-launcher/virtwrap/agent-poller/BUILD.bazel @@ -0,0 +1,28 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["agent_poller.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap/agent-poller", + visibility = ["//visibility:public"], + deps = [ + "//pkg/log:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/virt-launcher/virtwrap/cli:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "agent_poller_suite_test.go", + "agent_poller_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/pkg/virt-launcher/virtwrap/api/BUILD.bazel b/pkg/virt-launcher/virtwrap/api/BUILD.bazel new file mode 100644 index 000000000000..835a350eb32b --- /dev/null +++ b/pkg/virt-launcher/virtwrap/api/BUILD.bazel @@ -0,0 +1,57 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "converter.go", + "deepcopy_generated.go", + "defaults.go", + "doc.go", + "schema.go", + "zz_generated.defaults.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap/api", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/cloud-init:go_default_library", + "//pkg/config:go_default_library", + "//pkg/container-disk:go_default_library", + "//pkg/emptydisk:go_default_library", + "//pkg/ephemeral-disk:go_default_library", + "//pkg/log:go_default_library", + "//pkg/precond:go_default_library", + "//pkg/util:go_default_library", + "//pkg/util/net/dns:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "api_suite_test.go", + "converter_test.go", + "deepcopy_test.go", + "defaults_test.go", + "schema_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/google/gofuzz:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ], +) diff --git a/pkg/virt-launcher/virtwrap/cli/BUILD.bazel b/pkg/virt-launcher/virtwrap/cli/BUILD.bazel new file mode 100644 index 000000000000..3c97db63d1ce --- /dev/null +++ b/pkg/virt-launcher/virtwrap/cli/BUILD.bazel @@ -0,0 +1,32 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "generated_mock_libvirt.go", + "libvirt.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap/cli", + visibility = ["//visibility:public"], + deps = [ + "//pkg/log:go_default_library", + "//pkg/virt-launcher/virtwrap/errors:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/libvirt/libvirt-go:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "cli_suite_test.go", + "libvirt_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/pkg/virt-launcher/virtwrap/cmd-server/BUILD.bazel b/pkg/virt-launcher/virtwrap/cmd-server/BUILD.bazel new file mode 100644 index 000000000000..954a711d85a0 --- /dev/null +++ b/pkg/virt-launcher/virtwrap/cmd-server/BUILD.bazel @@ -0,0 +1,34 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["server.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap/cmd-server", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-handler/cmd-client:go_default_library", + "//pkg/virt-launcher/virtwrap:go_default_library", + "//pkg/virt-launcher/virtwrap/errors:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "cmd_server_suite_test.go", + "server_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-handler/cmd-client:go_default_library", + "//pkg/virt-launcher/virtwrap:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/pkg/virt-launcher/virtwrap/errors/BUILD.bazel b/pkg/virt-launcher/virtwrap/errors/BUILD.bazel new file mode 100644 index 000000000000..64bab21cac0a --- /dev/null +++ b/pkg/virt-launcher/virtwrap/errors/BUILD.bazel @@ -0,0 +1,9 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["errors.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap/errors", + visibility = ["//visibility:public"], + deps = ["//vendor/github.com/libvirt/libvirt-go:go_default_library"], +) diff --git a/pkg/virt-launcher/virtwrap/network/BUILD.bazel b/pkg/virt-launcher/virtwrap/network/BUILD.bazel new file mode 100644 index 000000000000..efdd528b1629 --- /dev/null +++ b/pkg/virt-launcher/virtwrap/network/BUILD.bazel @@ -0,0 +1,47 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "common.go", + "generated_mock_common.go", + "generated_mock_network.go", + "generated_mock_podinterface.go", + "network.go", + "podinterface.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap/network", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/precond:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/virt-launcher/virtwrap/network/dhcp:go_default_library", + "//vendor/github.com/coreos/go-iptables/iptables:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/subgraph/libmacouflage:go_default_library", + "//vendor/github.com/vishvananda/netlink:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "common_test.go", + "network_suite_test.go", + "network_test.go", + "podinterface_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/github.com/vishvananda/netlink:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ], +) diff --git a/pkg/virt-launcher/virtwrap/network/dhcp/BUILD.bazel b/pkg/virt-launcher/virtwrap/network/dhcp/BUILD.bazel new file mode 100644 index 000000000000..36e2003a50a1 --- /dev/null +++ b/pkg/virt-launcher/virtwrap/network/dhcp/BUILD.bazel @@ -0,0 +1,35 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "dhcp.go", + "ethtool.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap/network/dhcp", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/krolaw/dhcp4:go_default_library", + "//vendor/github.com/krolaw/dhcp4/conn:go_default_library", + "//vendor/github.com/vishvananda/netlink:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "dhcp_suite_test.go", + "dhcp_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/krolaw/dhcp4:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/github.com/vishvananda/netlink:go_default_library", + ], +) diff --git a/pkg/virt-launcher/virtwrap/util/BUILD.bazel b/pkg/virt-launcher/virtwrap/util/BUILD.bazel new file mode 100644 index 000000000000..dd069dd32b28 --- /dev/null +++ b/pkg/virt-launcher/virtwrap/util/BUILD.bazel @@ -0,0 +1,36 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "cpu_utils.go", + "libvirt_helper.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap/util", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/util/hardware:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/virt-launcher/virtwrap/cli:go_default_library", + "//vendor/github.com/libvirt/libvirt-go:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "libvirt_helper_test.go", + "util_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/log:go_default_library", + "//vendor/github.com/go-kit/kit/log:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/pkg/virt-operator/BUILD.bazel b/pkg/virt-operator/BUILD.bazel new file mode 100644 index 000000000000..93f488bd3c65 --- /dev/null +++ b/pkg/virt-operator/BUILD.bazel @@ -0,0 +1,69 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "application.go", + "kubevirt.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-operator", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/certificates:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/service:go_default_library", + "//pkg/util:go_default_library", + "//pkg/virt-operator/creation:go_default_library", + "//pkg/virt-operator/deletion:go_default_library", + "//pkg/virt-operator/util:go_default_library", + "//vendor/github.com/prometheus/client_golang/prometheus/promhttp:go_default_library", + "//vendor/k8s.io/api/apps/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/client-go/util/workqueue:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "kubevirt_test.go", + "virt_operator_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/testutils:go_default_library", + "//pkg/virt-operator/creation/components:go_default_library", + "//pkg/virt-operator/creation/rbac:go_default_library", + "//pkg/virt-operator/util:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/github.com/openshift/api/security/v1:go_default_library", + "//vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/fake:go_default_library", + "//vendor/k8s.io/api/apps/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/api/rbac/v1:go_default_library", + "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", + "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/cache/testing:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + ], +) diff --git a/pkg/virt-operator/creation/BUILD.bazel b/pkg/virt-operator/creation/BUILD.bazel new file mode 100644 index 000000000000..2c24a71096df --- /dev/null +++ b/pkg/virt-operator/creation/BUILD.bazel @@ -0,0 +1,16 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["all.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-operator/creation", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-operator/creation/components:go_default_library", + "//pkg/virt-operator/creation/rbac:go_default_library", + "//pkg/virt-operator/util:go_default_library", + ], +) diff --git a/pkg/virt-operator/creation/components/BUILD.bazel b/pkg/virt-operator/creation/components/BUILD.bazel new file mode 100644 index 000000000000..bf8997c3ec1a --- /dev/null +++ b/pkg/virt-operator/creation/components/BUILD.bazel @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "crds.go", + "deployments.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-operator/creation/components", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-operator/util:go_default_library", + "//vendor/k8s.io/api/apps/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", + ], +) diff --git a/pkg/virt-operator/creation/rbac/BUILD.bazel b/pkg/virt-operator/creation/rbac/BUILD.bazel new file mode 100644 index 000000000000..0a6ae8e6fbfe --- /dev/null +++ b/pkg/virt-operator/creation/rbac/BUILD.bazel @@ -0,0 +1,22 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "apiserver.go", + "cluster.go", + "controller.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-operator/creation/rbac", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-operator/util:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/api/rbac/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ], +) diff --git a/pkg/virt-operator/deletion/BUILD.bazel b/pkg/virt-operator/deletion/BUILD.bazel new file mode 100644 index 000000000000..32678d121bb2 --- /dev/null +++ b/pkg/virt-operator/deletion/BUILD.bazel @@ -0,0 +1,20 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["all.go"], + importpath = "kubevirt.io/kubevirt/pkg/virt-operator/deletion", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virt-operator/util:go_default_library", + "//vendor/k8s.io/api/apps/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/api/rbac/v1:go_default_library", + "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ], +) diff --git a/pkg/virt-operator/util/BUILD.bazel b/pkg/virt-operator/util/BUILD.bazel new file mode 100644 index 000000000000..59d51ecabe9b --- /dev/null +++ b/pkg/virt-operator/util/BUILD.bazel @@ -0,0 +1,46 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "client.go", + "config.go", + "types.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virt-operator/util", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/version:go_default_library", + "//vendor/github.com/openshift/api/security/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "client_test.go", + "config_test.go", + "util_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/github.com/openshift/api/security/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/client-go/discovery/fake:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", + ], +) diff --git a/pkg/virtctl/BUILD.bazel b/pkg/virtctl/BUILD.bazel new file mode 100644 index 000000000000..747eb6797e7d --- /dev/null +++ b/pkg/virtctl/BUILD.bazel @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "log.go", + "root.go", + ], + importpath = "kubevirt.io/kubevirt/pkg/virtctl", + visibility = ["//visibility:public"], + deps = [ + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/virtctl/console:go_default_library", + "//pkg/virtctl/expose:go_default_library", + "//pkg/virtctl/imageupload:go_default_library", + "//pkg/virtctl/templates:go_default_library", + "//pkg/virtctl/version:go_default_library", + "//pkg/virtctl/vm:go_default_library", + "//pkg/virtctl/vnc:go_default_library", + "//vendor/github.com/spf13/cobra:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + ], +) diff --git a/pkg/virtctl/console/BUILD.bazel b/pkg/virtctl/console/BUILD.bazel new file mode 100644 index 000000000000..a9780d5b4633 --- /dev/null +++ b/pkg/virtctl/console/BUILD.bazel @@ -0,0 +1,15 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["console.go"], + importpath = "kubevirt.io/kubevirt/pkg/virtctl/console", + visibility = ["//visibility:public"], + deps = [ + "//pkg/kubecli:go_default_library", + "//pkg/virtctl/templates:go_default_library", + "//vendor/github.com/spf13/cobra:go_default_library", + "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", + ], +) diff --git a/pkg/virtctl/expose/BUILD.bazel b/pkg/virtctl/expose/BUILD.bazel new file mode 100644 index 000000000000..5d81147a9ed9 --- /dev/null +++ b/pkg/virtctl/expose/BUILD.bazel @@ -0,0 +1,41 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["expose.go"], + importpath = "kubevirt.io/kubevirt/pkg/virtctl/expose", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/virtctl/templates:go_default_library", + "//vendor/github.com/spf13/cobra:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "expose_suite_test.go", + "expose_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//tests:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + ], +) diff --git a/pkg/virtctl/imageupload/BUILD.bazel b/pkg/virtctl/imageupload/BUILD.bazel new file mode 100644 index 000000000000..af843b4a0d9d --- /dev/null +++ b/pkg/virtctl/imageupload/BUILD.bazel @@ -0,0 +1,47 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["imageupload.go"], + importpath = "kubevirt.io/kubevirt/pkg/virtctl/imageupload", + visibility = ["//visibility:public"], + deps = [ + "//pkg/kubecli:go_default_library", + "//pkg/virtctl/templates:go_default_library", + "//vendor/github.com/spf13/cobra:go_default_library", + "//vendor/gopkg.in/cheggaaa/pb.v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/client-go/kubernetes:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/upload/v1alpha1:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/client/clientset/versioned:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "imageupload_suite_test.go", + "imageupload_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/kubecli:go_default_library", + "//tests:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/client/clientset/versioned/fake:go_default_library", + ], +) diff --git a/pkg/virtctl/templates/BUILD.bazel b/pkg/virtctl/templates/BUILD.bazel new file mode 100644 index 000000000000..7a5dcdf79a29 --- /dev/null +++ b/pkg/virtctl/templates/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["templates.go"], + importpath = "kubevirt.io/kubevirt/pkg/virtctl/templates", + visibility = ["//visibility:public"], +) diff --git a/pkg/virtctl/version/BUILD.bazel b/pkg/virtctl/version/BUILD.bazel new file mode 100644 index 000000000000..1b5e078e6a56 --- /dev/null +++ b/pkg/virtctl/version/BUILD.bazel @@ -0,0 +1,15 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["version.go"], + importpath = "kubevirt.io/kubevirt/pkg/virtctl/version", + visibility = ["//visibility:public"], + deps = [ + "//pkg/kubecli:go_default_library", + "//pkg/version:go_default_library", + "//pkg/virtctl/templates:go_default_library", + "//vendor/github.com/spf13/cobra:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", + ], +) diff --git a/pkg/virtctl/vm/BUILD.bazel b/pkg/virtctl/vm/BUILD.bazel new file mode 100644 index 000000000000..c2c2629b2174 --- /dev/null +++ b/pkg/virtctl/vm/BUILD.bazel @@ -0,0 +1,34 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["vm.go"], + importpath = "kubevirt.io/kubevirt/pkg/virtctl/vm", + visibility = ["//visibility:public"], + deps = [ + "//pkg/kubecli:go_default_library", + "//pkg/virtctl/templates:go_default_library", + "//vendor/github.com/spf13/cobra:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "vm_suite_test.go", + "vm_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//tests:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ], +) diff --git a/pkg/virtctl/vnc/BUILD.bazel b/pkg/virtctl/vnc/BUILD.bazel new file mode 100644 index 000000000000..1fcb1703e865 --- /dev/null +++ b/pkg/virtctl/vnc/BUILD.bazel @@ -0,0 +1,15 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["vnc.go"], + importpath = "kubevirt.io/kubevirt/pkg/virtctl/vnc", + visibility = ["//visibility:public"], + deps = [ + "//pkg/kubecli:go_default_library", + "//pkg/virtctl/templates:go_default_library", + "//vendor/github.com/spf13/cobra:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", + "@com_github_golang_glog//:go_default_library", + ], +) diff --git a/pkg/watchdog/BUILD.bazel b/pkg/watchdog/BUILD.bazel new file mode 100644 index 000000000000..efb7003dbee6 --- /dev/null +++ b/pkg/watchdog/BUILD.bazel @@ -0,0 +1,31 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["watchdog.go"], + importpath = "kubevirt.io/kubevirt/pkg/watchdog", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/ephemeral-disk-utils:go_default_library", + "//pkg/log:go_default_library", + "//pkg/precond:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "watchdog_suite_test.go", + "watchdog_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/log:go_default_library", + "//pkg/precond:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel new file mode 100644 index 000000000000..68f37bafaa4c --- /dev/null +++ b/tests/BUILD.bazel @@ -0,0 +1,131 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "test.go", + "utils.go", + ], + importpath = "kubevirt.io/kubevirt/tests", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/util/net/dns:go_default_library", + "//pkg/virt-config:go_default_library", + "//pkg/virt-controller/services:go_default_library", + "//pkg/virtctl:go_default_library", + "//tools/vms-generator/utils:go_default_library", + "//vendor/github.com/ghodss/yaml:go_default_library", + "//vendor/github.com/google/goexpect:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/github.com/spf13/cobra:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", + "//vendor/k8s.io/api/rbac/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/yaml:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/client-go/tools/remotecommand:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "access_test.go", + "config_test.go", + "console_test.go", + "datavolume_test.go", + "expose_test.go", + "imageupload_test.go", + "infra_test.go", + "migration_test.go", + "networkpolicy_test.go", + "probes_test.go", + "registry_disk_test.go", + "replicaset_test.go", + "stability_test.go", + "storage_test.go", + "subresource_api_test.go", + "template_test.go", + "tests_suite_test.go", + "version_test.go", + "vm_test.go", + "vmi_cloudinit_hook_sidecar_test.go", + "vmi_cloudinit_test.go", + "vmi_configuration_test.go", + "vmi_genie_test.go", + "vmi_hook_sidecar_test.go", + "vmi_iothreads_test.go", + "vmi_lifecycle_test.go", + "vmi_monitoring_test.go", + "vmi_multus_test.go", + "vmi_networking_test.go", + "vmi_slirp_interface_test.go", + "vmidefaults_test.go", + "vmipreset_test.go", + "vnc_test.go", + "windows_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/config:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/host-disk:go_default_library", + "//pkg/kubecli:go_default_library", + "//pkg/log:go_default_library", + "//pkg/testutils:go_default_library", + "//pkg/util/hardware:go_default_library", + "//pkg/util/net/dns:go_default_library", + "//pkg/util/subresources:go_default_library", + "//pkg/virt-config:go_default_library", + "//pkg/virt-controller/leaderelectionconfig:go_default_library", + "//pkg/virt-controller/services:go_default_library", + "//pkg/virt-controller/watch:go_default_library", + "//pkg/virt-launcher/virtwrap/api:go_default_library", + "//pkg/virtctl/expose:go_default_library", + "//pkg/virtctl/vm:go_default_library", + "//tools/vms-generator/utils:go_default_library", + "//vendor/github.com/google/goexpect:go_default_library", + "//vendor/github.com/gorilla/websocket:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/github.com/onsi/gomega/gstruct:go_default_library", + "//vendor/github.com/pborman/uuid:go_default_library", + "//vendor/k8s.io/api/autoscaling/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/api/networking/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", + "//vendor/kubevirt.io/qe-tools/pkg/ginkgo-reporters:go_default_library", + ], +) diff --git a/tools/manifest-templator/BUILD.bazel b/tools/manifest-templator/BUILD.bazel new file mode 100644 index 000000000000..ac2fad63ecd0 --- /dev/null +++ b/tools/manifest-templator/BUILD.bazel @@ -0,0 +1,15 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["manifest-templator.go"], + importpath = "kubevirt.io/kubevirt/tools/manifest-templator", + visibility = ["//visibility:private"], + deps = ["//vendor/github.com/spf13/pflag:go_default_library"], +) + +go_binary( + name = "manifest-templator", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) diff --git a/tools/openapispec/BUILD.bazel b/tools/openapispec/BUILD.bazel new file mode 100644 index 000000000000..36d4130d0449 --- /dev/null +++ b/tools/openapispec/BUILD.bazel @@ -0,0 +1,22 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["openapispec.go"], + importpath = "kubevirt.io/kubevirt/tools/openapispec", + visibility = ["//visibility:private"], + deps = [ + "//pkg/log:go_default_library", + "//pkg/util/openapi:go_default_library", + "//pkg/virt-api:go_default_library", + "//pkg/virt-api/rest:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + ], +) + +go_binary( + name = "openapispec", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) diff --git a/tools/resource-generator/BUILD.bazel b/tools/resource-generator/BUILD.bazel new file mode 100644 index 000000000000..73ae87df88ef --- /dev/null +++ b/tools/resource-generator/BUILD.bazel @@ -0,0 +1,20 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["resource-generator.go"], + importpath = "kubevirt.io/kubevirt/tools/resource-generator", + visibility = ["//visibility:private"], + deps = [ + "//pkg/virt-operator/creation/components:go_default_library", + "//pkg/virt-operator/creation/rbac:go_default_library", + "//tools/util:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + ], +) + +go_binary( + name = "resource-generator", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) diff --git a/tools/util/BUILD.bazel b/tools/util/BUILD.bazel new file mode 100644 index 000000000000..98139505bc1e --- /dev/null +++ b/tools/util/BUILD.bazel @@ -0,0 +1,23 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["marshaller.go"], + importpath = "kubevirt.io/kubevirt/tools/util", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//vendor/github.com/ghodss/yaml:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = ["marshaller_test.go"], + embed = [":go_default_library"], + deps = [ + "//pkg/virt-operator/creation/components:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + ], +) diff --git a/tools/vms-generator/BUILD.bazel b/tools/vms-generator/BUILD.bazel new file mode 100644 index 000000000000..73a7c4416449 --- /dev/null +++ b/tools/vms-generator/BUILD.bazel @@ -0,0 +1,22 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["vms-generator.go"], + importpath = "kubevirt.io/kubevirt/tools/vms-generator", + visibility = ["//visibility:private"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/virt-api/webhooks/validating-webhook:go_default_library", + "//tools/util:go_default_library", + "//tools/vms-generator/utils:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", + ], +) + +go_binary( + name = "vms-generator", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) diff --git a/tools/vms-generator/utils/BUILD.bazel b/tools/vms-generator/utils/BUILD.bazel new file mode 100644 index 000000000000..0899d3c88bc0 --- /dev/null +++ b/tools/vms-generator/utils/BUILD.bazel @@ -0,0 +1,21 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "types.go", + "utils.go", + ], + importpath = "kubevirt.io/kubevirt/tools/vms-generator/utils", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/apps/v1/BUILD.bazel b/vendor/github.com/openshift/api/apps/v1/BUILD.bazel new file mode 100644 index 000000000000..072fcdaf3d1e --- /dev/null +++ b/vendor/github.com/openshift/api/apps/v1/BUILD.bazel @@ -0,0 +1,29 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "consts.go", + "deprecated_consts.go", + "doc.go", + "generated.pb.go", + "legacy.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/apps/v1", + importpath = "github.com/openshift/api/apps/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/authorization/v1/BUILD.bazel b/vendor/github.com/openshift/api/authorization/v1/BUILD.bazel new file mode 100644 index 000000000000..1f7e2ae2250f --- /dev/null +++ b/vendor/github.com/openshift/api/authorization/v1/BUILD.bazel @@ -0,0 +1,27 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "codec.go", + "doc.go", + "generated.pb.go", + "legacy.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/authorization/v1", + importpath = "github.com/openshift/api/authorization/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/openshift/api/pkg/serialization:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/api/rbac/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/build/v1/BUILD.bazel b/vendor/github.com/openshift/api/build/v1/BUILD.bazel new file mode 100644 index 000000000000..5c942da97992 --- /dev/null +++ b/vendor/github.com/openshift/api/build/v1/BUILD.bazel @@ -0,0 +1,26 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "consts.go", + "doc.go", + "generated.pb.go", + "legacy.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/build/v1", + importpath = "github.com/openshift/api/build/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/config/v1/BUILD.bazel b/vendor/github.com/openshift/api/config/v1/BUILD.bazel new file mode 100644 index 000000000000..d45df1ce1931 --- /dev/null +++ b/vendor/github.com/openshift/api/config/v1/BUILD.bazel @@ -0,0 +1,22 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated.pb.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/config/v1", + importpath = "github.com/openshift/api/config/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/image/v1/BUILD.bazel b/vendor/github.com/openshift/api/image/v1/BUILD.bazel new file mode 100644 index 000000000000..2155b1ebfbd8 --- /dev/null +++ b/vendor/github.com/openshift/api/image/v1/BUILD.bazel @@ -0,0 +1,27 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated.pb.go", + "legacy.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/image/v1", + importpath = "github.com/openshift/api/image/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", + "//vendor/github.com/openshift/api/image/docker10:go_default_library", + "//vendor/github.com/openshift/api/image/dockerpre012:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/network/v1/BUILD.bazel b/vendor/github.com/openshift/api/network/v1/BUILD.bazel new file mode 100644 index 000000000000..4bfdb0661b86 --- /dev/null +++ b/vendor/github.com/openshift/api/network/v1/BUILD.bazel @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "constants.go", + "doc.go", + "generated.pb.go", + "legacy.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/network/v1", + importpath = "github.com/openshift/api/network/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/oauth/v1/BUILD.bazel b/vendor/github.com/openshift/api/oauth/v1/BUILD.bazel new file mode 100644 index 000000000000..43a36a06867f --- /dev/null +++ b/vendor/github.com/openshift/api/oauth/v1/BUILD.bazel @@ -0,0 +1,25 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated.pb.go", + "legacy.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/oauth/v1", + importpath = "github.com/openshift/api/oauth/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/BUILD.bazel b/vendor/github.com/openshift/api/operator/v1alpha1/BUILD.bazel new file mode 100644 index 000000000000..970c95a9f331 --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1alpha1/BUILD.bazel @@ -0,0 +1,23 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated.pb.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/operator/v1alpha1", + importpath = "github.com/openshift/api/operator/v1alpha1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/openshift/api/config/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/project/v1/BUILD.bazel b/vendor/github.com/openshift/api/project/v1/BUILD.bazel new file mode 100644 index 000000000000..d877f5307729 --- /dev/null +++ b/vendor/github.com/openshift/api/project/v1/BUILD.bazel @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated.pb.go", + "legacy.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/project/v1", + importpath = "github.com/openshift/api/project/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/quota/v1/BUILD.bazel b/vendor/github.com/openshift/api/quota/v1/BUILD.bazel new file mode 100644 index 000000000000..d875d4899ff1 --- /dev/null +++ b/vendor/github.com/openshift/api/quota/v1/BUILD.bazel @@ -0,0 +1,25 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated.pb.go", + "legacy.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/quota/v1", + importpath = "github.com/openshift/api/quota/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/route/v1/BUILD.bazel b/vendor/github.com/openshift/api/route/v1/BUILD.bazel new file mode 100644 index 000000000000..c265798fdf53 --- /dev/null +++ b/vendor/github.com/openshift/api/route/v1/BUILD.bazel @@ -0,0 +1,25 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated.pb.go", + "legacy.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/route/v1", + importpath = "github.com/openshift/api/route/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/security/v1/BUILD.bazel b/vendor/github.com/openshift/api/security/v1/BUILD.bazel new file mode 100644 index 000000000000..f7fdc339ac61 --- /dev/null +++ b/vendor/github.com/openshift/api/security/v1/BUILD.bazel @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated.pb.go", + "legacy.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/security/v1", + importpath = "github.com/openshift/api/security/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/BUILD.bazel b/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/BUILD.bazel new file mode 100644 index 000000000000..649910caf657 --- /dev/null +++ b/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/BUILD.bazel @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated.pb.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/servicecertsigner/v1alpha1", + importpath = "github.com/openshift/api/servicecertsigner/v1alpha1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/openshift/api/config/v1:go_default_library", + "//vendor/github.com/openshift/api/operator/v1alpha1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/template/v1/BUILD.bazel b/vendor/github.com/openshift/api/template/v1/BUILD.bazel new file mode 100644 index 000000000000..d3170c6b73e4 --- /dev/null +++ b/vendor/github.com/openshift/api/template/v1/BUILD.bazel @@ -0,0 +1,29 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "codec.go", + "consts.go", + "doc.go", + "generated.pb.go", + "legacy.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/template/v1", + importpath = "github.com/openshift/api/template/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", + "//vendor/github.com/openshift/api/pkg/serialization:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/user/v1/BUILD.bazel b/vendor/github.com/openshift/api/user/v1/BUILD.bazel new file mode 100644 index 000000000000..2850f0d8dd61 --- /dev/null +++ b/vendor/github.com/openshift/api/user/v1/BUILD.bazel @@ -0,0 +1,25 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated.pb.go", + "legacy.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/user/v1", + importpath = "github.com/openshift/api/user/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/github.com/openshift/api/webconsole/v1/BUILD.bazel b/vendor/github.com/openshift/api/webconsole/v1/BUILD.bazel new file mode 100644 index 000000000000..b5f78dbdf796 --- /dev/null +++ b/vendor/github.com/openshift/api/webconsole/v1/BUILD.bazel @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated.pb.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "zz_generated.deepcopy.go", + ], + importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/api/webconsole/v1", + importpath = "github.com/openshift/api/webconsole/v1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", + "//vendor/github.com/openshift/api/config/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +)