|
| 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. |
0 commit comments