forked from bazelbuild/rules_k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
132 lines (104 loc) · 3.59 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
# Copyright 2017 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
workspace(name = "io_bazel_rules_k8s")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//k8s:k8s.bzl", "k8s_defaults", "k8s_repositories")
# Tell Gazelle to use @io_bazel_rules_docker as the external repository for rules_docker go packages
# gazelle:repository go_repository name=io_bazel_rules_docker importpath=github.com/bazelbuild/rules_docker
http_archive(
name = "rules_python",
sha256 = "cdf6b84084aad8f10bf20b46b77cb48d83c319ebe6458a18e9d2cebf57807cdd",
strip_prefix = "rules_python-0.8.1",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.8.1.tar.gz",
)
k8s_repositories()
load("@io_bazel_rules_docker//repositories:repositories.bzl", _rules_docker_repos = "repositories")
_rules_docker_repos()
load("//k8s:k8s_go_deps.bzl", k8s_go_deps = "deps")
k8s_go_deps()
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
# Only needed if using the packaging rules.
load("@rules_python//python:pip.bzl", "pip_install")
pip_install(
name = "py_deps",
#python_interpreter_target = interpreter,
requirements = "//:requirements.txt",
)
_CLUSTER = "gke_rules-k8s_us-central1-f_testing"
_CONTEXT = _CLUSTER
_NAMESPACE = "{STABLE_E2E_NAMESPACE}"
k8s_defaults(
name = "k8s_object",
cluster = _CLUSTER,
context = _CONTEXT,
image_chroot = "us.gcr.io/rules_k8s/{BUILD_USER}",
namespace = _NAMESPACE,
)
k8s_defaults(
name = "k8s_deploy",
cluster = _CLUSTER,
context = _CONTEXT,
image_chroot = "us.gcr.io/rules_k8s/{BUILD_USER}",
kind = "deployment",
namespace = _NAMESPACE,
)
[k8s_defaults(
name = "k8s_" + kind,
cluster = _CLUSTER,
context = _CONTEXT,
kind = kind,
namespace = _NAMESPACE,
) for kind in [
"service",
"crd",
"todo",
]]
# ================================================================
# Imports for examples/
# ================================================================
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
gazelle_dependencies()
# We use go_image to build a sample service
load(
"@io_bazel_rules_docker//go:image.bzl",
_go_image_repos = "repositories",
)
_go_image_repos()
# gazelle:repo bazel_gazelle
# Go dependencies needed for rules_k8s tests only.
go_repository(
name = "org_golang_google_grpc",
importpath = "google.golang.org/grpc",
sum = "h1:C1QC6KzgSiLyBabDi87BbjaGreoRgGUF5nOyvfrAZ1k=",
version = "v1.28.1",
)
go_repository(
name = "org_golang_x_net",
importpath = "golang.org/x/net",
sum = "h1:h5tBRKZ1aY/bo6GNqe/4zWC8GkaLOFQ5wPKIOQ0i2sA=",
version = "v0.0.0-20190918130420-a8b05e9114ab",
)
go_repository(
name = "org_golang_x_text",
importpath = "golang.org/x/text",
sum = "h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=",
version = "v0.3.2",
)
go_repository(
name = "org_golang_x_sys",
importpath = "golang.org/x/sys",
sum = "h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So=",
version = "v0.0.0-20200302150141-5c8b2ff67527",
)