Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions en/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- [Component Configuration](component-configuration.md)
- [Storage Volume Configuration](volume-configuration.md)
- [Customize the Configuration of Kubernetes Native Resources](overlay.md)
- [Feature Gates](feature-gates.md)
- Manage
- Security
- [Enable TLS for the MySQL Client](enable-tls-for-mysql-client.md)
Expand Down
73 changes: 73 additions & 0 deletions en/feature-gates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: Feature Gates
summary: Introduce how to configure feature gates of a TiDB cluster
---

# Feature Gates

TiDB Operator supports to enable/disable a feature gates by the field `spec.featureGates` in the Cluster CR.

## Feature gates list


| Feature | Default | Stage | Since | Until |
|:---|:---|:---|:---|:---|
| FeatureModification | false | Alpha | 2.0 | - |
| VolumeAttributesClass | false | Alpha | 2.0 | - |
| DisablePDDefaultReadinessProbe | false | Alpha | 2.0 | - |
| UsePDReadyAPI | false | Alpha | 2.0 | - |
| SessionTokenSigning | false | Alpha | 2.0 | - |

## Stage

### Alpha

Alpha feature means:

- Disabled by default.
- Recommanded to enable only when create a new TiDB cluster.
- Might not support to enable/disable for an existing TiDB cluster.
- Not recommanded to enable in prod env if not well tested.

### Beta

Beta feature means:

- Normally the feature is well tested.
- Recommanded to enable for all new created TiDB clusters.
- Normally enable/disable the feature for an existing TiDB cluster has been supported.

### GA

GA feature means:

- Normally the feature has been tested in a long time.
- Enabled by default. And cannot be disabled.

## Description of features

### FeatureModification

Support to change `spec.featureGates` if enabled.

### VolumeAttributesClass

Support to change `VolumeAttributesClass` of PVCs. This feature should also be enabled in Kubernetes, see [VolumeAttributesClass](https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/)

### DisablePDDefaultReadinessProbe

Rolling Update: [PD]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this to the table?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe too many components?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, we may need explain Rolling Update: [PD] clearly, like "Enable/disable the feature requires restarting PD"


If enabled, default tcp readiness probe of PD will be removed.

### UsePDReadyAPI

Rolling Update: [PD]

If enabled, use `/ready` api as readiness probe of PD. See [tikv/pd#8749](https://github.com/tikv/pd/pull/8749)

### SessionTokenSigning

Rolling Update: [TiDB]

If enabled, `session-token-signing-cert` and `session-token-signing-key` will be configured. See [TiDB ConfigFile](https://docs.pingcap.com/tidb/stable/tidb-configuration-file/#session-token-signing-cert-new-in-v640)
1 change: 1 addition & 0 deletions zh/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- [组件配置](component-configuration.md)
- [存储卷配置](volume-configuration.md)
- [自定义 Kubernetes 原生资源的配置](overlay.md)
- [特性门控](feature-gates.md)
- 运维管理
- 安全
- [为 MySQL 客户端开启 TLS](enable-tls-for-mysql-client.md)
Expand Down
74 changes: 74 additions & 0 deletions zh/feature-gates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
title: 特性门控
summary: 介绍如何配置 TiDB 集群的特性门控
---

# 特性门控

TiDB Operator 支持通过 Cluster CR 上的 `spec.featureGates` 开启或关闭一些不成熟或者可能导致组件重启的特性。

## 特性门控列表


| 特性 | 默认值 | 阶段 | 自从 | 直到 |
|:---|:---|:---|:---|:---|
| FeatureModification | false | Alpha | 2.0 | - |
| VolumeAttributesClass | false | Alpha | 2.0 | - |
| DisablePDDefaultReadinessProbe | false | Alpha | 2.0 | - |
| UsePDReadyAPI | false | Alpha | 2.0 | - |
| SessionTokenSigning | false | Alpha | 2.0 | - |

## 阶段

### Alpha

Alpha 阶段的特性有如下特征

- 默认关闭
- 建议只在新建集群时开启。
- 不一定支持对已经创建的集群开启或关闭
- 启用此特性可能会有错误
- 建议未充分测试的情况不在生产环境下开启

### Beta

Beta 阶段的特性有如下特征

- 通常已经经过良好的测试
- 建议对所有新建集群开启
- 通常支持对已经创建的集群开启或关闭(可能重启组件)

### GA

GA 阶段的特性有如下特征

- 通常已经经过长期的测试
- 默认开启,并不支持关闭

## 特性说明

### FeatureModification

开启后支持变更 `spec.featureGates`.

### VolumeAttributesClass

开启后支持变更 PVC 的 VolumeAttributesClass. 需要 Kubernetes 支持对应功能, 详见 [VolumeAttributesClass](https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/)

### DisablePDDefaultReadinessProbe

需要重启: [PD]

开启后不再通过 tcp ping 来检查 PD 的 readiness

### UsePDReadyAPI

需要重启: [PD]

开启后通过 `/ready` 来检查 PD 的 readiness, 详见 https://github.com/tikv/pd/pull/8749

### SessionTokenSigning

需要重启: [TiDB]

开启后 TiDB 会配置 `session-token-signing-cert` 和 `session-token-signing-key`, 详见 [TiDB 配置文件](https://docs.pingcap.com/tidb/stable/tidb-configuration-file/#session-token-signing-cert-new-in-v640)