Skip to content

Commit

Permalink
Merge pull request #53839 from ixdy/update-bazel-workspace
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazel-contrib/rules_go#888, bazel-contrib/rules_go#900, bazel-contrib/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder
  • Loading branch information
Kubernetes Submit Queue authored Oct 16, 2017
2 parents 9ba01e5 + aee5f45 commit 77b83e4
Show file tree
Hide file tree
Showing 2,219 changed files with 3,025 additions and 27 deletions.
28 changes: 17 additions & 11 deletions build/root/WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
http_archive(
name = "io_bazel_rules_go",
sha256 = "27a13726ff8621cfa4592fbef116b253043c2b093c8814265dc4489a0e67d229",
strip_prefix = "rules_go-82483596ec203eb9c1849937636f4cbed83733eb",
urls = ["https://github.com/bazelbuild/rules_go/archive/82483596ec203eb9c1849937636f4cbed83733eb.tar.gz"],
sha256 = "a4ea00b71a6fc3bd381cbbf6eb83ec91fe8b32b1c622c048f1e6f0d965bb1a2d",
strip_prefix = "rules_go-a280fbac1a0a4c67b0eee660b4fd1b3db7c9f058",
urls = ["https://github.com/bazelbuild/rules_go/archive/a280fbac1a0a4c67b0eee660b4fd1b3db7c9f058.tar.gz"],
)

http_archive(
name = "io_kubernetes_build",
sha256 = "ca8fa1ee0928220d77fcaa6bcf40a26c57800c024e21b08c8dd9cc8fbf910236",
strip_prefix = "repo-infra-0aafaab9e158d3628804242c6a9c4dd3eb8bce1f",
urls = ["https://github.com/kubernetes/repo-infra/archive/0aafaab9e158d3628804242c6a9c4dd3eb8bce1f.tar.gz"],
sha256 = "8e49ac066fbaadd475bd63762caa90f81cd1880eba4cc25faa93355ef5fa2739",
strip_prefix = "repo-infra-e26fc85d14a1d3dc25569831acc06919673c545a",
urls = ["https://github.com/kubernetes/repo-infra/archive/e26fc85d14a1d3dc25569831acc06919673c545a.tar.gz"],
)

ETCD_VERSION = "3.1.10"
Expand All @@ -34,15 +34,21 @@ http_archive(

http_archive(
name = "io_bazel_rules_docker",
sha256 = "e86b8764fccc62dddf6e08382ba692b16479a2af478080b1ece4d9add8abbb9a",
strip_prefix = "rules_docker-28d492bc1dc1275e2c6ff74e51adc864e59ddc76",
urls = ["https://github.com/bazelbuild/rules_docker/archive/28d492bc1dc1275e2c6ff74e51adc864e59ddc76.tar.gz"],
sha256 = "c440717ee9b1b2f4a1e9bf5622539feb5aef9db83fc1fa1517818f13c041b0be",
strip_prefix = "rules_docker-8bbe2a8abd382641e65ff7127a3700a8530f02ce",
urls = ["https://github.com/bazelbuild/rules_docker/archive/8bbe2a8abd382641e65ff7127a3700a8530f02ce.tar.gz"],
)

load("@io_bazel_rules_go//go:def.bzl", "go_repositories")
load("@io_kubernetes_build//defs:bazel_version.bzl", "check_version")

check_version("0.6.0")

load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
load("@io_bazel_rules_docker//docker:docker.bzl", "docker_repositories", "docker_pull")

go_repositories(
go_rules_dependencies()

go_register_toolchains(
go_version = "1.8.3",
)

Expand Down
2 changes: 2 additions & 0 deletions cluster/addons/fluentd-elasticsearch/es-image/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ load(

go_binary(
name = "es-image",
importpath = "k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image",
library = ":go_default_library",
)

go_library(
name = "go_default_library",
srcs = ["elasticsearch_logging_discovery.go"],
importpath = "k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image",
deps = [
"//pkg/api:go_default_library",
"//pkg/client/clientset_generated/internalclientset:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cluster/gce/gci/mounter/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ load(

go_binary(
name = "mounter",
importpath = "k8s.io/kubernetes/cluster/gce/gci/mounter",
library = ":go_default_library",
)

go_library(
name = "go_default_library",
srcs = ["mounter.go"],
importpath = "k8s.io/kubernetes/cluster/gce/gci/mounter",
)

filegroup(
Expand Down
2 changes: 2 additions & 0 deletions cluster/images/etcd-version-monitor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ load(

go_binary(
name = "etcd-version-monitor",
importpath = "k8s.io/kubernetes/cluster/images/etcd-version-monitor",
library = ":go_default_library",
)

go_library(
name = "go_default_library",
srcs = ["etcd-version-monitor.go"],
importpath = "k8s.io/kubernetes/cluster/images/etcd-version-monitor",
deps = [
"//vendor/github.com/golang/glog:go_default_library",
"//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cluster/images/etcd/attachlease/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ load(

go_binary(
name = "attachlease",
importpath = "k8s.io/kubernetes/cluster/images/etcd/attachlease",
library = ":go_default_library",
)

go_library(
name = "go_default_library",
srcs = ["attachlease.go"],
importpath = "k8s.io/kubernetes/cluster/images/etcd/attachlease",
deps = [
"//vendor/github.com/coreos/etcd/clientv3:go_default_library",
"//vendor/github.com/golang/glog:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cluster/images/etcd/rollback/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ load(

go_binary(
name = "rollback",
importpath = "k8s.io/kubernetes/cluster/images/etcd/rollback",
library = ":go_default_library",
)

go_library(
name = "go_default_library",
srcs = ["rollback.go"],
importpath = "k8s.io/kubernetes/cluster/images/etcd/rollback",
deps = [
"//third_party/forked/etcd221/wal:go_default_library",
"//vendor/github.com/coreos/etcd/etcdserver:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/clicheck/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ load(

go_binary(
name = "clicheck",
importpath = "k8s.io/kubernetes/cmd/clicheck",
library = ":go_default_library",
)

go_library(
name = "go_default_library",
srcs = ["check_cli_conventions.go"],
importpath = "k8s.io/kubernetes/cmd/clicheck",
deps = [
"//pkg/kubectl/cmd:go_default_library",
"//pkg/kubectl/cmd/util:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/cloud-controller-manager/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ go_binary(
"-extldflags",
"-static",
],
importpath = "k8s.io/kubernetes/cmd/cloud-controller-manager",
library = ":go_default_library",
x_defs = version_x_defs(),
)

go_library(
name = "go_default_library",
srcs = ["controller-manager.go"],
importpath = "k8s.io/kubernetes/cmd/cloud-controller-manager",
deps = [
"//cmd/cloud-controller-manager/app:go_default_library",
"//cmd/cloud-controller-manager/app/options:go_default_library",
Expand Down
1 change: 1 addition & 0 deletions cmd/cloud-controller-manager/app/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ load(
go_library(
name = "go_default_library",
srcs = ["controllermanager.go"],
importpath = "k8s.io/kubernetes/cmd/cloud-controller-manager/app",
deps = [
"//cmd/cloud-controller-manager/app/options:go_default_library",
"//pkg/api:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/cloud-controller-manager/app/options/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ load(
go_library(
name = "go_default_library",
srcs = ["options.go"],
importpath = "k8s.io/kubernetes/cmd/cloud-controller-manager/app/options",
deps = [
"//pkg/apis/componentconfig:go_default_library",
"//pkg/client/leaderelectionconfig:go_default_library",
Expand Down Expand Up @@ -36,6 +37,7 @@ filegroup(
go_test(
name = "go_default_test",
srcs = ["options_test.go"],
importpath = "k8s.io/kubernetes/cmd/cloud-controller-manager/app/options",
library = ":go_default_library",
deps = [
"//pkg/apis/componentconfig:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/gendocs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ load(

go_binary(
name = "gendocs",
importpath = "k8s.io/kubernetes/cmd/gendocs",
library = ":go_default_library",
)

go_library(
name = "go_default_library",
srcs = ["gen_kubectl_docs.go"],
importpath = "k8s.io/kubernetes/cmd/gendocs",
deps = [
"//cmd/genutils:go_default_library",
"//pkg/kubectl/cmd:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/genkubedocs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ load(

go_binary(
name = "genkubedocs",
importpath = "k8s.io/kubernetes/cmd/genkubedocs",
library = ":go_default_library",
)

go_library(
name = "go_default_library",
srcs = ["gen_kube_docs.go"],
importpath = "k8s.io/kubernetes/cmd/genkubedocs",
deps = [
"//cmd/cloud-controller-manager/app:go_default_library",
"//cmd/genutils:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/genman/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ load(

go_binary(
name = "genman",
importpath = "k8s.io/kubernetes/cmd/genman",
library = ":go_default_library",
)

go_library(
name = "go_default_library",
srcs = ["gen_kube_man.go"],
importpath = "k8s.io/kubernetes/cmd/genman",
deps = [
"//cmd/cloud-controller-manager/app:go_default_library",
"//cmd/genutils:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/genswaggertypedocs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ load(

go_binary(
name = "genswaggertypedocs",
importpath = "k8s.io/kubernetes/cmd/genswaggertypedocs",
library = ":go_default_library",
)

go_library(
name = "go_default_library",
srcs = ["swagger_type_docs.go"],
importpath = "k8s.io/kubernetes/cmd/genswaggertypedocs",
deps = [
"//vendor/github.com/golang/glog:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/genutils/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ load(
go_library(
name = "go_default_library",
srcs = ["genutils.go"],
importpath = "k8s.io/kubernetes/cmd/genutils",
)

go_test(
name = "go_default_test",
srcs = ["genutils_test.go"],
importpath = "k8s.io/kubernetes/cmd/genutils",
library = ":go_default_library",
)

Expand Down
2 changes: 2 additions & 0 deletions cmd/genyaml/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ load(

go_binary(
name = "genyaml",
importpath = "k8s.io/kubernetes/cmd/genyaml",
library = ":go_default_library",
)

go_library(
name = "go_default_library",
srcs = ["gen_kubectl_yaml.go"],
importpath = "k8s.io/kubernetes/cmd/genyaml",
deps = [
"//cmd/genutils:go_default_library",
"//pkg/kubectl/cmd:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/gke-certificates-controller/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ load(
go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "k8s.io/kubernetes/cmd/gke-certificates-controller",
deps = [
"//cmd/gke-certificates-controller/app:go_default_library",
"//pkg/kubectl/util/logs:go_default_library",
Expand Down Expand Up @@ -36,5 +37,6 @@ filegroup(

go_binary(
name = "gke-certificates-controller",
importpath = "k8s.io/kubernetes/cmd/gke-certificates-controller",
library = ":go_default_library",
)
2 changes: 2 additions & 0 deletions cmd/gke-certificates-controller/app/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ go_library(
"gke_signer.go",
"options.go",
],
importpath = "k8s.io/kubernetes/cmd/gke-certificates-controller/app",
deps = [
"//pkg/api:go_default_library",
"//pkg/apis/certificates/install:go_default_library",
Expand Down Expand Up @@ -52,6 +53,7 @@ filegroup(
go_test(
name = "go_default_test",
srcs = ["gke_signer_test.go"],
importpath = "k8s.io/kubernetes/cmd/gke-certificates-controller/app",
library = ":go_default_library",
deps = [
"//vendor/k8s.io/api/certificates/v1beta1:go_default_library",
Expand Down
3 changes: 3 additions & 0 deletions cmd/hyperkube/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ load("//pkg/version:def.bzl", "version_x_defs")

go_binary(
name = "hyperkube",
importpath = "k8s.io/kubernetes/cmd/hyperkube",
library = ":go_default_library",
x_defs = version_x_defs(),
)

go_test(
name = "go_default_test",
srcs = ["hyperkube_test.go"],
importpath = "k8s.io/kubernetes/cmd/hyperkube",
library = ":go_default_library",
deps = [
"//vendor/github.com/spf13/cobra:go_default_library",
Expand All @@ -41,6 +43,7 @@ go_library(
"main.go",
"server.go",
],
importpath = "k8s.io/kubernetes/cmd/hyperkube",
deps = [
"//cmd/kube-apiserver/app:go_default_library",
"//cmd/kube-apiserver/app/options:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/importverifier/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ load(

go_binary(
name = "importverifier",
importpath = "k8s.io/kubernetes/cmd/importverifier",
library = ":go_default_library",
)

go_library(
name = "go_default_library",
srcs = ["importverifier.go"],
importpath = "k8s.io/kubernetes/cmd/importverifier",
)

filegroup(
Expand Down
2 changes: 2 additions & 0 deletions cmd/kube-apiserver/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ go_binary(
"-extldflags",
"-static",
],
importpath = "k8s.io/kubernetes/cmd/kube-apiserver",
library = ":go_default_library",
x_defs = version_x_defs(),
)

go_library(
name = "go_default_library",
srcs = ["apiserver.go"],
importpath = "k8s.io/kubernetes/cmd/kube-apiserver",
deps = [
"//cmd/kube-apiserver/app:go_default_library",
"//cmd/kube-apiserver/app/options:go_default_library",
Expand Down
1 change: 1 addition & 0 deletions cmd/kube-apiserver/app/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ go_library(
"apiextensions.go",
"server.go",
],
importpath = "k8s.io/kubernetes/cmd/kube-apiserver/app",
deps = [
"//cmd/kube-apiserver/app/options:go_default_library",
"//pkg/api:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/kube-apiserver/app/options/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ go_library(
"plugins.go",
"validation.go",
],
importpath = "k8s.io/kubernetes/cmd/kube-apiserver/app/options",
deps = [
"//pkg/api:go_default_library",
"//pkg/api/validation:go_default_library",
Expand Down Expand Up @@ -59,6 +60,7 @@ go_library(
go_test(
name = "go_default_test",
srcs = ["options_test.go"],
importpath = "k8s.io/kubernetes/cmd/kube-apiserver/app/options",
library = ":go_default_library",
deps = [
"//pkg/api:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/kube-apiserver/app/testing/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ load(
go_test(
name = "go_default_test",
srcs = ["server_test.go"],
importpath = "k8s.io/kubernetes/cmd/kube-apiserver/app/testing",
library = ":go_default_library",
deps = [
"//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library",
Expand All @@ -33,6 +34,7 @@ go_test(
go_library(
name = "go_default_library",
srcs = ["testserver.go"],
importpath = "k8s.io/kubernetes/cmd/kube-apiserver/app/testing",
deps = [
"//cmd/kube-apiserver/app:go_default_library",
"//cmd/kube-apiserver/app/options:go_default_library",
Expand Down
Loading

0 comments on commit 77b83e4

Please sign in to comment.