mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 13:50:01 +00:00 
			
		
		
		
	Update etcd server version to 3.2.13
This commit is contained in:
		| @@ -71,7 +71,7 @@ RUN go get golang.org/x/tools/cmd/cover \ | |||||||
|             golang.org/x/tools/cmd/goimports |             golang.org/x/tools/cmd/goimports | ||||||
|  |  | ||||||
| # Download and symlink etcd. We need this for our integration tests. | # Download and symlink etcd. We need this for our integration tests. | ||||||
| RUN export ETCD_VERSION=v3.1.10; \ | RUN export ETCD_VERSION=v3.2.14; \ | ||||||
|   mkdir -p /usr/local/src/etcd \ |   mkdir -p /usr/local/src/etcd \ | ||||||
|   && cd /usr/local/src/etcd \ |   && cd /usr/local/src/etcd \ | ||||||
|   && curl -fsSL https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz | tar -xz \ |   && curl -fsSL https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz | tar -xz \ | ||||||
|   | |||||||
| @@ -1 +1 @@ | |||||||
| v1.9.3-1 | v1.9.3-2 | ||||||
|   | |||||||
| @@ -19,12 +19,12 @@ http_archive( | |||||||
|     urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"], |     urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"], | ||||||
| ) | ) | ||||||
|  |  | ||||||
| ETCD_VERSION = "3.1.10" | ETCD_VERSION = "3.2.14" | ||||||
|  |  | ||||||
| new_http_archive( | new_http_archive( | ||||||
|     name = "com_coreos_etcd", |     name = "com_coreos_etcd", | ||||||
|     build_file = "third_party/etcd.BUILD", |     build_file = "third_party/etcd.BUILD", | ||||||
|     sha256 = "2d335f298619c6fb02b1124773a56966e448ad9952b26fea52909da4fe80d2be", |     sha256 = "f77398f558ff19b65a0bf978b47868e03683f27090c56c054415666b1d78bf42", | ||||||
|     strip_prefix = "etcd-v%s-linux-amd64" % ETCD_VERSION, |     strip_prefix = "etcd-v%s-linux-amd64" % ETCD_VERSION, | ||||||
|     urls = ["https://github.com/coreos/etcd/releases/download/v%s/etcd-v%s-linux-amd64.tar.gz" % (ETCD_VERSION, ETCD_VERSION)], |     urls = ["https://github.com/coreos/etcd/releases/download/v%s/etcd-v%s-linux-amd64.tar.gz" % (ETCD_VERSION, ETCD_VERSION)], | ||||||
| ) | ) | ||||||
|   | |||||||
| @@ -149,7 +149,7 @@ ENABLE_METRICS_SERVER="${KUBE_ENABLE_METRICS_SERVER:-true}" | |||||||
| # Useful for scheduling heapster in large clusters with nodes of small size. | # Useful for scheduling heapster in large clusters with nodes of small size. | ||||||
| HEAPSTER_MACHINE_TYPE="${HEAPSTER_MACHINE_TYPE:-}" | HEAPSTER_MACHINE_TYPE="${HEAPSTER_MACHINE_TYPE:-}" | ||||||
|  |  | ||||||
| # Set etcd image (e.g. gcr.io/google_containers/etcd) and version (e.g. 3.1.10) if you need | # Set etcd image (e.g. gcr.io/google_containers/etcd) and version (e.g. 3.2.14) if you need | ||||||
| # non-default version. | # non-default version. | ||||||
| ETCD_IMAGE="${TEST_ETCD_IMAGE:-}" | ETCD_IMAGE="${TEST_ETCD_IMAGE:-}" | ||||||
| ETCD_DOCKER_REPOSITORY="${TEST_ETCD_DOCKER_REPOSITORY:-}" | ETCD_DOCKER_REPOSITORY="${TEST_ETCD_DOCKER_REPOSITORY:-}" | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ | |||||||
| "containers":[ | "containers":[ | ||||||
|     { |     { | ||||||
|     "name": "etcd-container", |     "name": "etcd-container", | ||||||
|     "image": "{{ pillar.get('etcd_docker_repository', 'gcr.io/google_containers/etcd') }}:{{ pillar.get('etcd_docker_tag', '3.1.10') }}", |     "image": "{{ pillar.get('etcd_docker_repository', 'gcr.io/google_containers/etcd') }}:{{ pillar.get('etcd_docker_tag', '3.2.14') }}", | ||||||
|     "resources": { |     "resources": { | ||||||
|       "requests": { |       "requests": { | ||||||
|         "cpu": {{ cpulimit }} |         "cpu": {{ cpulimit }} | ||||||
| @@ -22,14 +22,14 @@ | |||||||
|     "command": [ |     "command": [ | ||||||
|               "/bin/sh", |               "/bin/sh", | ||||||
|               "-c", |               "-c", | ||||||
|               "if [ -e /usr/local/bin/migrate-if-needed.sh ]; then /usr/local/bin/migrate-if-needed.sh 1>>/var/log/etcd{{ suffix }}.log 2>&1; fi; exec /usr/local/bin/etcd --name etcd-{{ hostname }} --listen-peer-urls {{ etcd_protocol }}://{{ hostname }}:{{ server_port }} --initial-advertise-peer-urls {{ etcd_protocol }}://{{ hostname }}:{{ server_port }} --advertise-client-urls http://127.0.0.1:{{ port }} --listen-client-urls http://127.0.0.1:{{ port }} {{ quota_bytes }} --data-dir /var/etcd/data{{ suffix }} --initial-cluster-state {{ cluster_state }} --initial-cluster {{ etcd_cluster }} {{ etcd_creds }} 1>>/var/log/etcd{{ suffix }}.log 2>&1" |               "if [ -e /usr/local/bin/migrate-if-needed.sh ]; then /usr/local/bin/migrate-if-needed.sh 1>>/var/log/etcd{{ suffix }}.log 2>&1; fi; exec /usr/local/bin/etcd --name etcd-{{ hostname }} --listen-peer-urls {{ etcd_protocol }}://127.0.0.1:{{ server_port }} --initial-advertise-peer-urls {{ etcd_protocol }}://{{ hostname }}:{{ server_port }} --advertise-client-urls http://127.0.0.1:{{ port }} --listen-client-urls http://127.0.0.1:{{ port }} {{ quota_bytes }} --data-dir /var/etcd/data{{ suffix }} --initial-cluster-state {{ cluster_state }} --initial-cluster {{ etcd_cluster }} {{ etcd_creds }} 1>>/var/log/etcd{{ suffix }}.log 2>&1" | ||||||
|             ], |             ], | ||||||
|     "env": [ |     "env": [ | ||||||
|       { "name": "TARGET_STORAGE", |       { "name": "TARGET_STORAGE", | ||||||
|         "value": "{{ pillar.get('storage_backend', 'etcd3') }}" |         "value": "{{ pillar.get('storage_backend', 'etcd3') }}" | ||||||
|       }, |       }, | ||||||
|       { "name": "TARGET_VERSION", |       { "name": "TARGET_VERSION", | ||||||
|         "value": "{{ pillar.get('etcd_version', '3.1.10') }}" |         "value": "{{ pillar.get('etcd_version', '3.2.14') }}" | ||||||
|       }, |       }, | ||||||
|       { "name": "DATA_DIRECTORY", |       { "name": "DATA_DIRECTORY", | ||||||
|         "value": "/var/etcd/data{{ suffix }}" |         "value": "/var/etcd/data{{ suffix }}" | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ | |||||||
| # Build the etcd image | # Build the etcd image | ||||||
| # | # | ||||||
| # Usage: | # Usage: | ||||||
| # 	[TAGS=2.2.1 2.3.7 3.0.17 3.1.11] [REGISTRY=gcr.io/google_containers] [ARCH=amd64] [BASEIMAGE=busybox] make (build|push) | # 	[TAGS=2.2.1 2.3.7 3.0.17 3.1.11 3.2.14] [REGISTRY=gcr.io/google_containers] [ARCH=amd64] [BASEIMAGE=busybox] make (build|push) | ||||||
|  |  | ||||||
| # The image contains different etcd versions to simplify | # The image contains different etcd versions to simplify | ||||||
| # upgrades. Thus be careful when removing any tag from here. | # upgrades. Thus be careful when removing any tag from here. | ||||||
| @@ -26,11 +26,12 @@ | |||||||
| # Except from etcd-$(tag) and etcdctl-$(tag) binaries, we also | # Except from etcd-$(tag) and etcdctl-$(tag) binaries, we also | ||||||
| # need etcd and etcdctl binaries for backward compatibility reasons. | # need etcd and etcdctl binaries for backward compatibility reasons. | ||||||
| # That binary will be set to the last tag from $(TAGS). | # That binary will be set to the last tag from $(TAGS). | ||||||
| TAGS?=2.2.1 2.3.7 3.0.17 3.1.11 | TAGS?=2.2.1 2.3.7 3.0.17 3.1.11 3.2.14 | ||||||
| REGISTRY_TAG?=3.1.11 | REGISTRY_TAG?=3.2.14 | ||||||
| ARCH?=amd64 | ARCH?=amd64 | ||||||
| REGISTRY?=gcr.io/google_containers | REGISTRY?=gcr.io/google_containers | ||||||
| GOLANG_VERSION?=1.7.6 | # 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 | GOARM=7 | ||||||
| TEMP_DIR:=$(shell mktemp -d) | TEMP_DIR:=$(shell mktemp -d) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -168,7 +168,7 @@ const ( | |||||||
| 	MinExternalEtcdVersion = "3.0.14" | 	MinExternalEtcdVersion = "3.0.14" | ||||||
|  |  | ||||||
| 	// DefaultEtcdVersion indicates the default etcd version that kubeadm uses | 	// DefaultEtcdVersion indicates the default etcd version that kubeadm uses | ||||||
| 	DefaultEtcdVersion = "3.1.10" | 	DefaultEtcdVersion = "3.2.14" | ||||||
|  |  | ||||||
| 	// Etcd defines variable used internally when referring to etcd component | 	// Etcd defines variable used internally when referring to etcd component | ||||||
| 	Etcd = "etcd" | 	Etcd = "etcd" | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ | |||||||
|  |  | ||||||
| # A set of helpers for starting/running etcd for tests | # A set of helpers for starting/running etcd for tests | ||||||
|  |  | ||||||
| ETCD_VERSION=${ETCD_VERSION:-3.1.10} | ETCD_VERSION=${ETCD_VERSION:-3.2.14} | ||||||
| ETCD_HOST=${ETCD_HOST:-127.0.0.1} | ETCD_HOST=${ETCD_HOST:-127.0.0.1} | ||||||
| ETCD_PORT=${ETCD_PORT:-2379} | ETCD_PORT=${ETCD_PORT:-2379} | ||||||
|  |  | ||||||
|   | |||||||
| @@ -23,4 +23,4 @@ spec: | |||||||
|         - "--etcd-servers=http://localhost:2379" |         - "--etcd-servers=http://localhost:2379" | ||||||
|         - "--audit-log-path=-" |         - "--audit-log-path=-" | ||||||
|       - name: etcd |       - name: etcd | ||||||
|         image: quay.io/coreos/etcd:v3.1.10 |         image: quay.io/coreos/etcd:v3.2.14 | ||||||
|   | |||||||
| @@ -21,4 +21,4 @@ spec: | |||||||
|         imagePullPolicy: Never |         imagePullPolicy: Never | ||||||
|         command: [ "/kube-sample-apiserver", "--etcd-servers=http://localhost:2379" ] |         command: [ "/kube-sample-apiserver", "--etcd-servers=http://localhost:2379" ] | ||||||
|       - name: etcd |       - name: etcd | ||||||
|         image: quay.io/coreos/etcd:v3.1.10 |         image: quay.io/coreos/etcd:v3.2.14 | ||||||
|   | |||||||
| @@ -133,7 +133,7 @@ func TestSampleAPIServer(f *framework.Framework, image string) { | |||||||
|  |  | ||||||
| 	// kubectl create -f deploy.yaml | 	// kubectl create -f deploy.yaml | ||||||
| 	deploymentName := "sample-apiserver-deployment" | 	deploymentName := "sample-apiserver-deployment" | ||||||
| 	etcdImage := "quay.io/coreos/etcd:v3.1.10" | 	etcdImage := "quay.io/coreos/etcd:v3.2.14" | ||||||
| 	podLabels := map[string]string{"app": "sample-apiserver", "apiserver": "true"} | 	podLabels := map[string]string{"app": "sample-apiserver", "apiserver": "true"} | ||||||
| 	replicas := int32(1) | 	replicas := int32(1) | ||||||
| 	zero := int64(0) | 	zero := int64(0) | ||||||
|   | |||||||
| @@ -67,7 +67,7 @@ func etcdUpgradeGCE(target_storage, target_version string) error { | |||||||
| 		os.Environ(), | 		os.Environ(), | ||||||
| 		"TEST_ETCD_VERSION="+target_version, | 		"TEST_ETCD_VERSION="+target_version, | ||||||
| 		"STORAGE_BACKEND="+target_storage, | 		"STORAGE_BACKEND="+target_storage, | ||||||
| 		"TEST_ETCD_IMAGE=3.1.10") | 		"TEST_ETCD_IMAGE=3.2.14") | ||||||
|  |  | ||||||
| 	_, _, err := RunCmdEnv(env, gceUpgradeScript(), "-l", "-M") | 	_, _, err := RunCmdEnv(env, gceUpgradeScript(), "-l", "-M") | ||||||
| 	return err | 	return err | ||||||
| @@ -103,7 +103,7 @@ func masterUpgradeGCE(rawV string, enableKubeProxyDaemonSet bool) error { | |||||||
| 		env = append(env, | 		env = append(env, | ||||||
| 			"TEST_ETCD_VERSION="+TestContext.EtcdUpgradeVersion, | 			"TEST_ETCD_VERSION="+TestContext.EtcdUpgradeVersion, | ||||||
| 			"STORAGE_BACKEND="+TestContext.EtcdUpgradeStorage, | 			"STORAGE_BACKEND="+TestContext.EtcdUpgradeStorage, | ||||||
| 			"TEST_ETCD_IMAGE=3.1.10") | 			"TEST_ETCD_IMAGE=3.2.14") | ||||||
| 	} else { | 	} else { | ||||||
| 		// In e2e tests, we skip the confirmation prompt about | 		// In e2e tests, we skip the confirmation prompt about | ||||||
| 		// implicit etcd upgrades to simulate the user entering "y". | 		// implicit etcd upgrades to simulate the user entering "y". | ||||||
|   | |||||||
| @@ -55,7 +55,7 @@ SERVICE_CLUSTER_IP_RANGE="${SERVICE_CLUSTER_IP_RANGE:-}" | |||||||
| EVENT_PD="${EVENT_PD:-}" | EVENT_PD="${EVENT_PD:-}" | ||||||
|  |  | ||||||
| # Etcd related variables. | # Etcd related variables. | ||||||
| ETCD_IMAGE="${ETCD_IMAGE:-3.1.10}" | ETCD_IMAGE="${ETCD_IMAGE:-3.2.14}" | ||||||
| ETCD_VERSION="${ETCD_VERSION:-}" | ETCD_VERSION="${ETCD_VERSION:-}" | ||||||
|  |  | ||||||
| # Controller-manager related variables. | # Controller-manager related variables. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user