From 2231a78ad3ef4651aba79c5c6baa4ae24959a76a Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Tue, 2 Jan 2018 14:33:00 -0800 Subject: [PATCH 01/10] pkg/apis: bump etcd version to 3.2.13 fixes #1813 --- pkg/apis/etcd/v1beta2/cluster.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/apis/etcd/v1beta2/cluster.go b/pkg/apis/etcd/v1beta2/cluster.go index c852681aa..619b8fb3e 100644 --- a/pkg/apis/etcd/v1beta2/cluster.go +++ b/pkg/apis/etcd/v1beta2/cluster.go @@ -23,8 +23,8 @@ import ( ) const ( - defaultRepository = "quay.io/coreos/etcd" - defaultVersion = "3.2.11" + defaultRepository = "quay.io/coreos/etcd" + DefaultEtcdVersion = "3.2.13" ) var ( @@ -89,7 +89,7 @@ type ClusterSpec struct { // The version must follow the [semver]( http://semver.org) format, for example "3.2.11". // Only etcd released versions are supported: https://github.com/coreos/etcd/releases // - // If version is not set, default is "3.2.11". + // If version is not set, default is "3.2.13". Version string `json:"version,omitempty"` // Paused is to pause the control of the operator for the etcd cluster. @@ -173,7 +173,7 @@ func (e *EtcdCluster) SetDefaults() { } if len(c.Version) == 0 { - c.Version = defaultVersion + c.Version = DefaultEtcdVersion } c.Version = strings.TrimLeft(c.Version, "v") From 180600d94faa2c49fd46360bfc543fc035fb15a7 Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Tue, 2 Jan 2018 14:41:45 -0800 Subject: [PATCH 02/10] e2e: support etcd version bump in backup_restore_test.go --- test/e2e/e2eslow/backup_restore_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/e2eslow/backup_restore_test.go b/test/e2e/e2eslow/backup_restore_test.go index f29be2372..294f6ef9a 100644 --- a/test/e2e/e2eslow/backup_restore_test.go +++ b/test/e2e/e2eslow/backup_restore_test.go @@ -156,10 +156,10 @@ func testEtcdBackupOperatorForS3Backup(t *testing.T, clusterName, operatorClient return false, fmt.Errorf("failed to retrieve backup CR: %v", err) } if reb.Status.Succeeded { - if reb.Status.EtcdVersion == "3.2.11" && reb.Status.EtcdRevision == 1 { + if reb.Status.EtcdVersion == api.DefaultEtcdVersion && reb.Status.EtcdRevision == 1 { return true, nil } - return false, fmt.Errorf("expect EtcdVersion==3.2.11 and EtcdRevision==1, but got EtcdVersion==%v and EtcdRevision==%v", reb.Status.EtcdVersion, reb.Status.EtcdRevision) + return false, fmt.Errorf("expect EtcdVersion==%v and EtcdRevision==1, but got EtcdVersion==%v and EtcdRevision==%v", api.DefaultEtcdVersion, reb.Status.EtcdVersion, reb.Status.EtcdRevision) } if len(reb.Status.Reason) != 0 { return false, fmt.Errorf("backup failed with reason: %v ", reb.Status.Reason) From e2e4bf9c22cdc1edada14d9d6973b6978bac379e Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Tue, 2 Jan 2018 14:50:32 -0800 Subject: [PATCH 03/10] readme: support etcd version 3.2.13 --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a7033d8ed..acdc30882 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ See the [Resources and Labels](./doc/user/resource_labels.md) doc for an overvie ## Requirements - Kubernetes 1.8+ -- etcd 3.2.11+ +- etcd 3.2.13+ ## Demo @@ -101,7 +101,7 @@ metadata: name: "example-etcd-cluster" spec: size: 5 - version: "3.2.11" + version: "3.2.13" ``` Apply the size change to the cluster CR: @@ -129,7 +129,7 @@ metadata: name: "example-etcd-cluster" spec: size: 3 - version: "3.2.11" + version: "3.2.13" ``` ``` $ kubectl apply -f example/example-etcd-cluster.yaml @@ -243,7 +243,7 @@ $ kubectl get pod example-etcd-cluster-0000 -o yaml | grep "image:" | uniq image: quay.io/coreos/etcd:v3.1.10 ``` -Now modify the file `upgrade-example` and change the `version` from 3.1.10 to 3.2.11: +Now modify the file `upgrade-example` and change the `version` from 3.1.10 to 3.2.13: ``` $ cat upgrade-example @@ -253,7 +253,7 @@ metadata: name: "example-etcd-cluster" spec: size: 3 - version: "3.2.11" + version: "3.2.13" ``` Apply the version change to the cluster CR: @@ -262,11 +262,11 @@ Apply the version change to the cluster CR: $ kubectl apply -f upgrade-example ``` -Wait ~30 seconds. The container image version should be updated to v3.2.11: +Wait ~30 seconds. The container image version should be updated to v3.2.13: ``` $ kubectl get pod example-etcd-cluster-0000 -o yaml | grep "image:" | uniq - image: gcr.io/etcd-development/etcd:v3.2.11 + image: gcr.io/etcd-development/etcd:v3.2.13 ``` Check the other two pods and you should see the same result. From 84b082412ed58e6952630aa86c2e423527d66dc9 Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Tue, 2 Jan 2018 14:50:58 -0800 Subject: [PATCH 04/10] doc/user: support etcd vesion 3.2.13 --- doc/user/spec_examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/spec_examples.md b/doc/user/spec_examples.md index d61528e8d..e3f16ae59 100644 --- a/doc/user/spec_examples.md +++ b/doc/user/spec_examples.md @@ -14,7 +14,7 @@ This will use the default version chosen by the etcd-operator. ```yaml spec: size: 3 - version: "3.2.11" + version: "3.2.13" ``` ## Three member cluster with node selector and anti-affinity across nodes From 503ee0ee5eed580c949b3fea548ca5bcca50b65f Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Tue, 2 Jan 2018 14:51:31 -0800 Subject: [PATCH 05/10] doc/user: support etcd version 3.2.13 for backup-operator.md --- doc/user/walkthrough/backup-operator.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/walkthrough/backup-operator.md b/doc/user/walkthrough/backup-operator.md index ae47a2488..b4c99b3b3 100644 --- a/doc/user/walkthrough/backup-operator.md +++ b/doc/user/walkthrough/backup-operator.md @@ -81,7 +81,7 @@ kind: EtcdBackup ... status: etcdRevision: 1 - etcdVersion: 3.2.11 + etcdVersion: 3.2.13 succeeded: true ``` From b86c356203dd5e7c8ccc7d8bea6fbd34ed3886b6 Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Tue, 2 Jan 2018 14:52:20 -0800 Subject: [PATCH 06/10] example: support etcd 3.2.13 in example-etcd-cluster.yaml --- example/example-etcd-cluster.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/example-etcd-cluster.yaml b/example/example-etcd-cluster.yaml index ce560936c..e75d261d8 100644 --- a/example/example-etcd-cluster.yaml +++ b/example/example-etcd-cluster.yaml @@ -4,4 +4,4 @@ metadata: name: "example-etcd-cluster" spec: size: 3 - version: "3.2.11" + version: "3.2.13" From 3e3801f97f0952c897d94d67ab3b1243a2c72100 Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Tue, 2 Jan 2018 14:53:05 -0800 Subject: [PATCH 07/10] pkg/apis: change usage of 3.2.11 to 3.2.13 in comments --- pkg/apis/etcd/v1beta2/cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/apis/etcd/v1beta2/cluster.go b/pkg/apis/etcd/v1beta2/cluster.go index 619b8fb3e..0656112cf 100644 --- a/pkg/apis/etcd/v1beta2/cluster.go +++ b/pkg/apis/etcd/v1beta2/cluster.go @@ -86,7 +86,7 @@ type ClusterSpec struct { // The etcd-operator will eventually make the etcd cluster version // equal to the expected version. // - // The version must follow the [semver]( http://semver.org) format, for example "3.2.11". + // The version must follow the [semver]( http://semver.org) format, for example "3.2.13". // Only etcd released versions are supported: https://github.com/coreos/etcd/releases // // If version is not set, default is "3.2.13". From e0b0eb70b7a4bfcd260126b04d260a8da9cf3735 Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Tue, 2 Jan 2018 14:54:16 -0800 Subject: [PATCH 08/10] test/e2e: support upgrade test for etcd version 3.2.13 --- test/e2e/basic_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/basic_test.go b/test/e2e/basic_test.go index 7170411a9..463c82c83 100644 --- a/test/e2e/basic_test.go +++ b/test/e2e/basic_test.go @@ -125,7 +125,7 @@ func TestEtcdUpgrade(t *testing.T) { t.Fatalf("failed to create 3 members etcd cluster: %v", err) } - targetVersion := "3.2.11" + targetVersion := "3.2.13" updateFunc := func(cl *api.EtcdCluster) { cl = e2eutil.ClusterWithVersion(cl, targetVersion) } From dc25705be795a930eac2c29d178dd7fb9e4f6098 Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Tue, 2 Jan 2018 14:55:00 -0800 Subject: [PATCH 09/10] test/e2e: support etcd version 3.2.13 in self_hosted_test.go --- test/e2e/e2esh/self_hosted_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/e2esh/self_hosted_test.go b/test/e2e/e2esh/self_hosted_test.go index f400c9f9e..f14c5bed2 100644 --- a/test/e2e/e2esh/self_hosted_test.go +++ b/test/e2e/e2esh/self_hosted_test.go @@ -85,7 +85,7 @@ func startEtcd(f *framework.Framework) (*v1.Pod, error) { Containers: []v1.Container{{ Command: []string{"/bin/sh", "-ec", etcdCmd}, Name: "etcd", - Image: "quay.io/coreos/etcd:v3.2.11", + Image: "quay.io/coreos/etcd:v3.2.13", Env: []v1.EnvVar{{ Name: "POD_NAME", ValueFrom: &v1.EnvVarSource{FieldRef: &v1.ObjectFieldSelector{FieldPath: "metadata.name"}}, From 6e889fc939b23337201ce6be221e96ebeff7b540 Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Tue, 2 Jan 2018 14:55:39 -0800 Subject: [PATCH 10/10] CHANGELOG: add etcd version bump to 3.2.13 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92b25087b..b99a0a610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Changed +- Default base image is changed to `gcr.io/etcd-development/etcd`, default etcd version is `3.2.13`. + ### Removed ### Fixed