diff --git a/build/build-image/cross/Dockerfile b/build/build-image/cross/Dockerfile index 6b7db4fc10d..15823fd1760 100644 --- a/build/build-image/cross/Dockerfile +++ b/build/build-image/cross/Dockerfile @@ -71,7 +71,7 @@ RUN go get golang.org/x/tools/cmd/cover \ golang.org/x/tools/cmd/goimports # Download and symlink etcd. We need this for our integration tests. -RUN export ETCD_VERSION=v3.0.17; \ +RUN export ETCD_VERSION=v3.1.10; \ mkdir -p /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 \ diff --git a/build/build-image/cross/VERSION b/build/build-image/cross/VERSION index 25308d3ee1e..e331872b28f 100644 --- a/build/build-image/cross/VERSION +++ b/build/build-image/cross/VERSION @@ -1 +1 @@ -v1.8.3-2 +v1.8.3-3 diff --git a/build/root/WORKSPACE b/build/root/WORKSPACE index 6b5fa03c64c..c430239209d 100644 --- a/build/root/WORKSPACE +++ b/build/root/WORKSPACE @@ -12,12 +12,12 @@ http_archive( urls = ["https://github.com/kubernetes/repo-infra/archive/0aafaab9e158d3628804242c6a9c4dd3eb8bce1f.tar.gz"], ) -ETCD_VERSION = "3.0.17" +ETCD_VERSION = "3.1.10" new_http_archive( name = "com_coreos_etcd", build_file = "third_party/etcd.BUILD", - sha256 = "274c46a7f8d26f7ae99d6880610f54933cbcf7f3beafa19236c52eb5df8c7a0b", + sha256 = "2d335f298619c6fb02b1124773a56966e448ad9952b26fea52909da4fe80d2be", 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)], ) diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index ba27d84e38a..b4e7873cabb 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -143,7 +143,7 @@ ENABLE_METRICS_SERVER="${KUBE_ENABLE_METRICS_SERVER:-true}" # Useful for scheduling heapster in large clusters with nodes of small size. HEAPSTER_MACHINE_TYPE="${HEAPSTER_MACHINE_TYPE:-}" -# Set etcd image (e.g. 3.0.17-alpha.1) and version (e.g. 3.0.17) if you need +# Set etcd image (e.g. gcr.io/google_containers/etcd) and version (e.g. 3.1.10) if you need # non-default version. ETCD_IMAGE="${TEST_ETCD_IMAGE:-}" ETCD_VERSION="${TEST_ETCD_VERSION:-}" diff --git a/cluster/images/etcd/Makefile b/cluster/images/etcd/Makefile index de9f2d39206..890fc2d8a0d 100644 --- a/cluster/images/etcd/Makefile +++ b/cluster/images/etcd/Makefile @@ -15,7 +15,7 @@ # Build the etcd image # # Usage: -# [TAGS=2.2.1 2.3.7 3.0.17] [REGISTRY=gcr.io/google_containers] [ARCH=amd64] [BASEIMAGE=busybox] make (build|push) +# [TAGS=2.2.1 2.3.7 3.0.17 3.1.10] [REGISTRY=gcr.io/google_containers] [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,8 +26,8 @@ # 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 -REGISTRY_TAG?=3.0.17 +TAGS?=2.2.1 2.3.7 3.0.17 3.1.10 +REGISTRY_TAG?=3.1.10 ARCH?=amd64 REGISTRY?=gcr.io/google_containers GOLANG_VERSION?=1.7.6 diff --git a/cluster/kubemark/gce/config-default.sh b/cluster/kubemark/gce/config-default.sh index ee4b6f4e713..1e818256c38 100644 --- a/cluster/kubemark/gce/config-default.sh +++ b/cluster/kubemark/gce/config-default.sh @@ -48,7 +48,7 @@ CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.224.0.0/11}" RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}" TERMINATED_POD_GC_THRESHOLD=${TERMINATED_POD_GC_THRESHOLD:-100} -# Set etcd image (e.g. 3.0.17-alpha.1) and version (e.g. 3.0.17) if you need +# Set etcd image (e.g. gcr.io/google_containers/etcd) and version (e.g. 3.1.10) if you need # non-default version. ETCD_IMAGE="${TEST_ETCD_IMAGE:-}" ETCD_VERSION="${TEST_ETCD_VERSION:-}" diff --git a/cluster/saltbase/salt/etcd/etcd.manifest b/cluster/saltbase/salt/etcd/etcd.manifest index c5e56b5a512..3b4786f80b7 100644 --- a/cluster/saltbase/salt/etcd/etcd.manifest +++ b/cluster/saltbase/salt/etcd/etcd.manifest @@ -39,7 +39,7 @@ "containers":[ { "name": "etcd-container", - "image": "gcr.io/google_containers/etcd:{{ pillar.get('etcd_docker_tag', '3.0.17') }}", + "image": "gcr.io/google_containers/etcd:{{ pillar.get('etcd_docker_tag', '3.1.10') }}", "resources": { "requests": { "cpu": {{ cpulimit }} @@ -55,7 +55,7 @@ "value": "{{ pillar.get('storage_backend', 'etcd3') }}" }, { "name": "TARGET_VERSION", - "value": "{{ pillar.get('etcd_version', '3.0.17') }}" + "value": "{{ pillar.get('etcd_version', '3.1.10') }}" }, { "name": "DATA_DIRECTORY", "value": "/var/etcd/data{{ suffix }}" diff --git a/cmd/kubeadm/app/constants/constants.go b/cmd/kubeadm/app/constants/constants.go index 96ad745946d..56bc703ea3a 100644 --- a/cmd/kubeadm/app/constants/constants.go +++ b/cmd/kubeadm/app/constants/constants.go @@ -148,7 +148,7 @@ const ( MinExternalEtcdVersion = "3.0.14" // DefaultEtcdVersion indicates the default etcd version that kubeadm uses - DefaultEtcdVersion = "3.0.17" + DefaultEtcdVersion = "3.1.10" // Etcd defines variable used internally when referring to etcd component Etcd = "etcd" diff --git a/federation/cmd/kubefed/app/kubefed.go b/federation/cmd/kubefed/app/kubefed.go index 4b481c0bab2..37e2431bc18 100644 --- a/federation/cmd/kubefed/app/kubefed.go +++ b/federation/cmd/kubefed/app/kubefed.go @@ -30,7 +30,7 @@ import ( const ( hyperkubeImageName = "gcr.io/google_containers/hyperkube-amd64" - DefaultEtcdImage = "gcr.io/google_containers/etcd:3.0.17" + DefaultEtcdImage = "gcr.io/google_containers/etcd:3.1.10" ) func GetDefaultServerImage() string { diff --git a/federation/pkg/kubefed/init/init_test.go b/federation/pkg/kubefed/init/init_test.go index f0e74a1e0c9..8ccb86c4f32 100644 --- a/federation/pkg/kubefed/init/init_test.go +++ b/federation/pkg/kubefed/init/init_test.go @@ -213,7 +213,7 @@ func TestInitFederation(t *testing.T) { }, } - defaultEtcdImage := "gcr.io/google_containers/etcd:3.0.17" + defaultEtcdImage := "gcr.io/google_containers/etcd:3.1.10" //TODO: implement a negative case for dry run diff --git a/hack/lib/etcd.sh b/hack/lib/etcd.sh index 2f6e511a1b9..704c57ce786 100755 --- a/hack/lib/etcd.sh +++ b/hack/lib/etcd.sh @@ -16,7 +16,7 @@ # A set of helpers for starting/running etcd for tests -ETCD_VERSION=${ETCD_VERSION:-3.0.17} +ETCD_VERSION=${ETCD_VERSION:-3.1.10} ETCD_HOST=${ETCD_HOST:-127.0.0.1} ETCD_PORT=${ETCD_PORT:-2379} diff --git a/hack/test-update-storage-objects.sh b/hack/test-update-storage-objects.sh index ff0293af232..c9193bea399 100755 --- a/hack/test-update-storage-objects.sh +++ b/hack/test-update-storage-objects.sh @@ -32,9 +32,6 @@ KUBE_NEW_API_VERSION=${KUBE_NEW_API_VERSION:-"v1"} KUBE_OLD_STORAGE_VERSIONS=${KUBE_OLD_STORAGE_VERSIONS:-""} KUBE_NEW_STORAGE_VERSIONS=${KUBE_NEW_STORAGE_VERSIONS:-""} -STORAGE_BACKEND_ETCD2="etcd2" -STORAGE_BACKEND_ETCD3="etcd3" - KUBE_STORAGE_MEDIA_TYPE_JSON="application/json" KUBE_STORAGE_MEDIA_TYPE_PROTOBUF="application/vnd.kubernetes.protobuf" @@ -51,11 +48,9 @@ KUBECTL="${KUBE_OUTPUT_HOSTBIN}/kubectl" UPDATE_ETCD_OBJECTS_SCRIPT="${KUBE_ROOT}/cluster/update-storage-objects.sh" function startApiServer() { - local storage_backend=${1:-"${STORAGE_BACKEND_ETCD2}"} - local storage_versions=${2:-""} - local storage_media_type=${3:-""} + local storage_versions=${1:-""} + local storage_media_type=${2:-""} kube::log::status "Starting kube-apiserver with KUBE_API_VERSIONS: ${KUBE_API_VERSIONS}" - kube::log::status " and storage-backend: ${storage_backend}" kube::log::status " and storage-media-type: ${storage_media_type}" kube::log::status " and runtime-config: ${RUNTIME_CONFIG}" kube::log::status " and storage-version overrides: ${storage_versions}" @@ -65,7 +60,7 @@ function startApiServer() { --insecure-bind-address="${API_HOST}" \ --bind-address="${API_HOST}" \ --insecure-port="${API_PORT}" \ - --storage-backend="${storage_backend}" \ + --storage-backend="etcd3" \ --etcd-servers="http://${ETCD_HOST}:${ETCD_PORT}" \ --etcd-prefix="/${ETCD_PREFIX}" \ --runtime-config="${RUNTIME_CONFIG}" \ @@ -103,7 +98,7 @@ make -C "${KUBE_ROOT}" WHAT=cmd/kube-apiserver make -C "${KUBE_ROOT}" WHAT=cluster/images/etcd/attachlease kube::etcd::start -echo "${ETCD_VERSION}/${STORAGE_BACKEND_ETCD2}" > "${ETCD_DIR}/version.txt" +echo "${ETCD_VERSION}" > "${ETCD_DIR}/version.txt" ### BEGIN TEST DEFINITION CUSTOMIZATION ### @@ -126,7 +121,7 @@ KUBE_NEW_STORAGE_VERSIONS="storage.k8s.io/v1" ####################################################### KUBE_API_VERSIONS="v1,${KUBE_OLD_API_VERSION},${KUBE_NEW_API_VERSION}" RUNTIME_CONFIG="api/all=false,api/v1=true,${KUBE_OLD_API_VERSION}=true,${KUBE_NEW_API_VERSION}=true" -startApiServer ${STORAGE_BACKEND_ETCD2} ${KUBE_OLD_STORAGE_VERSIONS} ${KUBE_STORAGE_MEDIA_TYPE_JSON} +startApiServer ${KUBE_OLD_STORAGE_VERSIONS} ${KUBE_STORAGE_MEDIA_TYPE_JSON} # Create object(s) @@ -147,38 +142,21 @@ for test in ${tests[@]}; do namespace="${namespace}/" fi kube::log::status "Verifying ${resource}/${namespace}${name} has storage version ${old_storage_version} in etcd" - curl -s http://${ETCD_HOST}:${ETCD_PORT}/v2/keys/${ETCD_PREFIX}/${resource}/${namespace}${name} | grep ${old_storage_version} + ETCDCTL_API=3 ${ETCDCTL} --endpoints="http://${ETCD_HOST}:${ETCD_PORT}" get "/${ETCD_PREFIX}/${resource}/${namespace}${name}" | grep ${old_storage_version} done killApiServer ####################################################### -# Step 2: Perform etcd2 -> etcd3 migration. -# We always perform offline migration, so we need to stop etcd. -####################################################### - -kube::etcd::stop -TARGET_STORAGE="etcd3" \ - TARGET_VERSION="3.0.17" \ - DATA_DIRECTORY="${ETCD_DIR}" \ - ETCD=$(which etcd) \ - ETCDCTL=$(which etcdctl) \ - ATTACHLEASE="${KUBE_OUTPUT_HOSTBIN}/attachlease" \ - DO_NOT_MOVE_BINARIES="true" \ - ${KUBE_ROOT}/cluster/images/etcd/migrate-if-needed.sh -kube::etcd::start - - -####################################################### -# Step 3: Start a server which supports both the old and new api versions, +# Step 2: Start a server which supports both the old and new api versions, # but KUBE_NEW_API_VERSION is the latest (storage) version. # Still use KUBE_STORAGE_MEDIA_TYPE_JSON for storage encoding. ####################################################### KUBE_API_VERSIONS="v1,${KUBE_NEW_API_VERSION},${KUBE_OLD_API_VERSION}" RUNTIME_CONFIG="api/all=false,api/v1=true,${KUBE_OLD_API_VERSION}=true,${KUBE_NEW_API_VERSION}=true" -startApiServer ${STORAGE_BACKEND_ETCD3} ${KUBE_NEW_STORAGE_VERSIONS} ${KUBE_STORAGE_MEDIA_TYPE_JSON} +startApiServer ${KUBE_NEW_STORAGE_VERSIONS} ${KUBE_STORAGE_MEDIA_TYPE_JSON} # Update etcd objects, so that will now be stored in the new api version. kube::log::status "Updating storage versions in etcd" @@ -196,14 +174,14 @@ for test in ${tests[@]}; do namespace="${namespace}/" fi kube::log::status "Verifying ${resource}/${namespace}${name} has updated storage version ${new_storage_version} in etcd" - ETCDCTL_API=3 ${ETCDCTL} --endpoints="${ETCD_HOST}:${ETCD_PORT}" get "/${ETCD_PREFIX}/${resource}/${namespace}${name}" | grep ${new_storage_version} + ETCDCTL_API=3 ${ETCDCTL} --endpoints="http://${ETCD_HOST}:${ETCD_PORT}" get "/${ETCD_PREFIX}/${resource}/${namespace}${name}" | grep ${new_storage_version} done killApiServer ####################################################### -# Step 4 : Start a server which supports only the new api version. +# Step 3 : Start a server which supports only the new api version. # However, change storage encoding to KUBE_STORAGE_MEDIA_TYPE_PROTOBUF. ####################################################### @@ -212,7 +190,7 @@ RUNTIME_CONFIG="api/all=false,api/v1=true,${KUBE_NEW_API_VERSION}=true" # This seems to reduce flakiness. sleep 1 -startApiServer ${STORAGE_BACKEND_ETCD3} ${KUBE_NEW_STORAGE_VERSIONS} ${KUBE_STORAGE_MEDIA_TYPE_PROTOBUF} +startApiServer ${KUBE_NEW_STORAGE_VERSIONS} ${KUBE_STORAGE_MEDIA_TYPE_PROTOBUF} for test in ${tests[@]}; do IFS=',' read -ra test_data <<<"$test" diff --git a/staging/src/k8s.io/apiextensions-apiserver/artifacts/example/rc.yaml b/staging/src/k8s.io/apiextensions-apiserver/artifacts/example/rc.yaml index d2bcefe7016..ac544c60ca6 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/artifacts/example/rc.yaml +++ b/staging/src/k8s.io/apiextensions-apiserver/artifacts/example/rc.yaml @@ -23,4 +23,4 @@ spec: - "--etcd-servers=http://localhost:2379" - "--audit-log-path=-" - name: etcd - image: quay.io/coreos/etcd:v3.0.17 + image: quay.io/coreos/etcd:v3.1.10 diff --git a/staging/src/k8s.io/sample-apiserver/artifacts/example/rc.yaml b/staging/src/k8s.io/sample-apiserver/artifacts/example/rc.yaml index 04238c9afbd..d2e818bdf10 100644 --- a/staging/src/k8s.io/sample-apiserver/artifacts/example/rc.yaml +++ b/staging/src/k8s.io/sample-apiserver/artifacts/example/rc.yaml @@ -21,4 +21,4 @@ spec: imagePullPolicy: Never command: [ "/kube-sample-apiserver", "--etcd-servers=http://localhost:2379" ] - name: etcd - image: quay.io/coreos/etcd:v3.0.17 + image: quay.io/coreos/etcd:v3.1.10 diff --git a/test/e2e/apimachinery/aggregator.go b/test/e2e/apimachinery/aggregator.go index 90506f44b1a..23d6027345b 100644 --- a/test/e2e/apimachinery/aggregator.go +++ b/test/e2e/apimachinery/aggregator.go @@ -207,7 +207,7 @@ func TestSampleAPIServer(f *framework.Framework, image, namespaceName string) { // kubectl create -f deploy.yaml deploymentName := "sample-apiserver-deployment" - etcdImage := "quay.io/coreos/etcd:v3.0.17" + etcdImage := "quay.io/coreos/etcd:v3.1.10" podLabels := map[string]string{"app": "sample-apiserver", "apiserver": "true"} replicas := int32(1) zero := int64(0) diff --git a/test/e2e/framework/nodes_util.go b/test/e2e/framework/nodes_util.go index 073e59dd77a..5cfd4d95751 100644 --- a/test/e2e/framework/nodes_util.go +++ b/test/e2e/framework/nodes_util.go @@ -59,7 +59,7 @@ func etcdUpgradeGCE(target_storage, target_version string) error { os.Environ(), "TEST_ETCD_VERSION="+target_version, "STORAGE_BACKEND="+target_storage, - "TEST_ETCD_IMAGE=3.0.17") + "TEST_ETCD_IMAGE=3.1.10") _, _, err := RunCmdEnv(env, gceUpgradeScript(), "-l", "-M") return err @@ -78,7 +78,7 @@ func masterUpgradeGCE(rawV string, enableKubeProxyDaemonSet bool) error { env = append(env, "TEST_ETCD_VERSION="+TestContext.EtcdUpgradeVersion, "STORAGE_BACKEND="+TestContext.EtcdUpgradeStorage, - "TEST_ETCD_IMAGE=3.0.17") + "TEST_ETCD_IMAGE=3.1.10") } v := "v" + rawV diff --git a/test/kubemark/start-kubemark.sh b/test/kubemark/start-kubemark.sh index 626f713e86a..15b14b924e6 100755 --- a/test/kubemark/start-kubemark.sh +++ b/test/kubemark/start-kubemark.sh @@ -54,7 +54,7 @@ INSTANCE_PREFIX="${INSTANCE_PREFIX:-}" SERVICE_CLUSTER_IP_RANGE="${SERVICE_CLUSTER_IP_RANGE:-}" # Etcd related variables. -ETCD_IMAGE="${ETCD_IMAGE:-3.0.17}" +ETCD_IMAGE="${ETCD_IMAGE:-3.1.10}" ETCD_VERSION="${ETCD_VERSION:-}" # Controller-manager related variables.