Skip to content

Commit 5927d80

Browse files
authored
zh,en: add feature gates doc (#3026)
1 parent 42b5b99 commit 5927d80

File tree

4 files changed

+172
-0
lines changed

4 files changed

+172
-0
lines changed

en/TOC.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- [Component Configuration](component-configuration.md)
1717
- [Storage Volume Configuration](volume-configuration.md)
1818
- [Customize the Configuration of Kubernetes Native Resources](overlay.md)
19+
- [Feature Gates](feature-gates.md)
1920
- Manage
2021
- Security
2122
- [Enable TLS for the MySQL Client](enable-tls-for-mysql-client.md)

en/feature-gates.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: Feature Gates
3+
summary: Learn how to use feature gates to enable or disable specific features in a TiDB cluster.
4+
---
5+
6+
# Feature Gates
7+
8+
Feature gates are configuration switches that enable or disable specific features in TiDB Operator. These features are generally experimental, and enabling them might require restarting certain components for the changes to take effect.
9+
10+
You can configure feature gates in the `spec.featureGates` field of the Cluster Custom Resource (CR). The following example shows how to enable the `FeatureModification` feature gate:
11+
12+
```yaml
13+
spec:
14+
featureGates:
15+
FeatureModification: true
16+
```
17+
18+
## Supported feature gates
19+
20+
This section describes the feature gates supported by TiDB Operator. For definitions of feature stages, see [Feature gate stages](#feature-gate-stages).
21+
22+
### `FeatureModification`
23+
24+
- When this feature is enabled, you can modify the `spec.featureGates` configuration.
25+
- Default value: `false`
26+
- Stage: Alpha in v2.0 and later versions
27+
- Components requiring restart: None
28+
29+
### `VolumeAttributesClass`
30+
31+
- When this feature is enabled, you can modify the `VolumeAttributesClass` attribute of a PVC. This feature depends on the corresponding Kubernetes capability. For more information, see the [Kubernetes documentation for VolumeAttributesClass](https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/).
32+
- Default value: `false`
33+
- Stage: Alpha in v2.0 and later versions
34+
- Components requiring restart: None
35+
36+
### `DisablePDDefaultReadinessProbe`
37+
38+
- When this feature is enabled, TiDB Operator no longer checks PD readiness using TCP probes.
39+
- Default value: `false`
40+
- Stage: Alpha in v2.0 and later versions
41+
- Components requiring restart: PD
42+
43+
### `UsePDReadyAPI`
44+
45+
- When this feature is enabled, TiDB Operator checks PD readiness using the `/ready` API. For implementation details, see [`tikv/pd` #8749](https://github.com/tikv/pd/pull/8749).
46+
- Default value: `false`
47+
- Stage: Alpha in v2.0 and later versions
48+
- Components requiring restart: PD
49+
50+
### `SessionTokenSigning`
51+
52+
- When this feature is enabled, TiDB Operator automatically configures the [`session-token-signing-cert`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file/#session-token-signing-cert-new-in-v640) and [`session-token-signing-key`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file/#session-token-signing-key-new-in-v640) parameters for TiDB.
53+
- Default value: `false`
54+
- Stage: Alpha in v2.0 and later versions
55+
- Components requiring restart: TiDB
56+
57+
## Feature gate stages
58+
59+
TiDB Operator classifies feature gates into three stages based on feature maturity: Alpha, Beta, and GA.
60+
61+
### Alpha
62+
63+
Alpha-stage features have the following characteristics:
64+
65+
- Disabled by default.
66+
- Recommended only for newly created clusters.
67+
- Dynamic enabling or disabling in existing clusters is not guaranteed.
68+
- Known or unknown issues might occur after being enabled.
69+
- **Not recommended for production environments** unless risks are fully evaluated and validated.
70+
71+
### Beta
72+
73+
Beta-stage features have the following characteristics:
74+
75+
- Typically have undergone thorough testing.
76+
- Recommended to enable in all newly created clusters.
77+
- Usually support enabling or disabling in existing clusters, but might require restarting related components.
78+
79+
### GA
80+
81+
GA (General Availability) features have the following characteristics:
82+
83+
- Typically have undergone long-term and large-scale testing.
84+
- Enabled by default.
85+
- Cannot be disabled using feature gates.

zh/TOC.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- [组件配置](component-configuration.md)
1717
- [存储卷配置](volume-configuration.md)
1818
- [自定义 Kubernetes 原生资源的配置](overlay.md)
19+
- [特性门控](feature-gates.md)
1920
- 运维管理
2021
- 安全
2122
- [为 MySQL 客户端开启 TLS](enable-tls-for-mysql-client.md)

zh/feature-gates.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: 特性门控
3+
summary: 介绍如何使用特性门控 (Feature Gates) 在 TiDB 集群中开启或关闭特定功能。
4+
---
5+
6+
# 特性门控
7+
8+
特性门控 (Feature Gates) 是一组开关,用于控制是否启用 TiDB Operator 中的特定功能。这些功能通常处于实验阶段,启用后可能需要重启部分组件才能生效。
9+
10+
你可以在 Cluster CR 的 `spec.featureGates` 字段中配置特性门控。以下示例展示如何启用 `FeatureModification` 特性:
11+
12+
```yaml
13+
spec:
14+
featureGates:
15+
FeatureModification: true
16+
```
17+
18+
## 支持的特性门控
19+
20+
本节列出了 TiDB Operator 支持的特性门控。关于特性阶段的定义,请参考[特性门控阶段](#特性门控阶段)。
21+
22+
### `FeatureModification`
23+
24+
- 开启该特性后,你可以修改 `spec.featureGates` 配置。
25+
- 默认值:`false`
26+
- 阶段:v2.0 及之后版本为 Alpha
27+
- 需要重启的组件:无
28+
29+
### `VolumeAttributesClass`
30+
31+
- 开启该特性后,你可以修改 PVC 的 `VolumeAttributesClass` 属性。该功能依赖 Kubernetes 的对应能力。更多信息,请参考 [Kubernetes 官方文档 VolumeAttributesClass](https://kubernetes.io/zh-cn/docs/concepts/storage/volume-attributes-classes/)。
32+
- 默认值:`false`
33+
- 阶段:v2.0 及之后版本为 Alpha
34+
- 需要重启的组件:无
35+
36+
### `DisablePDDefaultReadinessProbe`
37+
38+
- 开启该特性后,TiDB Operator 不再通过 TCP 探测方式检查 PD 的就绪状态。
39+
- 默认值:`false`
40+
- 阶段:v2.0 及之后版本为 Alpha
41+
- 需要重启的组件:PD
42+
43+
### `UsePDReadyAPI`
44+
45+
- 开启该特性后,TiDB Operator 将通过 PD 的 `/ready` API 检查就绪状态。有关实现细节,请参阅 [`tikv/pd` #8749](https://github.com/tikv/pd/pull/8749)。
46+
- 默认值:`false`
47+
- 阶段:v2.0 及之后版本为 Alpha
48+
- 需要重启的组件:PD
49+
50+
### `SessionTokenSigning`
51+
52+
- 开启该特性后,TiDB Operator 会自动配置 TiDB 的 [`session-token-signing-cert`](https://docs.pingcap.com/zh/tidb/stable/tidb-configuration-file/#session-token-signing-cert-从-v640-版本开始引入) 和 [`session-token-signing-key`](https://docs.pingcap.com/zh/tidb/stable/tidb-configuration-file/#session-token-signing-key-从-v640-版本开始引入) 参数。
53+
- 默认值:`false`
54+
- 阶段:v2.0 及之后版本为 Alpha
55+
- 需要重启的组件:TiDB
56+
57+
## 特性门控阶段
58+
59+
特性门控根据功能的成熟度分为 Alpha、Beta 和 GA 三个阶段。
60+
61+
### Alpha
62+
63+
Alpha 阶段的特性具有以下特点:
64+
65+
- 默认关闭。
66+
- 建议仅在新建集群中开启。
67+
- 不保证支持在已有集群中动态开启或关闭。
68+
- 开启后可能出现已知或未知问题。
69+
- **不建议在生产环境中使用**,除非已充分评估并验证风险。
70+
71+
### Beta
72+
73+
Beta 阶段的特性具有以下特点:
74+
75+
- 通常已经过较充分的测试。
76+
- 建议在所有新建集群中开启。
77+
- 通常支持在已有集群中开启或关闭,但可能需要重启相关组件。
78+
79+
### GA
80+
81+
GA (General Availability) 阶段的特性具有以下特点:
82+
83+
- 通常已经过长期和大规模测试。
84+
- 默认开启。
85+
- 不支持通过特性门控关闭。

0 commit comments

Comments
 (0)