Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default etcd server to 3.4.7 in k8s v1.19 #89895

Merged
merged 1 commit into from Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/dependencies.yaml
@@ -1,6 +1,6 @@
dependencies:
- name: "etcd"
version: 3.4.4
version: 3.4.7
refPaths:
- path: cluster/gce/manifests/etcd.manifest
match: etcd_docker_tag|etcd_version
Expand Down
8 changes: 4 additions & 4 deletions build/workspace.bzl
Expand Up @@ -38,11 +38,11 @@ _CRI_TARBALL_ARCH_SHA256 = {
"windows-amd64": "e18150d5546d3ddf6b165bd9aec0f65c18aacf75b94fb28bb26bfc0238f07b28",
}

ETCD_VERSION = "3.4.4"
ETCD_VERSION = "3.4.7"
_ETCD_TARBALL_ARCH_SHA256 = {
"amd64": "35abe668022073dfe6239aa42fd15ded9810f7ccee281af0b9d0646dd270de47",
"arm64": "52444314c01f7dad7d319a7b87ea7a5a7e48af96584c48639922a4b2f32329a4",
"ppc64le": "b7e43e08e123d0b30c7fddc8b903c0d7c8de49e28db8c87cf5cc4a24b68a715d",
"amd64": "4ad86e663b63feb4855e1f3a647e719d6d79cf6306410c52b7f280fa56f8eb6b",
"arm64": "b5bf03629277e2231651ecb3f247bf843a974172208f29b7fc38e3f63f6676fc",
"ppc64le": "931631368ee962a37b22754c9a64baba2535207afcbd42efbdacc44fb48398bf",
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked with SHA256SUMS in https://github.com/etcd-io/etcd/releases/tag/v3.4.7, they match.


# Dependencies needed for a Kubernetes "release", e.g. building docker images,
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/config-test.sh
Expand Up @@ -192,7 +192,7 @@ HEAPSTER_MACHINE_TYPE="${HEAPSTER_MACHINE_TYPE:-}"
NUM_ADDITIONAL_NODES="${NUM_ADDITIONAL_NODES:-}"
ADDITIONAL_MACHINE_TYPE="${ADDITIONAL_MACHINE_TYPE:-}"

# Set etcd image (e.g. k8s.gcr.io/etcd) and version (e.g. 3.4.4-0) if you need
# Set etcd image (e.g. k8s.gcr.io/etcd) and version (e.g. 3.4.7-0) if you need
# non-default version.
ETCD_IMAGE="${TEST_ETCD_IMAGE:-}"
ETCD_DOCKER_REPOSITORY="${TEST_ETCD_DOCKER_REPOSITORY:-}"
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/manifests/etcd-empty-dir-cleanup.yaml
Expand Up @@ -13,4 +13,4 @@ spec:
dnsPolicy: Default
containers:
- name: etcd-empty-dir-cleanup
image: k8s.gcr.io/etcd-empty-dir-cleanup:3.4.4.0
image: k8s.gcr.io/etcd-empty-dir-cleanup:3.4.7.0
4 changes: 2 additions & 2 deletions cluster/gce/manifests/etcd.manifest
Expand Up @@ -14,7 +14,7 @@
"containers":[
{
"name": "etcd-container",
"image": "{{ pillar.get('etcd_docker_repository', 'k8s.gcr.io/etcd') }}:{{ pillar.get('etcd_docker_tag', '3.4.4-0') }}",
"image": "{{ pillar.get('etcd_docker_repository', 'k8s.gcr.io/etcd') }}:{{ pillar.get('etcd_docker_tag', '3.4.7-0') }}",
"resources": {
"requests": {
"cpu": {{ cpulimit }}
Expand All @@ -30,7 +30,7 @@
"value": "{{ pillar.get('storage_backend', 'etcd3') }}"
},
{ "name": "TARGET_VERSION",
"value": "{{ pillar.get('etcd_version', '3.4.4') }}"
"value": "{{ pillar.get('etcd_version', '3.4.7') }}"
},
{ "name": "DATA_DIRECTORY",
"value": "/var/etcd/data{{ suffix }}"
Expand Down
4 changes: 2 additions & 2 deletions cluster/gce/upgrade-aliases.sh
Expand Up @@ -170,8 +170,8 @@ export KUBE_GCE_ENABLE_IP_ALIASES=true
export SECONDARY_RANGE_NAME="pods-default"
export STORAGE_BACKEND="etcd3"
export STORAGE_MEDIA_TYPE="application/vnd.kubernetes.protobuf"
export ETCD_IMAGE=3.4.4-0
export ETCD_VERSION=3.4.4
export ETCD_IMAGE=3.4.7-0
export ETCD_VERSION=3.4.7

# Upgrade master with updated kube envs
"${KUBE_ROOT}/cluster/gce/upgrade.sh" -M -l
Expand Down
4 changes: 2 additions & 2 deletions cluster/images/etcd-empty-dir-cleanup/Makefile
Expand Up @@ -14,13 +14,13 @@

.PHONY: build push

ETCD_VERSION = 3.4.4
ETCD_VERSION = 3.4.7
# 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.4.4.0
TAG = 3.4.7.0

clean:
rm -rf etcdctl etcd-v$(ETCD_VERSION)-linux-amd64 etcd-v$(ETCD_VERSION)-linux-amd64.tar.gz
Expand Down
8 changes: 4 additions & 4 deletions cluster/images/etcd/Makefile
Expand Up @@ -15,7 +15,7 @@
# Build the etcd image
#
# Usage:
# [BUNDLED_ETCD_VERSIONS=3.0.17 3.1.12 3.2.24 3.3.17 3.4.4] [REGISTRY=k8s.gcr.io] [ARCH=amd64] [BASEIMAGE=busybox] make (build|push)
# [BUNDLED_ETCD_VERSIONS=3.0.17 3.1.12 3.2.24 3.3.17 3.4.7] [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 versions from here.
Expand All @@ -26,10 +26,10 @@
# Except from etcd-$(version) and etcdctl-$(version) binaries, we also
# need etcd and etcdctl binaries for backward compatibility reasons.
# That binary will be set to the last version from $(BUNDLED_ETCD_VERSIONS).
BUNDLED_ETCD_VERSIONS?=3.0.17 3.1.12 3.2.24 3.3.17 3.4.4
BUNDLED_ETCD_VERSIONS?=3.0.17 3.1.12 3.2.24 3.3.17 3.4.7

# LATEST_ETCD_VERSION identifies the most recent etcd version available.
LATEST_ETCD_VERSION?=3.4.4
LATEST_ETCD_VERSION?=3.4.7

# REVISION provides a version number fo this image and all it's bundled
# artifacts. It should start at zero for each LATEST_ETCD_VERSION and increment
Expand Down Expand Up @@ -62,7 +62,7 @@ endif
# This option is for running docker manifest command
export DOCKER_CLI_EXPERIMENTAL := enabled
# golang version should match the golang version from https://github.com/coreos/etcd/releases for the current ETCD_VERSION.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized the golang version can be found from https://github.com/etcd-io/etcd/blob/master/CHANGELOG-3.4.md#go-1, instead of https://github.com/coreos/etcd/releases, could we update the comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually couldn't find any info on golang version from https://github.com/coreos/etcd/releases. On the other hand, etcd's changelog is manually updated, and it is not always guaranteed to have an entry for golang version for a patch release. The most reliable way would be to download the official etcd release and run etcd --version. I feel like we can update the comment when we update etcd version next time. I prefer we get this PR merged sooner so that we have longer soak time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM.

GOLANG_VERSION?=1.12.12
GOLANG_VERSION?=1.12.17
GOARM?=7
TEMP_DIR:=$(shell mktemp -d)

Expand Down
2 changes: 1 addition & 1 deletion cluster/images/etcd/README.md
Expand Up @@ -26,7 +26,7 @@ server.

`migrate` writes a `version.txt` file to track the "current" version
of etcd that was used to persist data to disk. A "target" version may also be provided
by the `TARGET_STORAGE` (e.g. "etcd3") and `TARGET_VERSION` (e.g. "3.4.4" )
by the `TARGET_STORAGE` (e.g. "etcd3") and `TARGET_VERSION` (e.g. "3.4.7" )
environment variables. If the persisted version differs from the target version,
`migrate-if-needed.sh` will migrate the data from the current to the target
version.
Expand Down
6 changes: 3 additions & 3 deletions cluster/images/etcd/migrate-if-needed.sh
Expand Up @@ -19,7 +19,7 @@
# variables:
# TARGET_STORAGE - API of etcd to be used (supported: 'etcd3')
# TARGET_VERSION - etcd release to be used (supported: '3.0.17', '3.1.12',
# '3.2.24', "3.3.17", "3.4.4")
# '3.2.24', "3.3.17", "3.4.7")
# DATA_DIRECTORY - directory with etcd data
#
# The current etcd version and storage format is detected based on the
Expand All @@ -30,7 +30,7 @@
# - 3.0.17/etcd3 -> 3.1.12/etcd3
# - 3.1.12/etcd3 -> 3.2.24/etcd3
# - 3.2.24/etcd3 -> 3.3.17/etcd3
# - 3.3.17/etcd3 -> 3.4.4/etcd3
# - 3.3.17/etcd3 -> 3.4.7/etcd3
#
# NOTE: The releases supported in this script has to match release binaries
# present in the etcd image (to make this script work correctly).
Expand All @@ -43,7 +43,7 @@ set -o nounset

# NOTE: BUNDLED_VERSION has to match release binaries present in the
# etcd image (to make this script work correctly).
BUNDLED_VERSIONS="3.0.17, 3.1.12, 3.2.24, 3.3.17, 3.4.4"
BUNDLED_VERSIONS="3.0.17, 3.1.12, 3.2.24, 3.3.17, 3.4.7"

ETCD_NAME="${ETCD_NAME:-etcd-$(hostname)}"
if [ -z "${DATA_DIRECTORY:-}" ]; then
Expand Down
4 changes: 2 additions & 2 deletions cmd/kubeadm/app/constants/constants.go
Expand Up @@ -265,7 +265,7 @@ const (
MinExternalEtcdVersion = "3.2.18"

// DefaultEtcdVersion indicates the default etcd version that kubeadm uses
DefaultEtcdVersion = "3.4.4-0"
DefaultEtcdVersion = "3.4.7-0"

// Etcd defines variable used internally when referring to etcd component
Etcd = "etcd"
Expand Down Expand Up @@ -442,7 +442,7 @@ var (
16: "3.3.17-0",
17: "3.4.3-0",
18: "3.4.3-0",
19: "3.4.4-0",
19: "3.4.7-0",
}

// KubeadmCertsClusterRoleName sets the name for the ClusterRole that allows
Expand Down
2 changes: 1 addition & 1 deletion hack/lib/etcd.sh
Expand Up @@ -16,7 +16,7 @@

# A set of helpers for starting/running etcd for tests

ETCD_VERSION=${ETCD_VERSION:-3.4.4}
ETCD_VERSION=${ETCD_VERSION:-3.4.7}
ETCD_HOST=${ETCD_HOST:-127.0.0.1}
ETCD_PORT=${ETCD_PORT:-2379}
export KUBE_INTEGRATION_ETCD_URL="http://${ETCD_HOST}:${ETCD_PORT}"
Expand Down
Expand Up @@ -26,4 +26,4 @@ spec:
imagePullPolicy: Never
args: [ "--etcd-servers=http://localhost:2379" ]
- name: etcd
image: quay.io/coreos/etcd:v3.4.4
image: quay.io/coreos/etcd:v3.4.7
2 changes: 1 addition & 1 deletion test/e2e/framework/nodes_util.go
Expand Up @@ -34,7 +34,7 @@ import (
e2essh "k8s.io/kubernetes/test/e2e/framework/ssh"
)

const etcdImage = "3.4.4-0"
const etcdImage = "3.4.7-0"

// EtcdUpgrade upgrades etcd on GCE.
func EtcdUpgrade(targetStorage, targetVersion string) error {
Expand Down
2 changes: 1 addition & 1 deletion test/utils/image/manifest.go
Expand Up @@ -216,7 +216,7 @@ func initImageConfigs() map[int]Config {
configs[CudaVectorAdd] = Config{e2eRegistry, "cuda-vector-add", "1.0"}
configs[CudaVectorAdd2] = Config{e2eRegistry, "cuda-vector-add", "2.0"}
configs[EchoServer] = Config{e2eRegistry, "echoserver", "2.2"}
configs[Etcd] = Config{gcRegistry, "etcd", "3.4.4"}
configs[Etcd] = Config{gcRegistry, "etcd", "3.4.7"}
configs[GlusterDynamicProvisioner] = Config{dockerGluster, "glusterdynamic-provisioner", "v1.0"}
configs[Httpd] = Config{dockerLibraryRegistry, "httpd", "2.4.38-alpine"}
configs[HttpdNew] = Config{dockerLibraryRegistry, "httpd", "2.4.39-alpine"}
Expand Down