mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-25 04:11:46 +00:00
Bump to etcd 3.1.12 to pick up critical fix
This commit is contained in:
@@ -14,9 +14,13 @@
|
||||
|
||||
.PHONY: build push
|
||||
|
||||
ETCD_VERSION = 3.1.11
|
||||
IMAGE = staging-k8s.gcr.io/etcd-empty-dir-cleanup
|
||||
TAG = 3.1.11.0
|
||||
ETCD_VERSION = 3.1.12
|
||||
# Image should be pulled from k8s.gcr.io, which will auto-detect
|
||||
# region (us, eu, asia, ...) and pull from the closest.
|
||||
REGISTRY = k8s.gcr.io
|
||||
# Images should be pushed to staging-k8s.gcr.io.
|
||||
PUSH_REGISTRY = staging-k8s.gcr.io
|
||||
TAG = 3.1.12.0
|
||||
|
||||
clean:
|
||||
rm -rf etcdctl etcd-v$(ETCD_VERSION)-linux-amd64 etcd-v$(ETCD_VERSION)-linux-amd64.tar.gz
|
||||
@@ -25,8 +29,9 @@ build: clean
|
||||
curl -L -O https://github.com/coreos/etcd/releases/download/v$(ETCD_VERSION)/etcd-v$(ETCD_VERSION)-linux-amd64.tar.gz
|
||||
tar xzvf etcd-v$(ETCD_VERSION)-linux-amd64.tar.gz
|
||||
cp etcd-v$(ETCD_VERSION)-linux-amd64/etcdctl .
|
||||
docker build --pull -t $(IMAGE):$(TAG) .
|
||||
docker build --pull -t $(REGISTRY)/etcd-empty-dir-cleanup:$(TAG) .
|
||||
rm -rf etcdctl etcd-v$(ETCD_VERSION)-linux-amd64 etcd-v$(ETCD_VERSION)-linux-amd64.tar.gz
|
||||
|
||||
push: build
|
||||
docker push $(IMAGE):$(TAG)
|
||||
docker tag $(REGISTRY)/etcd-empty-dir-cleanup:$(TAG) $(PUSH_REGISTRY)/etcd-empty-dir-cleanup:$(TAG)
|
||||
docker push $(PUSH_REGISTRY)/etcd-empty-dir-cleanup:$(TAG)
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# Build the etcd image
|
||||
#
|
||||
# Usage:
|
||||
# [TAGS=2.2.1 2.3.7 3.0.17 3.1.11] [REGISTRY=k8s.gcr.io] [ARCH=amd64] [BASEIMAGE=busybox] make (build|push)
|
||||
# [TAGS=2.2.1 2.3.7 3.0.17 3.1.12] [REGISTRY=k8s.gcr.io] [ARCH=amd64] [BASEIMAGE=busybox] make (build|push)
|
||||
|
||||
# The image contains different etcd versions to simplify
|
||||
# upgrades. Thus be careful when removing any tag from here.
|
||||
@@ -26,12 +26,16 @@
|
||||
# Except from etcd-$(tag) and etcdctl-$(tag) binaries, we also
|
||||
# need etcd and etcdctl binaries for backward compatibility reasons.
|
||||
# That binary will be set to the last tag from $(TAGS).
|
||||
TAGS?=2.2.1 2.3.7 3.0.17 3.1.11
|
||||
REGISTRY_TAG?=3.1.11
|
||||
TAGS?=2.2.1 2.3.7 3.0.17 3.1.12
|
||||
REGISTRY_TAG?=3.1.12
|
||||
# ROLLBACK_REGISTRY_TAG specified the tag that REGISTRY_TAG may be rolled back to.
|
||||
ROLLBACK_REGISTRY_TAG?=3.1.11
|
||||
ROLLBACK_REGISTRY_TAG?=3.1.12
|
||||
ARCH?=amd64
|
||||
# Image should be pulled from k8s.gcr.io, which will auto-detect
|
||||
# region (us, eu, asia, ...) and pull from the closest.
|
||||
REGISTRY?=k8s.gcr.io
|
||||
# Images should be pushed to staging-k8s.gcr.io.
|
||||
PUSH_REGISTRY?=staging-k8s.gcr.io
|
||||
# golang version should match the golang version from https://github.com/coreos/etcd/releases for REGISTRY_TAG version of etcd.
|
||||
GOLANG_VERSION?=1.8.5
|
||||
GOARM=7
|
||||
@@ -83,10 +87,10 @@ else
|
||||
# For each release create a tmp dir 'etcd_release_tmp_dir' and unpack the release tar there.
|
||||
for tag in $(TAGS); do \
|
||||
etcd_release_tmp_dir=$(shell mktemp -d); \
|
||||
docker run --interactive -v $$etcd_release_tmp_dir:/etcdbin golang:$(GOLANG_VERSION) /bin/bash -c \
|
||||
docker run --interactive -v $${etcd_release_tmp_dir}:/etcdbin golang:$(GOLANG_VERSION) /bin/bash -c \
|
||||
"git clone https://github.com/coreos/etcd /go/src/github.com/coreos/etcd \
|
||||
&& cd /go/src/github.com/coreos/etcd \
|
||||
&& git checkout v$$tag \
|
||||
&& git checkout v$${tag} \
|
||||
&& GOARM=$(GOARM) GOARCH=$(ARCH) ./build \
|
||||
&& cp -f bin/$(ARCH)/etcd* bin/etcd* /etcdbin; echo 'done'"; \
|
||||
cp $$etcd_release_tmp_dir/etcd $$etcd_release_tmp_dir/etcdctl $(TEMP_DIR)/; \
|
||||
@@ -108,7 +112,8 @@ endif
|
||||
docker build --pull -t $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG) $(TEMP_DIR)
|
||||
|
||||
push: build
|
||||
docker push $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG)
|
||||
docker tag $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG) $(PUSH_REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG)
|
||||
docker push $(PUSH_REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG)
|
||||
|
||||
ifeq ($(ARCH),amd64)
|
||||
# Backward compatibility. TODO: deprecate this image tag
|
||||
|
@@ -18,7 +18,7 @@
|
||||
# This script performs etcd upgrade based on the following environmental
|
||||
# variables:
|
||||
# TARGET_STORAGE - API of etcd to be used (supported: 'etcd2', 'etcd3')
|
||||
# TARGET_VERSION - etcd release to be used (supported: '2.2.1', '2.3.7', '3.0.17', '3.1.11')
|
||||
# TARGET_VERSION - etcd release to be used (supported: '2.2.1', '2.3.7', '3.0.17', '3.1.12')
|
||||
# DATA_DIRECTORY - directory with etcd data
|
||||
#
|
||||
# The current etcd version and storage format is detected based on the
|
||||
@@ -28,7 +28,7 @@
|
||||
# The update workflow support the following upgrade steps:
|
||||
# - 2.2.1/etcd2 -> 2.3.7/etcd2
|
||||
# - 2.3.7/etcd2 -> 3.0.17/etcd2
|
||||
# - 3.0.17/etcd3 -> 3.1.11/etcd3
|
||||
# - 3.0.17/etcd3 -> 3.1.12/etcd3
|
||||
#
|
||||
# NOTE: The releases supported in this script has to match release binaries
|
||||
# present in the etcd image (to make this script work correctly).
|
||||
@@ -64,7 +64,7 @@ rollback_etcd3_minor_version() {
|
||||
echo "Starting etcd version ${START_VERSION} to capture rollback snapshot."
|
||||
if ! start_etcd; then
|
||||
echo "Unable to automatically downgrade etcd: starting etcd version ${START_VERSION} to capture rollback snapshot failed."
|
||||
echo "See https://coreos.com/etcd/docs/3.1.11/op-guide/recovery.html for manual downgrade options."
|
||||
echo "See https://coreos.com/etcd/docs/latest/op-guide/recovery.html for manual downgrade options."
|
||||
exit 1
|
||||
else
|
||||
ETCDCTL_API=3 ${ETCDCTL_CMD} snapshot --endpoints "http://127.0.0.1:${ETCD_PORT}" save "${SNAPSHOT_FILE}"
|
||||
@@ -138,7 +138,7 @@ fi
|
||||
# NOTE: SUPPORTED_VERSION has to match release binaries present in the
|
||||
# etcd image (to make this script work correctly).
|
||||
# We cannot use array since sh doesn't support it.
|
||||
SUPPORTED_VERSIONS_STRING="2.2.1 2.3.7 3.0.17 3.1.11"
|
||||
SUPPORTED_VERSIONS_STRING="2.2.1 2.3.7 3.0.17 3.1.12"
|
||||
SUPPORTED_VERSIONS=$(echo "${SUPPORTED_VERSIONS_STRING}" | tr " " "\n")
|
||||
|
||||
VERSION_FILE="version.txt"
|
||||
|
Reference in New Issue
Block a user