Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion variables.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"tidb_operator_version": "v2.0.0-beta.0",
"tidb_operator_version": "v2.0.0",
"tidb_version": "v8.5.2"
}
62 changes: 62 additions & 0 deletions zh/releases/release-2.0.0.md
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add this file to zh/TOC.md

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: TiDB Operator 2.0.0 Release Notes
summary: TiDB Operator 2.0.0 版本发布。v2 版本对 v1 版本进行了大幅重构,主要改动包括将 `TidbCluster` 拆分为多个 CRD、移除对 StatefulSet 的依赖,并引入 Overlay 功能以实现更灵活的自定义配置。
---

# TiDB Operator 2.0.0 Release Notes

发布日期:2025 年 12 月 18 日

TiDB Operator 版本:2.0.0

随着 TiDB 和 Kubernetes 生态的快速发展,TiDB Operator 发布 v2.0.0 版本,对 v1 进行了全面重构,旨在提供更稳定、高效且易于维护的集群管理体验。

关于 TiDB Operator v2 与 v1 的详细差异,请参考 [TiDB Operator v2 与 v1 版本对比](../v2-vs-v1.md)。

## 主要变化和改进

### 核心架构重构

TiDB Operator v2 对 v1 的核心架构进行了全面重构,主要包括:

- **CRD 拆分**:将 v1 中的 `TidbCluster` CRD 拆分为多个独立的 CRD,实现更细粒度的组件管理,提高可维护性和灵活性。
- **直接管理 Pod**:移除对 StatefulSet 的依赖,改为直接管理 Pod,提供更高的灵活性,便于更精细地控制 Pod 的生命周期和调度行为。
- **控制器架构升级**:基于 [controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) 框架实现控制器逻辑,简化控制器的开发流程,提升开发效率,并增强系统的稳定性与可靠性。

### 新特性与功能增强

- **支持 Overlay 字段**:
- 允许用户在不修改 TiDB Operator 源码的情况下,灵活地为 Pod 指定 Kubernetes 支持的所有字段
- 提供安全校验机制,防止关键系统标签被误覆盖

- **拓扑感知调度**:
- 支持 `EvenlySpread` 策略,实现 Pod 在不同拓扑域间的均匀分布
- 支持拓扑权重配置,可灵活控制各拓扑域中实例的分布比例
- 提升集群高可用性和容错能力

- **增强字段校验**:
- 集成 Kubernetes 的[合法性检查规则 (Validation Rule)](https://kubernetes.io/zh-cn/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules) 和[验证准入策略 (Validating Admission Policy)](https://kubernetes.io/zh-cn/docs/reference/access-authn-authz/validating-admission-policy/)
- 支持字段格式与取值范围校验
- 提供更明确、易理解的错误提示信息,便于问题定位

- **支持 [CRD 子资源](https://kubernetes.io/zh-cn/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#subresources)**:
- 支持 `status` 子资源,实现统一的状态管理
- 支持 `scale` 子资源,可与 [HorizontalPodAutoscaler (HPA)](https://kubernetes.io/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale/) 集成,实现自动扩缩容
- 增强与 Kubernetes 生态系统的集成能力

- **支持 FeatureGates**:
- 支持通过 [FeatureGates](../feature-gates.md) 控制可能导致集群节点重启的变更行为
Comment on lines +47 to +48
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- **支持 FeatureGates**
- 支持通过 [FeatureGates](../feature-gates.md) 控制可能导致集群节点重启的变更行为
- **支持 Feature Gates 控制变更行为**
- 支持通过[特性门控 (Feature Gates)](../feature-gates.md) 功能控制可能触发集群节点重启的变更操作,从而降低对集群稳定性的影响


- **支持取消 TiKV 和 TiFlash 的下线**:
- 支持在 scale in 下线 TiKV 和 TiFlash 时再次 scale out,operator 会优先取消未完全下线的 TiKV 和 TiFlash 的下线行为
Comment on lines +50 to +51
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- **支持取消 TiKV 和 TiFlash 的下线**
- 支持在 scale in 下线 TiKV TiFlash 时再次 scale out,operator 会优先取消未完全下线的 TiKV 和 TiFlash 的下线行为
- **支持取消 TiKV 和 TiFlash 节点下线**
- 在对 TiKV TiFlash 执行缩容 (scale in) 过程中,如果执行扩容 (scale out) 操作,TiDB Operator 会优先取消尚未完成下线的节点,从而避免不必要的节点重建


### 移除功能

- 移除[基于 AWS EBS 卷快照的备份恢复](https://docs.pingcap.com/zh/tidb-in-kubernetes/v1.6/volume-snapshot-backup-restore/)相关功能。
- 移除 `tidb-scheduler` 组件。
- 移除 `TiDBInitializer`、`TiDBDashboard`、`DMCluster`、`FedVolumeBackup`、`FedVolumeBackupSchedule`、`FedVolumeRestore` 等 CRD。
- 移除 `TiDBMonitor`、`TiDBNGMonitoring` 等 CRD,相关功能已通过其他方式集成,详情请查阅 [TiDB 集群的监控与告警](../monitor-a-tidb-cluster.md)。

## 致谢

感谢所有为 TiDB Operator 做出贡献的开发者和社区成员!我们期待您的反馈和建议,共同完善这个重要的里程碑版本。