Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
Add back support for etcd 2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciprian Hacman committed Sep 15, 2020
1 parent 3727694 commit 552736b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
18 changes: 18 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,21 @@ http_file(
sha256 = "1934ebb9f9f6501f706111b78e5e321a7ff8d7792d3d96a76e2d01874e42a300",
urls = ["https://github.com/etcd-io/etcd/releases/download/v3.4.13/etcd-v3.4.13-linux-arm64.tar.gz"],
)

#=============================================================================
# Build etcd from source
# This picks up a number of critical bug fixes, for example:
# * Caching of /etc/hosts https://github.com/golang/go/issues/13340
# * General GC etc improvements
# * Misc security fixes that are not backported

# Download via HTTP
go_repository(
name = "etcd_v2_2_1_source",
urls = ["https://github.com/etcd-io/etcd/archive/v2.2.1.tar.gz"],
sha256 = "1c0ce63812ef951f79c0a544c91f9f1ba3c6b50cb3e8197de555732454864d05",
importpath = "github.com/coreos/etcd",
strip_prefix = "etcd-2.2.1/",
build_external = "vendored",
build_file_proto_mode = "disable_global",
)
11 changes: 11 additions & 0 deletions images/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ load(
"container_push",
)

# Layer for etcd 2.2.1, the version of etcd2 that was originally recommended
container_layer(
name = "etcd-2.2.1-layer-amd64",
directory = "/opt/etcd-v2.2.1-linux-amd64/",
files = [
"@etcd_v2_2_1_source//:etcd",
"@etcd_v2_2_1_source//etcdctl",
],
)

load("etcd.bzl", "supported_etcd_arch_and_version")

# Layer for etcd 3.1.12, as used in k8s 1.10
Expand Down Expand Up @@ -52,6 +62,7 @@ container_image(
directory = "/opt",
layers = select({
"@io_bazel_rules_go//go/platform:amd64": [
"etcd-2.2.1-layer-amd64",
"etcd-3.1.12-layer-amd64",
"etcd-3.2.18-layer-amd64",
"etcd-3.2.24-layer-amd64",
Expand Down
2 changes: 2 additions & 0 deletions test/integration/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ go_test(
"upgradedowngrade_test.go",
],
data = [
"@etcd_v2_2_1_source//:etcd",
"@etcd_v2_2_1_source//etcdctl:etcdctl",
"//:etcd-v3.1.12-linux-amd64_etcd",
"//:etcd-v3.1.12-linux-amd64_etcdctl",
"//:etcd-v3.2.18-linux-amd64_etcd",
Expand Down

0 comments on commit 552736b

Please sign in to comment.