1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
load("//build:build.bzl", "go_custom_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "agent",
srcs = [
"factory.go",
"informer.go",
"k8s_informer.go",
"mock_informer.go",
"module.go",
"persisted_state.go",
"persisted_terminating_workspaces.go",
"reconciler.go",
"task.go",
"worker.go",
],
importpath = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/remote_development/agent",
visibility = ["//:__subpackages__"],
deps = [
"//internal/module/modagent",
"//internal/module/modshared",
"//internal/module/remote_development",
"//internal/module/remote_development/agent/k8s",
"//internal/tool/errz",
"//internal/tool/httpz",
"//internal/tool/logz",
"//internal/tool/prototool",
"//internal/tool/retry",
"//internal/tool/syncz",
"//pkg/agentcfg",
"@io_k8s_api//core/v1:core",
"@io_k8s_apimachinery//pkg/api/equality",
"@io_k8s_apimachinery//pkg/api/errors",
"@io_k8s_apimachinery//pkg/apis/meta/v1:meta",
"@io_k8s_apimachinery//pkg/apis/meta/v1/unstructured",
"@io_k8s_apimachinery//pkg/runtime/schema",
"@io_k8s_apimachinery//pkg/util/wait",
"@io_k8s_client_go//dynamic",
"@io_k8s_client_go//dynamic/dynamicinformer",
"@io_k8s_client_go//tools/cache",
"@org_uber_go_zap//:zap",
],
)
go_custom_test(
name = "agent_test",
srcs = [
"module_test.go",
"persisted_state_test.go",
"reconciler_test.go",
"worker_test.go",
],
embed = [":agent"],
deps = [
"//internal/module/modagent",
"//internal/module/remote_development/agent/k8s",
"//internal/tool/retry",
"//internal/tool/testing/mock_modagent",
"//internal/tool/testing/testhelpers",
"//pkg/agentcfg",
"@com_github_golang_mock//gomock",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
"@com_github_stretchr_testify//suite",
"@io_k8s_apimachinery//pkg/util/wait",
"@org_uber_go_zap//zaptest",
],
)
|