mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Update default etcd server to 3.3.15 for kubernetes 1.16
Change-Id: I68f1a5e5339d83077a1a9f312c4e6e33848886c5
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
dependencies:
 | 
					dependencies:
 | 
				
			||||||
  - name: "etcd"
 | 
					  - name: "etcd"
 | 
				
			||||||
    version: 3.3.10
 | 
					    version: 3.3.15
 | 
				
			||||||
    refPaths:
 | 
					    refPaths:
 | 
				
			||||||
    - path: cluster/gce/manifests/etcd.manifest
 | 
					    - path: cluster/gce/manifests/etcd.manifest
 | 
				
			||||||
      match: etcd_docker_tag|etcd_version
 | 
					      match: etcd_docker_tag|etcd_version
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,11 +35,11 @@ _CRI_TARBALL_ARCH_SHA256 = {
 | 
				
			|||||||
    "s390x": "8b7b5749cba88ef337997ae90aa04380e3cab2c040b44b505b2fcd691c4935e4",
 | 
					    "s390x": "8b7b5749cba88ef337997ae90aa04380e3cab2c040b44b505b2fcd691c4935e4",
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ETCD_VERSION = "3.3.10"
 | 
					ETCD_VERSION = "3.3.15"
 | 
				
			||||||
_ETCD_TARBALL_ARCH_SHA256 = {
 | 
					_ETCD_TARBALL_ARCH_SHA256 = {
 | 
				
			||||||
    "amd64": "1620a59150ec0a0124a65540e23891243feb2d9a628092fb1edcc23974724a45",
 | 
					    "amd64": "87e30dc472a48b775a9e764cb742a5df0a2844e7b82d12917d7ea489febbc8c8",
 | 
				
			||||||
    "arm64": "5ec97b0b872adce275b8130d19db314f7f2b803aeb24c4aae17a19e2d66853c4",
 | 
					    "arm64": "0cdacf1a5f8095322ee77b62ac5e79c3326a5166deb69f558214b110b312b4c0",
 | 
				
			||||||
    "ppc64le": "148fe96f0ec1813c5db9916199e96a913174304546bc8447a2d2f9fee4b8f6c2",
 | 
					    "ppc64le": "dcaa8d0ec1a117f6456778f3b9c7e685d4609c2a3c448afda1aa7a4232d0c481",
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Dependencies needed for a Kubernetes "release", e.g. building docker images,
 | 
					# Dependencies needed for a Kubernetes "release", e.g. building docker images,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -187,7 +187,7 @@ ENABLE_METADATA_AGENT="${KUBE_ENABLE_METADATA_AGENT:-none}"
 | 
				
			|||||||
# 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. k8s.gcr.io/etcd) and version (e.g. 3.3.10-1) if you need
 | 
					# Set etcd image (e.g. k8s.gcr.io/etcd) and version (e.g. 3.3.15-0) 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,4 +13,4 @@ spec:
 | 
				
			|||||||
  dnsPolicy: Default
 | 
					  dnsPolicy: Default
 | 
				
			||||||
  containers:
 | 
					  containers:
 | 
				
			||||||
  - name: etcd-empty-dir-cleanup
 | 
					  - name: etcd-empty-dir-cleanup
 | 
				
			||||||
    image: k8s.gcr.io/etcd-empty-dir-cleanup:3.3.10.1
 | 
					    image: k8s.gcr.io/etcd-empty-dir-cleanup:3.3.15.0
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,7 @@
 | 
				
			|||||||
"containers":[
 | 
					"containers":[
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
    "name": "etcd-container",
 | 
					    "name": "etcd-container",
 | 
				
			||||||
    "image": "{{ pillar.get('etcd_docker_repository', 'k8s.gcr.io/etcd') }}:{{ pillar.get('etcd_docker_tag', '3.3.10-1') }}",
 | 
					    "image": "{{ pillar.get('etcd_docker_repository', 'k8s.gcr.io/etcd') }}:{{ pillar.get('etcd_docker_tag', '3.3.15-0') }}",
 | 
				
			||||||
    "resources": {
 | 
					    "resources": {
 | 
				
			||||||
      "requests": {
 | 
					      "requests": {
 | 
				
			||||||
        "cpu": {{ cpulimit }}
 | 
					        "cpu": {{ cpulimit }}
 | 
				
			||||||
@@ -30,7 +30,7 @@
 | 
				
			|||||||
        "value": "{{ pillar.get('storage_backend', 'etcd3') }}"
 | 
					        "value": "{{ pillar.get('storage_backend', 'etcd3') }}"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      { "name": "TARGET_VERSION",
 | 
					      { "name": "TARGET_VERSION",
 | 
				
			||||||
        "value": "{{ pillar.get('etcd_version', '3.3.10') }}"
 | 
					        "value": "{{ pillar.get('etcd_version', '3.3.15') }}"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      { "name": "DATA_DIRECTORY",
 | 
					      { "name": "DATA_DIRECTORY",
 | 
				
			||||||
        "value": "/var/etcd/data{{ suffix }}"
 | 
					        "value": "/var/etcd/data{{ suffix }}"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -170,8 +170,8 @@ export KUBE_GCE_ENABLE_IP_ALIASES=true
 | 
				
			|||||||
export SECONDARY_RANGE_NAME="pods-default"
 | 
					export SECONDARY_RANGE_NAME="pods-default"
 | 
				
			||||||
export STORAGE_BACKEND="etcd3"
 | 
					export STORAGE_BACKEND="etcd3"
 | 
				
			||||||
export STORAGE_MEDIA_TYPE="application/vnd.kubernetes.protobuf"
 | 
					export STORAGE_MEDIA_TYPE="application/vnd.kubernetes.protobuf"
 | 
				
			||||||
export ETCD_IMAGE=3.3.10-1
 | 
					export ETCD_IMAGE=3.3.15-0
 | 
				
			||||||
export ETCD_VERSION=3.3.10
 | 
					export ETCD_VERSION=3.3.15
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Upgrade master with updated kube envs
 | 
					# Upgrade master with updated kube envs
 | 
				
			||||||
"${KUBE_ROOT}/cluster/gce/upgrade.sh" -M -l
 | 
					"${KUBE_ROOT}/cluster/gce/upgrade.sh" -M -l
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,13 +14,13 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
.PHONY:	build push
 | 
					.PHONY:	build push
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ETCD_VERSION = 3.3.10
 | 
					ETCD_VERSION = 3.3.15
 | 
				
			||||||
# Image should be pulled from k8s.gcr.io, which will auto-detect
 | 
					# Image should be pulled from k8s.gcr.io, which will auto-detect
 | 
				
			||||||
# region (us, eu, asia, ...) and pull from the closest.
 | 
					# region (us, eu, asia, ...) and pull from the closest.
 | 
				
			||||||
REGISTRY = k8s.gcr.io
 | 
					REGISTRY = k8s.gcr.io
 | 
				
			||||||
# Images should be pushed to staging-k8s.gcr.io.
 | 
					# Images should be pushed to staging-k8s.gcr.io.
 | 
				
			||||||
PUSH_REGISTRY = staging-k8s.gcr.io
 | 
					PUSH_REGISTRY = staging-k8s.gcr.io
 | 
				
			||||||
TAG = 3.3.10.0
 | 
					TAG = 3.3.15.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
clean:
 | 
					clean:
 | 
				
			||||||
	rm -rf etcdctl etcd-v$(ETCD_VERSION)-linux-amd64 etcd-v$(ETCD_VERSION)-linux-amd64.tar.gz
 | 
						rm -rf etcdctl etcd-v$(ETCD_VERSION)-linux-amd64 etcd-v$(ETCD_VERSION)-linux-amd64.tar.gz
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@
 | 
				
			|||||||
# Build the etcd image
 | 
					# Build the etcd image
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Usage:
 | 
					# Usage:
 | 
				
			||||||
# 	[BUNDLED_ETCD_VERSIONS=3.0.17 3.1.12 3.2.24 3.3.10] [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.15] [REGISTRY=k8s.gcr.io] [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 versions from here.
 | 
					# upgrades. Thus be careful when removing any versions from here.
 | 
				
			||||||
@@ -26,15 +26,15 @@
 | 
				
			|||||||
# Except from etcd-$(version) and etcdctl-$(version) binaries, we also
 | 
					# Except from etcd-$(version) and etcdctl-$(version) 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 version from $(BUNDLED_ETCD_VERSIONS).
 | 
					# 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.10
 | 
					BUNDLED_ETCD_VERSIONS?=3.0.17 3.1.12 3.2.24 3.3.15
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# LATEST_ETCD_VERSION identifies the most recent etcd version available.
 | 
					# LATEST_ETCD_VERSION identifies the most recent etcd version available.
 | 
				
			||||||
LATEST_ETCD_VERSION?=3.3.10
 | 
					LATEST_ETCD_VERSION?=3.3.15
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# REVISION provides a version number fo this image and all it's bundled
 | 
					# 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
 | 
					# artifacts. It should start at zero for each LATEST_ETCD_VERSION and increment
 | 
				
			||||||
# for each revision of this image at that etcd version.
 | 
					# for each revision of this image at that etcd version.
 | 
				
			||||||
REVISION?=2
 | 
					REVISION?=0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# IMAGE_TAG Uniquely identifies k8s.gcr.io/etcd docker image with a tag of the form "<etcd-version>-<revision>".
 | 
					# IMAGE_TAG Uniquely identifies k8s.gcr.io/etcd docker image with a tag of the form "<etcd-version>-<revision>".
 | 
				
			||||||
IMAGE_TAG=$(LATEST_ETCD_VERSION)-$(REVISION)
 | 
					IMAGE_TAG=$(LATEST_ETCD_VERSION)-$(REVISION)
 | 
				
			||||||
@@ -62,7 +62,7 @@ endif
 | 
				
			|||||||
# This option is for running docker manifest command
 | 
					# This option is for running docker manifest command
 | 
				
			||||||
export DOCKER_CLI_EXPERIMENTAL := enabled
 | 
					export DOCKER_CLI_EXPERIMENTAL := enabled
 | 
				
			||||||
# golang version should match the golang version from https://github.com/coreos/etcd/releases for the current ETCD_VERSION.
 | 
					# golang version should match the golang version from https://github.com/coreos/etcd/releases for the current ETCD_VERSION.
 | 
				
			||||||
GOLANG_VERSION?=1.10.4
 | 
					GOLANG_VERSION?=1.12.9
 | 
				
			||||||
GOARM?=7
 | 
					GOARM?=7
 | 
				
			||||||
TEMP_DIR:=$(shell mktemp -d)
 | 
					TEMP_DIR:=$(shell mktemp -d)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,7 +26,7 @@ server.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
`migrate` writes a `version.txt` file to track the "current" version
 | 
					`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
 | 
					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.3.10" )
 | 
					by the `TARGET_STORAGE` (e.g. "etcd3") and `TARGET_VERSION` (e.g. "3.3.15" )
 | 
				
			||||||
environment variables. If the persisted version differs from the target version,
 | 
					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
 | 
					`migrate-if-needed.sh` will migrate the data from the current to the target
 | 
				
			||||||
version.
 | 
					version.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,7 @@
 | 
				
			|||||||
# This script performs etcd upgrade based on the following environmental
 | 
					# This script performs etcd upgrade based on the following environmental
 | 
				
			||||||
# variables:
 | 
					# variables:
 | 
				
			||||||
# TARGET_STORAGE - API of etcd to be used (supported: 'etcd3')
 | 
					# 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.10")
 | 
					# TARGET_VERSION - etcd release to be used (supported: '3.0.17', '3.1.12', '3.2.24', "3.3.15")
 | 
				
			||||||
# DATA_DIRECTORY - directory with etcd data
 | 
					# DATA_DIRECTORY - directory with etcd data
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# The current etcd version and storage format is detected based on the
 | 
					# The current etcd version and storage format is detected based on the
 | 
				
			||||||
@@ -28,7 +28,7 @@
 | 
				
			|||||||
# The update workflow support the following upgrade steps:
 | 
					# The update workflow support the following upgrade steps:
 | 
				
			||||||
# - 3.0.17/etcd3 -> 3.1.12/etcd3
 | 
					# - 3.0.17/etcd3 -> 3.1.12/etcd3
 | 
				
			||||||
# - 3.1.12/etcd3 -> 3.2.24/etcd3
 | 
					# - 3.1.12/etcd3 -> 3.2.24/etcd3
 | 
				
			||||||
# - 3.2.24/etcd3 -> 3.3.10/etcd3
 | 
					# - 3.2.24/etcd3 -> 3.3.15/etcd3
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# NOTE: The releases supported in this script has to match release binaries
 | 
					# NOTE: The releases supported in this script has to match release binaries
 | 
				
			||||||
# present in the etcd image (to make this script work correctly).
 | 
					# present in the etcd image (to make this script work correctly).
 | 
				
			||||||
@@ -41,7 +41,7 @@ set -o nounset
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# NOTE: BUNDLED_VERSION has to match release binaries present in the
 | 
					# NOTE: BUNDLED_VERSION has to match release binaries present in the
 | 
				
			||||||
# etcd image (to make this script work correctly).
 | 
					# etcd image (to make this script work correctly).
 | 
				
			||||||
BUNDLED_VERSIONS="3.0.17, 3.1.12, 3.2.24, 3.3.10"
 | 
					BUNDLED_VERSIONS="3.0.17, 3.1.12, 3.2.24, 3.3.15"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ETCD_NAME="${ETCD_NAME:-etcd-$(hostname)}"
 | 
					ETCD_NAME="${ETCD_NAME:-etcd-$(hostname)}"
 | 
				
			||||||
if [ -z "${DATA_DIRECTORY:-}" ]; then
 | 
					if [ -z "${DATA_DIRECTORY:-}" ]; then
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -260,7 +260,7 @@ const (
 | 
				
			|||||||
	MinExternalEtcdVersion = "3.2.18"
 | 
						MinExternalEtcdVersion = "3.2.18"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// DefaultEtcdVersion indicates the default etcd version that kubeadm uses
 | 
						// DefaultEtcdVersion indicates the default etcd version that kubeadm uses
 | 
				
			||||||
	DefaultEtcdVersion = "3.3.10"
 | 
						DefaultEtcdVersion = "3.3.15"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// PauseVersion indicates the default pause image version for kubeadm
 | 
						// PauseVersion indicates the default pause image version for kubeadm
 | 
				
			||||||
	PauseVersion = "3.1"
 | 
						PauseVersion = "3.1"
 | 
				
			||||||
@@ -424,8 +424,8 @@ var (
 | 
				
			|||||||
		13: "3.2.24",
 | 
							13: "3.2.24",
 | 
				
			||||||
		14: "3.3.10",
 | 
							14: "3.3.10",
 | 
				
			||||||
		15: "3.3.10",
 | 
							15: "3.3.10",
 | 
				
			||||||
		16: "3.3.10",
 | 
							16: "3.3.15",
 | 
				
			||||||
		17: "3.3.10",
 | 
							17: "3.3.15",
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// KubeadmCertsClusterRoleName sets the name for the ClusterRole that allows
 | 
						// KubeadmCertsClusterRoleName sets the name for the ClusterRole that allows
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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.3.10}
 | 
					ETCD_VERSION=${ETCD_VERSION:-3.3.15}
 | 
				
			||||||
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}
 | 
				
			||||||
export KUBE_INTEGRATION_ETCD_URL="http://${ETCD_HOST}:${ETCD_PORT}"
 | 
					export KUBE_INTEGRATION_ETCD_URL="http://${ETCD_HOST}:${ETCD_PORT}"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,4 +25,4 @@ spec:
 | 
				
			|||||||
        imagePullPolicy: Never
 | 
					        imagePullPolicy: Never
 | 
				
			||||||
        args: [ "--etcd-servers=http://localhost:2379" ]
 | 
					        args: [ "--etcd-servers=http://localhost:2379" ]
 | 
				
			||||||
      - name: etcd
 | 
					      - name: etcd
 | 
				
			||||||
        image: quay.io/coreos/etcd:v3.3.10
 | 
					        image: quay.io/coreos/etcd:v3.3.15
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -32,7 +32,7 @@ import (
 | 
				
			|||||||
	e2essh "k8s.io/kubernetes/test/e2e/framework/ssh"
 | 
						e2essh "k8s.io/kubernetes/test/e2e/framework/ssh"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const etcdImage = "3.3.10-1"
 | 
					const etcdImage = "3.3.15-0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// EtcdUpgrade upgrades etcd on GCE.
 | 
					// EtcdUpgrade upgrades etcd on GCE.
 | 
				
			||||||
func EtcdUpgrade(targetStorage, targetVersion string) error {
 | 
					func EtcdUpgrade(targetStorage, targetVersion string) error {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -217,7 +217,7 @@ func initImageConfigs() map[int]Config {
 | 
				
			|||||||
	configs[Dnsutils] = Config{e2eRegistry, "dnsutils", "1.1"}
 | 
						configs[Dnsutils] = Config{e2eRegistry, "dnsutils", "1.1"}
 | 
				
			||||||
	configs[DebianBase] = Config{googleContainerRegistry, "debian-base", "0.4.1"}
 | 
						configs[DebianBase] = Config{googleContainerRegistry, "debian-base", "0.4.1"}
 | 
				
			||||||
	configs[EchoServer] = Config{e2eRegistry, "echoserver", "2.2"}
 | 
						configs[EchoServer] = Config{e2eRegistry, "echoserver", "2.2"}
 | 
				
			||||||
	configs[Etcd] = Config{gcRegistry, "etcd", "3.3.10"}
 | 
						configs[Etcd] = Config{gcRegistry, "etcd", "3.3.15"}
 | 
				
			||||||
	configs[GBFrontend] = Config{sampleRegistry, "gb-frontend", "v6"}
 | 
						configs[GBFrontend] = Config{sampleRegistry, "gb-frontend", "v6"}
 | 
				
			||||||
	configs[Httpd] = Config{dockerLibraryRegistry, "httpd", "2.4.38-alpine"}
 | 
						configs[Httpd] = Config{dockerLibraryRegistry, "httpd", "2.4.38-alpine"}
 | 
				
			||||||
	configs[HttpdNew] = Config{dockerLibraryRegistry, "httpd", "2.4.39-alpine"}
 | 
						configs[HttpdNew] = Config{dockerLibraryRegistry, "httpd", "2.4.39-alpine"}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user