containerized-data-importer/cmd/cdi-uploadserver/BUILD.bazel
Alexander Wels c707e781a9
Add conditions to DataVolume and add condition annotation to PVCs (#1194)
* Add conditions to DataVolume and add condition annotation to PVCs

Signed-off-by: Alexander Wels <awels@redhat.com>

* Added reason codes to conditions
Updated functional tests to use reason codes
Fixed broken functional test.

Signed-off-by: Alexander Wels <awels@redhat.com>

* Added last transition time
Added documentation

Signed-off-by: Alexander Wels <awels@redhat.com>

* Switch to conditions slice from conditions pointer slice.

Signed-off-by: Alexander Wels <awels@redhat.com>

* Add heartbeat time for conditions.
Renamed AnnRunningCondition to AnnLastTerminationMessage
Only update reason/message on heartbeat or state change.

Signed-off-by: Alexander Wels <awels@redhat.com>

* Rename heartBeat to heartbeat
Re-factor datavolume-conditions to properly update heartbeat time.

Signed-off-by: Alexander Wels <awels@redhat.com>

* renamed AnnRunningConditionReason to AnnLastTerminationReason

Signed-off-by: Alexander Wels <awels@redhat.com>

* Revert lastTerminatedMessage/Reason rename
Added separate AnnScratchBoundCondition/Message/Reason for scratch space

Signed-off-by: Alexander Wels <awels@redhat.com>

* Update bound condition to take scratch or source PVC status into consideration.
Update running condition to take source pod status into consideration

Signed-off-by: Alexander Wels <awels@redhat.com>

* Addressed comments in review.

Signed-off-by: Alexander Wels <awels@redhat.com>

* Properly get scratch space pvc phase.

Signed-off-by: Alexander Wels <awels@redhat.com>
2020-05-12 23:39:23 +02:00

52 lines
1.3 KiB
Python

load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@io_bazel_rules_container_rpm//rpm:rpm.bzl", "rpm_image")
rpm_image(
name = "cdi-uploadserver-base-image",
base = "@fedora//image",
rpms = [
"@tar//file",
"@qemu-img//file",
"@qemu-block-curl//file",
"@xen-libs//file",
"@libaio//file",
"@capstone//file",
],
)
go_library(
name = "go_default_library",
srcs = ["uploadserver.go"],
importpath = "kubevirt.io/containerized-data-importer/cmd/cdi-uploadserver",
visibility = ["//visibility:private"],
deps = [
"//pkg/common:go_default_library",
"//pkg/uploadserver:go_default_library",
"//pkg/util:go_default_library",
"//vendor/k8s.io/klog:go_default_library",
],
)
go_binary(
name = "cdi-uploadserver",
embed = [":go_default_library"],
visibility = ["//visibility:public"],
)
load(
"@io_bazel_rules_docker//container:container.bzl",
"container_image",
)
container_image(
name = "cdi-uploadserver-image",
base = ":cdi-uploadserver-base-image",
directory = "/usr/bin",
entrypoint = [
"/usr/bin/cdi-uploadserver",
"-alsologtostderr",
],
files = [":cdi-uploadserver"],
visibility = ["//visibility:public"],
)