-
Notifications
You must be signed in to change notification settings - Fork 1
/
WORKSPACE
132 lines (104 loc) · 4.29 KB
/
WORKSPACE
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
workspace(name = "com_github_andrew-delph_my-key-store")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
## GOLANG RULES
http_archive(
name = "io_bazel_rules_go",
sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
],
)
http_archive(
name = "bazel_gazelle",
sha256 = "d3fa66a39028e97d76f9e2db8f1b0c11c099e8e01bf363a923074784e451f809",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz",
],
)
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
load("//:repositories.bzl", "go_repositories")
go_rules_dependencies()
go_register_toolchains(version = "1.20.5")
# gazelle:repository_macro repositories.bzl%go_repositories
go_repositories()
gazelle_dependencies()
# protobuf
http_archive(
name = "com_google_protobuf",
sha256 = "25680843adf0c3302648d35f744e38cc3b6b05a6c77a927de5aea3e1c2e36106",
strip_prefix = "protobuf-3.19.4",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.19.4.zip"],
)
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
# DOCKER
http_archive(
name = "io_bazel_rules_docker",
sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.25.0/rules_docker-v0.25.0.tar.gz"],
)
load(
"@io_bazel_rules_docker//repositories:repositories.bzl",
container_repositories = "repositories",
)
container_repositories()
load("@io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps")
container_deps()
load("@io_bazel_rules_docker//container:pull.bzl", "container_pull")
container_pull(
name = "distroless_base",
digest = "sha256:75f63d4edd703030d4312dc7528a349ca34d48bec7bd754652b2d47e5a0b7873",
registry = "gcr.io",
repository = "distroless/base",
)
load(
"@io_bazel_rules_docker//go:image.bzl",
_go_image_repos = "repositories",
)
_go_image_repos()
################################
# Load rules_k8s and configure #
################################
http_archive(
name = "io_bazel_rules_k8s",
sha256 = "ce5b9bc0926681e2e7f2147b49096f143e6cbc783e71bc1d4f36ca76b00e6f4a",
strip_prefix = "rules_k8s-0.7",
urls = ["https://github.com/bazelbuild/rules_k8s/archive/refs/tags/v0.7.tar.gz"],
)
load("@io_bazel_rules_k8s//k8s:k8s.bzl", "k8s_defaults", "k8s_repositories")
k8s_repositories()
#############################################################
# Setting up the defaults for rules k8s. The varible values
# are replaced by hack/build/print-workspace-status.sh
# Using environment variables that are prefixed with the word
# 'STAMP_' causes the rules_k8s files to rebuild when the
# --stamp and evn values change.
#############################################################
k8s_defaults(
# This becomes the name of the @repository and the rule
# you will import in your BUILD files.
name = "k8s_deploy",
# This is the name of the cluster as it appears in:
# kubectl config view --minify -o=jsonpath='{.contexts[0].context.cluster}'
# You are able to override the default cluster by setting the env variable K8S_CLUSTER
cluster = "{STABLE_CLUSTER}",
# You are able to override the default registry by setting the env variable DEV_REGISTRY
image_chroot = "{STABLE_IMAGE_REGISTRY}",
kind = "deployment",
)
###################################################
# Load kubernetes repo-infra for tools like kazel #
###################################################
http_archive(
name = "io_k8s_repo_infra",
sha256 = "ae75a3a8de9698df30dd5a177c61f31ae9dd3a5da96ec951f0d6e60b2672d5fe",
strip_prefix = "repo-infra-0.2.2",
urls = [
"https://github.com/kubernetes/repo-infra/archive/v0.2.2.tar.gz",
],
)
load("//operator/hack:deps.bzl", install_hack_bin = "install")
install_hack_bin()