Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add v1.1.0 release notes #2569

Merged
merged 14 commits into from
May 28, 2020
55 changes: 50 additions & 5 deletions CHANGELOG-1.1.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
# TiDB Operator v1.1.0 Release Notes

This is the GA release of TiDB Operator 1.1, which focuses on the usability, extensibility and security.

See our official [documentation site](https://pingcap.com/docs/tidb-in-kubernetes/stable/) for new features, guides, and instructions in production, etc.

weekface marked this conversation as resolved.
Show resolved Hide resolved
## Upgrade from v1.0.x

For v1.0.x users, refer to [Upgrade TiDB Operator](https://pingcap.com/docs/tidb-in-kubernetes/stable/upgrade-tidb-operator/) to upgrade TiDB Operator in your cluster. Note that you should read the release notes (especially breaking changes and action required items) before the upgrade.
cofyc marked this conversation as resolved.
Show resolved Hide resolved

## Breaking changes since v1.0.0

- Change TiDB pod `readiness` probe from `HTTPGet` to `TCPSocket` 4000 port. This will trigger rolling-upgrade for the `tidb-server` component. You can set `spec.paused` to `true` before upgrading tidb-operator to avoid the rolling upgrade, and set it back to `false` when you are ready to upgrade your TiDB server ([#2139](https://github.com/pingcap/tidb-operator/pull/2139), [@weekface](https://github.com/weekface))
- `--advertise-address` is configured for `tidb-server`, which would trigger rolling-upgrade for the TiDB server. You can set `spec.paused` to `true` before upgrading TiDB Operator to avoid the rolling upgrade, and set it back to `false` when you are ready to upgrade your TiDB server ([#2076](https://github.com/pingcap/tidb-operator/pull/2076), [@cofyc](https://github.com/cofyc))
- `--default-storage-class-name` and `--default-backup-storage-class-name` flags are abandoned, and the storage class defaults to Kubernetes default storage class right now. If you have set default storage class different than Kubernetes default storage class, set them explicitly in your TiDB cluster Helm or YAML files. ([#1581](https://github.com/pingcap/tidb-operator/pull/1581), [@cofyc](https://github.com/cofyc))
- Add the `timezone` support for [all charts](https://github.com/pingcap/tidb-operator/tree/master/charts) ([#1122](https://github.com/pingcap/tidb-operator/pull/1122), [@weekface](https://github.com/weekface)).

For the `tidb-cluster` chart, we already have the `timezone` option (`UTC` by default). If the user does not change it to a different value (for example, `Aisa/Shanghai`), all Pods will not be recreated.
cofyc marked this conversation as resolved.
Show resolved Hide resolved
cofyc marked this conversation as resolved.
Show resolved Hide resolved
cofyc marked this conversation as resolved.
Show resolved Hide resolved
If the user changes it to another value (for example, `Aisa/Shanghai`), all the related Pods (add a `TZ` env) will be recreated, namely rolling updated.
cofyc marked this conversation as resolved.
Show resolved Hide resolved

The related Pods include `pump`, `drainer`, `dicovery`, `monitor`, `scheduled backup`, `tidb-initializer`, and `tikv-importer`.

All images' time zone maintained by TiDB Operator is `UTC`. If you use your own images, you need to make sure that the time zone inside your images is `UTC`.

## Other Notable changes

- Fix `TidbCluster` upgrade bug when `PodWebhook` and `Advancend StatefulSet` are both enabled ([#2507](https://github.com/pingcap/tidb-operator/pull/2507), [@Yisaer](https://github.com/Yisaer))
- Support preemption in `tidb-scheduler` ([#2510](https://github.com/pingcap/tidb-operator/pull/2510), [@cofyc](https://github.com/cofyc))
- Update BR to v4.0.0-rc.2 to include the `auto_random` fix ([#2508](https://github.com/pingcap/tidb-operator/pull/2508), [@DanielZhangQD](https://github.com/DanielZhangQD))
- Supports advanced statefulset for TiFlash ([#2469](https://github.com/pingcap/tidb-operator/pull/2469), [@DanielZhangQD](https://github.com/DanielZhangQD))
- Sync Pump before TiDB ([#2515](https://github.com/pingcap/tidb-operator/pull/2515), [@DanielZhangQD](https://github.com/DanielZhangQD))
- Improve performance by removing `TidbControl` lock ([#2489](https://github.com/pingcap/tidb-operator/pull/2489), [@weekface](https://github.com/weekface))
- Support TiCDC in `TidbCluster` ([#2362](https://github.com/pingcap/tidb-operator/pull/2362), [@weekface](https://github.com/weekface))
- Update TiDB/TiKV/PD configuration to 4.0.0 GA version ([#2571](https://github.com/pingcap/tidb-operator/pull/2571), [@Yisaer](https://github.com/Yisaer))
- TiDB Operator will not do failover for PD pods which are not desired ([#2570](https://github.com/pingcap/tidb-operator/pull/2570), [@Yisaer](https://github.com/Yisaer))
cofyc marked this conversation as resolved.
Show resolved Hide resolved

## Previous releases

- [v1.1.0-rc.4](#tidb-operator-v110-rc4-release-notes)
- [v1.1.0-rc.3](#tidb-operator-v110-rc3-release-notes)
- [v1.1.0-rc.2](#tidb-operator-v110-rc2-release-notes)
- [v1.1.0-rc.1](#tidb-operator-v110-rc1-release-notes)
- [v1.1.0-beta.2](#tidb-operator-v110-beta2-release-notes)
- [v1.1.0-beta.1](#tidb-operator-v110-beta1-release-notes)

# TiDB Operator v1.1.0-rc.4 Release Notes

This is the fourth release candidate of `v1.1.0`, which focuses on the usability, extensibility and security of TiDB Operator. While we encourage usage in non-critical environments, it is **NOT** recommended to use this version in critical environments.
Expand Down Expand Up @@ -180,15 +225,15 @@ This is a pre-release of `v1.1.0`, which focuses on the usability, extensibility
### Action Required

- ACTION REQUIRED: Add the `timezone` support for [all charts](https://github.com/pingcap/tidb-operator/tree/master/charts) ([#1122](https://github.com/pingcap/tidb-operator/pull/1122), [@weekface](https://github.com/weekface)).

For the `tidb-cluster` chart, we already have the `timezone` option (`UTC` by default). If the user does not change it to a different value (for example: `Aisa/Shanghai`), all Pods will not be recreated.
If the user changes it to another value (for example: `Aisa/Shanghai`), all the related Pods (add a `TZ` env) will be recreated (rolling update).

Regarding other charts, we don't have a `timezone` option in their `values.yaml`. We add the `timezone` option in this PR. No matter whether the user uses the old `values.yaml` or the new `values.yaml`, all the related Pods (add a `TZ` env) will not be recreated (rolling update).

The related Pods include `pump`, `drainer`, `dicovery`, `monitor`, `scheduled backup`, `tidb-initializer`, and `tikv-importer`.
All images' time zone maintained by `tidb-operator` is `UTC`. If you use your own images, you need to make sure that the time zone inside your images is `UTC`.

All images' time zone maintained by `tidb-operator` is `UTC`. If you use your own images, you need to make sure that the time zone inside your images is `UTC`.

### Other Notable Changes

Expand Down
2 changes: 1 addition & 1 deletion charts/tidb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ services:
type: ClusterIP

discovery:
image: pingcap/tidb-operator:v1.1.0-rc.3
image: pingcap/tidb-operator:v1.1.0
imagePullPolicy: IfNotPresent
resources:
limits:
Expand Down
4 changes: 2 additions & 2 deletions charts/tidb-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ rbac:
timezone: UTC

# operatorImage is TiDB Operator image
operatorImage: pingcap/tidb-operator:v1.1.0-rc.3
operatorImage: pingcap/tidb-operator:v1.1.0
imagePullPolicy: IfNotPresent

# tidbBackupManagerImage is tidb backup manager image
tidbBackupManagerImage: pingcap/tidb-backup-manager:v1.1.0-rc.3
tidbBackupManagerImage: pingcap/tidb-backup-manager:v1.1.0

#
# Enable or disable tidb-operator features:
Expand Down
2 changes: 1 addition & 1 deletion deploy/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ variable "eks_version" {

variable "operator_version" {
description = "TiDB operator version"
default = "v1.1.0-rc.3"
default = "v1.1.0"
}

variable "operator_values" {
Expand Down
2 changes: 1 addition & 1 deletion deploy/gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ variable "tidb_version" {
}

variable "tidb_operator_version" {
default = "v1.1.0-rc.3"
default = "v1.1.0"
}

variable "tidb_operator_chart_version" {
Expand Down
17 changes: 9 additions & 8 deletions tests/e2e/util/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ func ListImages() []string {
images = append(images, fmt.Sprintf("%s:%s", TiDBMonitorReloaderImage, TiDBMonitorReloaderVersion))
images = append(images, fmt.Sprintf("%s:%s", TiDBMonitorInitializerImage, TiDBMonitorInitializerVersion))
images = append(images, fmt.Sprintf("%s:%s", GrafanaImage, GrafanaVersion))
imagesFromOperator, err := readImagesFromValues(filepath.Join(framework.TestContext.RepoRoot, "charts/tidb-operator/values.yaml"))
imagesFromOperator, err := readImagesFromValues(filepath.Join(framework.TestContext.RepoRoot, "charts/tidb-operator/values.yaml"), sets.NewString(".advancedStatefulset.image", ".admissionWebhook.jobImage"))
if err != nil {
framework.ExpectNoError(err)
}
images = append(images, imagesFromOperator...)
imagesFromTiDBCluster, err := readImagesFromValues(filepath.Join(framework.TestContext.RepoRoot, "charts/tidb-cluster/values.yaml"))
imageKeysFromTiDBCluster := sets.NewString(".pd.image", ".tikv.image", ".tidb.image")
imagesFromTiDBCluster, err := readImagesFromValues(filepath.Join(framework.TestContext.RepoRoot, "charts/tidb-cluster/values.yaml"), imageKeysFromTiDBCluster)
if err != nil {
framework.ExpectNoError(err)
}
Expand All @@ -75,17 +76,17 @@ func ListImages() []string {
// values represents a collection of chart values.
type values map[string]interface{}

func walkValues(vals values, fn func(k string, v interface{})) {
func walkValues(vals values, parentKey string, fn func(k string, v interface{})) {
for k, v := range vals {
fn(k, v)
fn(parentKey+"."+k, v)
valsMap, ok := v.(map[string]interface{})
if ok {
walkValues(valsMap, fn)
walkValues(valsMap, parentKey+"."+k, fn)
}
}
}

func readImagesFromValues(f string) ([]string, error) {
func readImagesFromValues(f string, keys sets.String) ([]string, error) {
var vals values
data, err := ioutil.ReadFile(f)
if err != nil {
Expand All @@ -99,8 +100,8 @@ func readImagesFromValues(f string) ([]string, error) {
vals = values{}
}
images := []string{}
walkValues(vals, func(k string, v interface{}) {
if k != "image" {
walkValues(vals, "", func(k string, v interface{}) {
if keys != nil && !keys.Has(k) {
return
}
if image, ok := v.(string); ok {
Expand Down
22 changes: 20 additions & 2 deletions tests/e2e/util/image/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"k8s.io/apimachinery/pkg/util/sets"
)

func TestReadImagesFromValues(t *testing.T) {
tests := []struct {
name string
values string
keys sets.String
wantImages []string
}{
{
Expand All @@ -37,12 +39,28 @@ foo:
mysql:
image: pingcap/tidb-monitor-reloader:v1.0.1
`,
keys: nil,
wantImages: []string{
"pingcap/tidb-monitor-reloader:v1.0.1",
"pingcap/tidb:v3.0.4",
"busybox:latest",
},
},
{
name: "basic",
values: `
image: pingcap/tidb:v3.0.4
foo:
image: busybox:latest
mysql:
image: pingcap/tidb-monitor-reloader:v1.0.1
`,
keys: sets.NewString(".image", ".foo.image"),
wantImages: []string{
"pingcap/tidb:v3.0.4",
"busybox:latest",
},
},
}

for _, tt := range tests {
Expand All @@ -56,13 +74,13 @@ foo:
if err != nil {
t.Fatal(err)
}
got, err := readImagesFromValues(tmpfile.Name())
got, err := readImagesFromValues(tmpfile.Name(), tt.keys)
if err != nil {
t.Error(err)
}
sort.Strings(got)
sort.Strings(tt.wantImages)
if diff := cmp.Diff(got, tt.wantImages); diff != "" {
if diff := cmp.Diff(tt.wantImages, got); diff != "" {
t.Errorf("unexpected (-want, +got): %s", diff)
}
})
Expand Down