Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1819 from fanminshi/bump_etcd_3.2.13
Browse files Browse the repository at this point in the history
*: bump etcd verison to 3.2.13
  • Loading branch information
fanminshi authored Jan 3, 2018
2 parents ee53f1b + 6e889fc commit 9669edc
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 19 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### Changed

- Default base image is changed to `gcr.io/etcd-development/etcd`, default etcd version is `3.2.13`.

### Removed

### Fixed
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion doc/user/spec_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/user/walkthrough/backup-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ kind: EtcdBackup
...
status:
etcdRevision: 1
etcdVersion: 3.2.11
etcdVersion: 3.2.13
succeeded: true
```
Expand Down
2 changes: 1 addition & 1 deletion example/example-etcd-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ metadata:
name: "example-etcd-cluster"
spec:
size: 3
version: "3.2.11"
version: "3.2.13"
10 changes: 5 additions & 5 deletions pkg/apis/etcd/v1beta2/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -86,10 +86,10 @@ 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.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.
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/e2esh/self_hosted_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"}},
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/e2eslow/backup_restore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9669edc

Please sign in to comment.