Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
39e5a566
Commit
39e5a566
authored
Jul 21, 2017
by
Hongchao Deng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
etcd: update version to 3.1.10
parent
dd99659d
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
32 additions
and
54 deletions
+32
-54
Dockerfile
build/build-image/cross/Dockerfile
+1
-1
VERSION
build/build-image/cross/VERSION
+1
-1
WORKSPACE
build/root/WORKSPACE
+2
-2
config-test.sh
cluster/gce/config-test.sh
+1
-1
Makefile
cluster/images/etcd/Makefile
+3
-3
config-default.sh
cluster/kubemark/gce/config-default.sh
+1
-1
etcd.manifest
cluster/saltbase/salt/etcd/etcd.manifest
+2
-2
constants.go
cmd/kubeadm/app/constants/constants.go
+1
-1
kubefed.go
federation/cmd/kubefed/app/kubefed.go
+1
-1
init_test.go
federation/pkg/kubefed/init/init_test.go
+1
-1
etcd.sh
hack/lib/etcd.sh
+1
-1
test-update-storage-objects.sh
hack/test-update-storage-objects.sh
+11
-33
rc.yaml
.../k8s.io/apiextensions-apiserver/artifacts/example/rc.yaml
+1
-1
rc.yaml
...ing/src/k8s.io/sample-apiserver/artifacts/example/rc.yaml
+1
-1
aggregator.go
test/e2e/apimachinery/aggregator.go
+1
-1
nodes_util.go
test/e2e/framework/nodes_util.go
+2
-2
start-kubemark.sh
test/kubemark/start-kubemark.sh
+1
-1
No files found.
build/build-image/cross/Dockerfile
View file @
39e5a566
...
...
@@ -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
\
...
...
build/build-image/cross/VERSION
View file @
39e5a566
v1.8.3-
2
v1.8.3-
3
build/root/WORKSPACE
View file @
39e5a566
...
...
@@ -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 = "2
74c46a7f8d26f7ae99d6880610f54933cbcf7f3beafa19236c52eb5df8c7a0b
",
sha256 = "2
d335f298619c6fb02b1124773a56966e448ad9952b26fea52909da4fe80d2be
",
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)],
)
...
...
cluster/gce/config-test.sh
View file @
39e5a566
...
...
@@ -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
:-}
"
...
...
cluster/images/etcd/Makefile
View file @
39e5a566
...
...
@@ -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
...
...
cluster/kubemark/gce/config-default.sh
View file @
39e5a566
...
...
@@ -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
:-}
"
...
...
cluster/saltbase/salt/etcd/etcd.manifest
View file @
39e5a566
...
...
@@ -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 }}"
...
...
cmd/kubeadm/app/constants/constants.go
View file @
39e5a566
...
...
@@ -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"
...
...
federation/cmd/kubefed/app/kubefed.go
View file @
39e5a566
...
...
@@ -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
{
...
...
federation/pkg/kubefed/init/init_test.go
View file @
39e5a566
...
...
@@ -211,7 +211,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
...
...
hack/lib/etcd.sh
View file @
39e5a566
...
...
@@ -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
}
...
...
hack/test-update-storage-objects.sh
View file @
39e5a566
...
...
@@ -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
"
...
...
staging/src/k8s.io/apiextensions-apiserver/artifacts/example/rc.yaml
View file @
39e5a566
...
...
@@ -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
staging/src/k8s.io/sample-apiserver/artifacts/example/rc.yaml
View file @
39e5a566
...
...
@@ -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
test/e2e/apimachinery/aggregator.go
View file @
39e5a566
...
...
@@ -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
)
...
...
test/e2e/framework/nodes_util.go
View file @
39e5a566
...
...
@@ -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
...
...
test/kubemark/start-kubemark.sh
View file @
39e5a566
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment